condensate

Security

What stays on your Mac, and what agents never see.

On this page

Condensate runs your agents, their work and your model logins on machines you own. Each agent starts with placeholders in place of your logins, one process refreshes every login, a task spends only what its workspace allows, and a policy check that can't answer refuses the call.

Logins agents never hold

Each agent starts with a placeholder token, never your real model login. The credential proxy swaps in the real token as the call leaves the machine for the provider. A proxied agent holds placeholders for its GitHub token and its Notion and Linear keys too, and the proxy swaps those the same way. The proxy is on by default, and the runtime, the service that runs your agents and keeps each thread's record, refuses to start without it unless you set CONDENSATE_PROXY=off.

Before it starts an agent, the runtime checks the agent's environment and login files. It refuses the agent if the environment names no HTTPS_PROXY, so its calls would not reach the proxy. It also refuses an agent whose environment holds a real model token such as CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY or OPENAI_API_KEY, or sets the runtime's GitHub App settings. A Claude Code agent is refused when its config directory holds a .credentials.json, and a Codex agent when its auth.json holds a refresh token or a real access token, ID token or API key. The refusal names the engine, the account and the variable or file, and never the value.

Logins refreshed in one place

The broker, one process inside the runtime, refreshes every login. A refresh token can be spent only once, so the broker takes a lock in its own process and a lock file against other processes on the machine before it refreshes. It sends the refresh only to an approved provider endpoint, checked again just before the request leaves, and a redirect counts as a failure. It saves the new token only if the token it spent is still the stored one, and if the save fails the new token goes to a recovery file, so a crash mid-refresh doesn't make you sign in again. A failed refresh reports only the provider's status code, never a token.

Spending only what a workspace allows

A task spends only the accounts its workspace allows and runs only the models the workspace lists, and a start that breaks either is refused before it runs. When every allowed account is out, the runtime answers NoSpendableAccount rather than borrow one from another workspace. Your own programs follow the same rules through POST /v1/chat/completions. Workspaces and Accounts list the refusals.

A policy check that fails closed

The Condensate plugin sends Claude Code's and Codex's hook events to the middleware. If the middleware is down, slow or misconfigured, or the plugin has no CONDENSATE_KEY, the UserPromptSubmit and PreToolUse events are denied with a reason that names the fault. Stop and the events of tools that already ran can't deny, so they run and the hook writes one warning line. CONDENSATE_HOOK_FAIL_OPEN=1 allows every event on a fault, which removes the policy check, so use it for local development only.

The runtime attaches its own agents to the middleware once a key file is in place. The middleware covers what happens without one.

Pushes go through gt-review

When a build agent's turn, one message to it and its full reply, ends with commits GitHub doesn't have, the runtime doesn't run git push. It asks gt-review, the review hub that serves pull request review for each repository, through its POST /api/ship route, which chooses the identity, runs its checks, and pushes. The identity is the GitHub App where the App is installed on the repository with write access, and otherwise the account the workspace assigns to the repository. A refused push changes nothing on GitHub. The commits stay in the agent's worktree and the refusal names the check.

gt-review refuses the push, in this order, if:

  1. the repository server that received the request runs from an agent's worktree, not from gt-review's own checkout;
  2. the repository is not in the workspace the request names;
  3. the GitHub App covers the repository but lacks write permission, or no usable credential exists;
  4. the agent is the fix agent in a pull request review that is set not to push fixes on its own, and no person has pressed Push on one of the review's findings;
  5. the branch belongs to someone else. Its pull request's author, or for a new branch the author of each unpublished commit, must be one of the identities gt-review acts as;
  6. the branch name is not a valid git ref name;
  7. gt-review's copy of the branch and GitHub's copy have each moved on from the other;
  8. the agent's commit is already inside the commit gt-review would push, or does not build on it;
  9. the branch's pull request is merged or closed. The refusal says to move the new commits to a fresh branch;
  10. the push would make GitHub mark another open pull request as merged, and that pull request carries the needs-noah label or targets a branch other than the repository's default branch or anti-slop, Condensate's integration branch.

Checks 7 and 8 mean the pushed commit always builds on what GitHub has. The push uses git push --force-with-lease with the commit gt-review read from GitHub, so it fails if the branch moved in the meantime, and gt-review never replaces history on GitHub. After the push, it opens a pull request for the branch when it has no open one.

An agent in a Kubernetes pod can't push at all. The proxy in its pod swaps its GitHub token in for reads only, so a push reaches GitHub without a real token and is refused. When the agent submits, the runtime pulls its branch out of the pod as a git bundle and sends it to gt-review. gt-review refuses the bundle if git doesn't accept it, if it carries anything but the agent's one branch, if that branch isn't at the commit the agent reported, or if its commits don't build on the commit the pod was cloned from. A bundle that passes goes through the ten checks above.

Nothing blocks a hand push on the runtime's own machine. An agent that runs as a local process and runs git push in its own shell skips these checks. Its instructions tell it not to, and no code enforces that.

Every request that passes checks 1 and 2 writes one log line with the scope ship, whether it pushed or not, naming the workspace, the repository, the requester and the result. GET /api/logs?scope=ship on gt-review shows them until it restarts.

gt-review can also require a token for every change. With GTR_REQUIRE_ADMIN_TOKEN=1, it refuses each POST, PATCH and DELETE to a repository server that doesn't carry an x-gtr-admin-token header matching GTR_ADMIN_TOKEN. It is off by default.

Where the data lives

The runtime, your agents, their worktrees and every thread's record stay on your machines. Threads are stored in threads.db, a SQLite database in the runtime's data directory, ~/.condensate/agents-host by default. Status lists what works today.