Show HN: Kontext CLI – Credential broker for AI coding agents in Go
TL;DR Highlight
Kontext evaluates local policy before agent tool calls and logs every decision
Who Should Read
Developers and platform engineers who let Claude Code or Codex run shell, file, and production actions and want pre-execution control
Core Mechanics
- Policy is evaluated locally before execution
- Kontext receives events via supported hooks between the agent and its tools and evaluates policy.
- Decisions happen alongside the agent, so no hosted service must answer every call.
- Observe first, enforce later
- Observe mode records what would be denied without blocking.
- Enforce mode really denies when a deterministic policy matches at a supported synchronous pre-action hook.
- Policy failures default to allow
- Evaluation errors, a missing, corrupt, or expired policy, or an unresolved identity allow the call even in enforce mode and are logged as failures.
- If the daemon is down or too slow or returns unreadable output, Kontext returns no decision and the agent's own permission settings apply.
- Supports Claude Code, Cowork, and Codex
- All three block only at the pre-tool-use hook.
- Self-serve setup currently supports macOS only.
- Every event goes into the ledger
- Agent, session, tool name, input, policy decision, and outcome are stored locally with sensitive values redacted.
- Model reasoning and full conversation history are not stored.
- Not a replacement for sandboxes
- Kontext provides semantic policy and attribution and does not claim kernel-level isolation.
- Use a sandbox when you need process, filesystem, or network containment.
Community Reactions
- Question about the OSS/paid boundary
- One comment asked whether the OSS CLI is just the client for the paid service.
- The commenter also asked about the custody model and whether credentials are stored by the service.
- eBPF alternative suggested
- One comment suggested monitoring network I/O and rewriting requests on the fly with real tokens and signatures.
- The agent would only hold placeholder tokens, so existing libraries keep working.
- Concern about agents reading or leaking keys
- Commenters asked what stops an agent from reading or leaking a key injected into its environment.
- Another asked whether a process running as the same user could extract the key from memory.
- Requests for comparison with similar tools
- Comments pointed to OneCLI and Tailscale Aperture and asked how Kontext differs.
How to Apply
- Install in observe mode first
- On a personal Mac, run brew install kontext-security/tap/kontext and then kontext setup.
- Run kontext doctor to verify hooks and daemon, then use Claude Code normally for a day.
- Mine would-deny records for policy candidates
- Pick ledger entries for destructive commands, sensitive files, production operations, and credential access.
- Drop anything that would block legitimate work and decide what to enforce.
- Pair it with a sandbox
- In team agent environments, use Kontext for allow/deny decisions and a sandbox for file and network isolation.
- Design around fail-open behavior
- Calls are allowed when the daemon is down or the policy expired, so add kontext doctor to your health checks.
- Also set critical blocks in the agent's own permission settings as a second layer.
Try It
# Run in Terminal (macOS): install Kontext and check status
brew install kontext-security/tap/kontext
kontext setup # needs an install token from the dashboard
kontext doctor
# If something is wrong: kontext doctor --fix
# Uninstall: kontext setup --uninstallTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques