Agents

heed starts each agent the way that agent expects, and learns its state through the channel it offers. This section is the plumbing. You can use heed without reading it.

Agents: each one wired up the way it actually works

Heed runs coding agents in real terminals and keeps track of what each is doing. Six are built in; any other command line agent can be added.

Agent Command Reports its state through Resumes with
claude claude Hooks passed with --settings --resume <id>
codex codex Hooks passed with -c hooks.<event>=… resume <id>
cursor cursor-agent A project hooks file Heed writes into the worktree --resume <id>
pi pi An extension passed with -e --session <id>
opencode opencode A plugin passed in OPENCODE_CONFIG_CONTENT its own session id
gemini gemini Nothing: Heed reads its screen --resume <id>

Heed starts an agent as the pane's own process, never by typing into a shell: your login shell runs the agent's command line, interactive so your config is read, then becomes the pane's shell when the agent exits:

Text
fish -l -i -c 'claude --session-id … "$HEED_PROMPT"
exec fish -l'

The line is written in your shell's own syntax: sh, bash and zsh get one quoting, fish (3.1 or later) its own. The agent runs in your shell by the name you configured, so your aliases, functions and environment for it apply. The prompt is never on the line: it is in the pane's environment as HEED_PROMPT, so a prompt over several lines, with quotes, $ or backticks, reaches the agent exactly as you wrote it. Only a worktree's setup runs under sh -c, before the agent. Heed reads your login shell each time a pane starts, so a shell changed with chsh is picked up. A shell Heed does not write the syntax of (nu, for one) gets the line run by sh, then the pane is handed to it.

What an agent cannot report, Heed reads from its screen. Each agent's command, prompt delivery, plan and resume arguments can be changed, and new agents added: see Custom agents.

Three pages that used to live here moved to Autopilot: Approvals, Helpers and the persona library, now Personas.

  • Hooks: what Heed passes to each agent, and why your own agent config never changes.
  • How Heed talks to agents: Claude's inbox, codex's queue, and when Heed types instead.
  • Reading the screen: guessed states, and the patterns behind them.
  • Custom agents: adding your own.
  • Models and effort: the models and reasoning efforts heed offers per agent, and how each takes them.
  • Model calls: Heed's own short calls (summaries, decisions), through the agents you are logged in to.
  • Screen snapshots: an opt-in, local-only record of what a pane showed at each reported state.