condensate

Connect the agent tools you already use

One policy and one tool gateway under Claude Code and Codex.

On this page

Keep running Claude Code and Codex the way you do today, and put Condensate underneath them. Once you install the Condensate plugin, each CLI sends its hook events to the middleware, a policy service on your machine, and gets its tools from one MCP gateway.

One set of rules for both CLIs

The middleware answers each hook in that CLI's own format, so a rule you write once covers Claude Code and Codex. A tool named in CONDENSATE_GUARD_TOOLS is blocked before it runs, and the agent is told why.

The middleware never keeps the text of what an agent did. For each session it holds counters and short hashes of tool calls, commands, results and edited files, which is enough to notice a pattern without reading your code.

Course corrections while the agent works

Rule-based checks watch each session for signs of trouble, such as the same tool call repeated with the same arguments, edits that undo each other, results that stop changing, a stop while tasks are still open, a reply that claims the work is done without evidence, or a shell pipeline that hides a failing exit code. None of them calls a model.

When a check fires, a short note goes into the agent's next message. The agent reads a correction, and you see one line saying what was sent.

How far a verdict may go

A verdict is what the middleware decides to do about something it noticed. How far it may go is set per principal, where a principal is the signed-in user, or, with sign-in off, the local key the hook sends. Each tier allows everything above it in the table.

TierWhat a verdict may do
ObserveChecks run and log what they found. Nothing reaches the agent.
AnnotateA verdict is written into the session record, and a guarded tool call can be denied.
SteerA note is added to the agent's next message.
AutonomousThe middleware can also tell a session that stopped too early to keep going, and interrupt one that ignored earlier notes.
SupervisedA model reads session content and writes notes. You turn it on per principal, and it can never be the default.

With CONDENSATE_CONSENT_TIER unset, the middleware acts at Autonomous. The middleware shows how to set a tier.

Checking whether the notes help

You can hold out a share of steered sessions as a control that runs at Observe. A session's group comes from a hash of its id, so it stays in one group across restarts. Every verdict goes to a ledger file when CONDENSATE_LEDGER_PATH is set, and the eval report counts sent, held-out and suppressed verdicts for each rule, so you can compare the two groups.

If the middleware is down

The hook fails closed. When it cannot reach the middleware or gets a bad answer, it denies the prompt or tool call and names the fault. Events that cannot deny, such as a tool that already ran, continue with a warning. CONDENSATE_HOOK_FAIL_OPEN=1 lets everything continue, which removes the policy check, so use it for local development only.

One tool gateway

You list your MCP servers once in the middleware's configuration, as HTTP servers or stdio processes. Each CLI connects to one address, http://127.0.0.1:4787/mcp in the developer setup, with one local key in a header, and sees every server's tools as one catalog. Tools are named upstream__tool, so a read tool on the tools server is tools__read. The gateway answers 404 until at least one server is listed. Connect an upstream has the configuration.

Logins the agents never hold

By default the runtime holds your real Claude and Codex logins and agents hold placeholders, each starting with proxy-. A proxy swaps in the real token on the way out to the provider, and the runtime refuses to start an agent whose environment or login files carry a real credential. The refusal names the variable or file, never the value. The runtime refreshes each login itself, so agents never do. CONDENSATE_PROXY=off turns the proxy off, and agents then hold real logins. Security has the whole model.

Your own scripts on the same accounts

The runtime serves POST /v1/chat/completions and GET /v1/models, so judges, classifiers and helper scripts can use your agent accounts instead of separate API keys.

curl -fsS http://127.0.0.1:4741/v1/chat/completions \
  -H 'content-type: application/json' \
  -H 'x-condensate-workspace: YOUR_WORKSPACE' \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"Summarize this diff."}]}'

The workspace in the header decides which accounts the call may spend. If an account refuses before any text has streamed, the call moves to the next account in the workspace; once text has streamed it is never moved. When every account is out, you get a 429 that says why. Each call leaves a record of model, account, status, usage and cost on the workspace's completions thread, and never the prompt or the reply.

If you used the installer, the middleware is on port 24787 and the runtime on 24741 instead of 4787 and 4741.