AI
Coding agents and the Agent hub
See what your AI coding agents are doing across every terminal, answer them without reading raw output, and run them at scale.
Synapse can run any command-line coding agent - Claude Code, Codex, Gemini CLI, Grok CLI, Aider, OpenCode, Cursor Agent and others - in a normal terminal pane. The Agent hub and Agent workflows services build on that to watch, answer and coordinate them. Switch either on in Services.
Agent hub
With Agent hub on, Synapse watches the visible screen of every terminal running a recognised agent and works out its status: working, idle, waiting for your input or approval, hit a usage limit, errored, or exited. For status straight from the agent, set up exact status on the host.
- A "needs you" badge and, if you want, a desktop notification and sound appear when an agent needs input, approval, hits an error or a usage limit - configured in Settings > AI > Agent hub, including a "quiet while I'm looking" option that skips the alert if you're already looking at that pane.
- The Agent dashboard (Ctrl+Shift+A) lists every agent across every host and session, with its status, last activity and current prompt, and lets you answer a waiting question without leaving the dashboard.
- Focus view replaces a pane's raw terminal output with a calm summary of what the agent is doing and a clear box for its current question - "Show terminal" is always one click away back to the real thing.
- Resume scans a host in the background (nothing is typed into your terminal) for agent sessions already running inside tmux, which you can reattach to, and recent Claude Code or Codex conversations you can resume from where they left off.
- Transcripts keeps a readable, searchable record of your conversations with agents, with secrets hidden, stored on this computer - turn it off in Settings if you'd rather nothing is saved.
- The prompt composer (Ctrl+G, while an agent's pane has focus) opens a proper text box for writing a prompt, with buttons to insert your current terminal selection or a file path, and a history of recent prompts to reuse.
Exact status (hooks)
Reading the screen works with any agent, but a new version of a CLI can change what its screen looks like. For exact status, the agents can tell Synapse themselves. Turn it on per host in Settings > AI > Agent hub > Exact status (hooks), or from the link under the agent in the launcher, while a session to that host is open.
Synapse shows every change before it writes anything. It adds a short script,
~/.synapse/agent-hook.sh, and small hook entries that run it, merged into each
agent's own settings without touching yours. The script prints an invisible escape sequence
(OSC 777;synapse-agent) that the terminal reads: which agent, what happened, and
the agent's session id. It never reads or sends your prompts, files or command output.
Remove from this host takes out exactly what was added (your own hooks and
settings stay) and deletes Synapse's files. A record of what was added is kept in
~/.synapse/agent-status.json.
| Agent | Where | Exact states |
|---|---|---|
| Claude Code | ~/.claude/settings.json hooks | Working, needs approval, has a question, done, error, usage limit |
| Codex | ~/.codex/config.toml (notify and TUI notifications) | Needs approval and done; working is still read from the screen |
| Gemini CLI | ~/.gemini/settings.json hooks | Working, needs approval, done |
| OpenCode | ~/.config/opencode/plugins/synapse-agent-status.js | Working, needs approval, done, error |
Agents with exact status show an Exact tag in the Agent dashboard. Anything a hook doesn't cover, and every agent without hooks, falls back to reading the screen. A notification an agent sends to the terminal itself (OSC 9 or OSC 777, as Codex's TUI notifications do) and the terminal bell also count as a hint that it wants you.
- Claude Code needs a recent version: it prints the hook's status sequence for the hook, which also works inside tmux.
- For Codex, Synapse sets
notifyonly if you haven't set your own, and turns on its TUI notifications as OSC 9 unless you've set those keys yourself. - Gemini CLI and OpenCode hooks write the status to the agent's terminal directly. Inside tmux (including persistent sessions), turn on
set -g allow-passthrough onso it gets through. - Exact status is for Linux and macOS hosts reached over SSH.
Alerts outside the app
Besides desktop notifications, Settings > AI > Agent hub > Alerts outside the app can send alerts to ntfy (a topic URL, with an optional access token), a webhook (a JSON POST, with an optional bearer token), or Slack and Discord incoming webhooks. For each target choose the events: needs you (approval or a question), done, and error or usage limit. Test sends a sample alert.
- An alert holds only the agent's name, the host's label, what happened and one short line of the question or task, with secrets removed by the same redaction as everything else that leaves your computer. Never terminal output.
- URLs and tokens are kept in the vault, not in settings. While the vault is locked, alerts outside the app wait.
- At most one alert per agent and event a minute, and ten per target every ten minutes. If a service asks Synapse to slow down, it pauses for as long as the service asks.
- "Quiet while I'm looking" applies here too.
Host alerts (off by default) let the exact status hooks send the alert themselves
with curl, so it arrives even while Synapse is closed. Turn it on in the Exact status
window and pick one of your targets: its URL and token are then stored on that host in
~/.synapse/agent-notify.conf, readable only by your user (and root), so only do this
on hosts you trust with them. Host alerts say which agent needs you and the host's label, nothing
else, at most once per kind of event every 30 seconds. The URL and token are passed to
curl on its input, so other users on the host can't see them in the process list.
Structured mode (ACP)
Some agents - Claude Code, Codex, Gemini CLI and OpenCode - can run through the Agent Client Protocol instead of a plain terminal. When Agent hub is on and the matching adapter is installed on the host, launching one of these agents offers a Structured mode (ACP) toggle. It replaces the terminal screen with a proper chat: your messages and the agent's, collapsible thinking, a card for every tool action with its real status, a live plan with progress, and explicit Allow/Deny buttons for approvals - all driven by the protocol's own state rather than guessed from on-screen text. You can flip a pane between structured and plain-terminal view at any time.
Agent cost and budgets
With both Agent hub and AI usage and limits on, Synapse reads
what Claude Code and Codex use on your hosts from their own session logs
(~/.claude/projects and ~/.codex/sessions) - every 5 minutes and
when an agent finishes a turn, on hosts with a connected session. It reads only what's new
since last time, so a check is quick, and nothing is typed into your terminal.
- Only token counts, model names, message ids, times and the agent's working folder leave the server. A small shell and awk script picks those fields out on the host - your prompts, code and tool output are never read into Synapse.
- AI usage shows usage per source (Relay, smart input, Claude Code, Codex), per project, per host and per model, with a daily chart. The Agent dashboard's Cost tab shows today's cost per project, and each agent's row shows what it has used today.
- Costs for CLI agents are API-equivalent: what the tokens would cost at the provider's list prices. If you use Claude Code on a Pro or Max plan, or Codex with a ChatGPT plan, you aren't billed per token - set that agent and host to Subscription in AI usage to see tokens only.
- Budgets set a daily or monthly cap, in dollars or tokens, for a project, a host or all usage. You get a desktop notification and a badge on the dashboard at 80% and again at 100%.
- Block Relay requests over budget pauses Relay while a host or all-usage budget is used up. Claude Code and Codex run on your servers, so Synapse can't stop them - their budgets warn you instead.
Usage is kept on this computer for 31 days and is never synced. Estimates can differ a little from your bill: prices come from Synapse's model list (models without a price show tokens only), and long-lived prompt-cache writes are counted at the standard cache price.
Agent workflows
Switch on Agent workflows to run and review agent work at a larger scale:
- Parallel agents in git worktrees - start a new worktree and branch for a task, with an agent launched straight into it, optionally inside tmux so it keeps running if the connection drops.
- Review changes - a full diff view of a worktree's changes with line comments, an overall comment box, and buttons to commit, push or open a pull request (using the GitHub CLI on the host).
- Task board - a Kanban board that tracks a task from To do through to Done as the agent working on it makes progress.
- Scheduled runs - a repeating schedule (daily, weekdays, or every few hours) that launches an agent with a saved prompt. Schedules only run while Synapse is open; for one that runs without it, add it to the host's crontab instead.
- Plan review - read an agent's current plan, comment on individual steps, and approve it or send back your comments as a reply.
- Relay across all open sessions (opt-in) - see Relay assistant.
Agents on your phone
With the Sync between devices service on, Settings > AI > Agent hub has a "Show agents on my phone" toggle. Turning it on sends a short summary of your agents - name, host, status and any question waiting for you, secrets removed - to your paired phone, end-to-end encrypted through your sync mailbox, so you can answer a waiting agent without being at your computer. No terminal output is included.