Repository navigation
heed hands agents its messages through their inbox, and types only when there is none - #239
Merged
Merged
Conversation
A message for an agent now picks the best way in: Claude Code's cross-session inbox (the Unix socket each session binds and exports to its hooks as CLAUDE_CODE_MESSAGING_SOCKET), codex's `codex queue`, or typing as before. Delivery.route picks, Delivery.resolve says what came of it (delivered, queued, typed with the reason, waiting, failed), and a refused or dead channel falls back to typing under Delivery.verdict. Claude's hook passes the inbox path on SessionStart, UserPromptSubmit and Stop. Messages name a reply socket beside the session's, where Claude Code reports a message it held for approval or refused; silence means delivered. Checked against Claude Code 2.1.319 in throwaway sessions. Tests cover the choice, the fallback, the wire format and a fake inbox over real sockets. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The continue prompt, PR feedback with run_in = "session", queued notes, items added from GitHub, the inspector's loose ends, heed send, swarm hand-overs and lead nudges all go through sendToAgent: the pane's channel, else typed when Delivery allows. Where each went is on the session's activity, the status line, the pilot log and swarm rows; heed send's reply carries it too. Allow on a permission notification still presses Return: no channel can answer a prompt. Settings: [sessions] claude_inbox (on) and codex_queue (off). Panes start with CLAUDE_CODE_MESSAGING_SOCKET empty so an inherited inbox is never taken for the pane's own. notify(session:text:) is the entry point for heed's own features. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A page on Claude's inbox (what Claude Code does with heed's messages, held and refused, the reply socket, claude_inbox), codex's queue and why it is off by default, why the other agents are still typed to, and notify(session:text:) for heed's own features. Hooks, heed send, run in session and swarm steering point at it. The settings shot and the config reference are regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 13, 2026
… you can watch, steer and close it out (#240) heed's work on a PR used to run as a background tab or typed into your session. Now heed works out each item's next step, you approve it once (or always for the repo), and a **helper** does it: a bounded agent run heed starts over ACP in its own worktree and draws itself. ## Attention - Each row says its next step (▶ heed is getting it green, next: start a review, waiting on others…). - The reader has one proposal: **`D` do it**, **`Y` do it and turn it on for this repo**, **`.`** another step. `↩` still opens the reader. - Per item: someone else's PR → start a review (posts nothing until you send); an issue tagging you → draft a reply (nothing when it's yours and you spoke last); your PR → get it green / merged; a repo without Autopilot → set it up; an assigned issue → start work. - The helper opens in a split under the reader, in the right column: the agent's plan, its story with small diffs, inline allow / deny, files, tokens and cost against a cap, a steer box (`i`), pause (`p`), stop (`zx`), zoom (`zo`). - Close-out: what it did, the replies heed will post; **Push and reply** (`⌘↩`), Push only (`P`), Keep going, Throw away (`X` twice). ## Autopilot › Now and sessions - A live tile per helper: what it's doing now, progress, files, its last tool calls, an approval if it waits; `↩` opens it. - A session tracking the PR gets a band (watch it `gW`, take it over `gO`) and a note through its inbox where it has one (#239's `notify`, never typed: no channel → band only). - Get it green runs as a helper by default (`[pilot] run_in = "helper"`); `session` and `background` still work per org and repo. `[helpers]` agent, command, spend_cap ($0.50). ## ACP - A small ACP v1 client (schema v1.31.0): initialize, session/new, prompt, cancel, session/update (plan, tool calls, diffs, chunks, usage_update), request_permission. heed offers no fs/terminal methods. - Adapters as they are named now: `@agentclientprotocol/claude-agent-acp` (`claude-agent-acp`), `@agentclientprotocol/codex-acp`, `opencode acp`, `gemini --acp`. heed never installs one; when missing, it shows the install command. ## Verified - `mise run test`: 2000 pass (incl. a child-process test against a script speaking ACP); lint clean; tutor-check 0 problems; all shots regenerated. - Not tried for real: any real ACP adapter run, so no live push / reply / review; a live inbox note from a helper. - Known limits: pause and steer cancel the turn and prompt again (ACP v1 can't add to a running turn); the spend cap needs the agent to report cost (else the run timeout stops it); a posted review is one body with path:line references; helpers live in memory (a restart loses them; their history and branches stay); Now has no "up next" section yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 14, 2026
…posal in the reader (#243) Follow-up to #239–#242, from looking at the real screens. - **The session's helper line**: the band at the top of a session's panes becomes one line at their foot, above the status bar, however many helpers work on the session's PRs ("▶ 3 helpers on this session's PRs · #2841 needs your OK · #1920 step 2 of 3 · ✓ #2836 pushed a3f9c1d · pull before your next change"). Needs you first, then working, then waiting; amber only when one needs you; a short highlight when a run changes step or finishes; a finished run stays until seen (you left the session after it finished, or ✕). `gW` watches the one run, or opens a list (j k, ↩ watch, gO take over, x dismiss a finished one). `SessionHelperLine` in HeedCore, with tests. - **Attention rows** are two lines again: the next step sits right-aligned on the chips line, short (▶ merge it, ▶ review, ▶ green + merge, ▶ set up, ▶ start, ▶ reply, ▶ resolve, ▶ heed is on it), and only when heed would act. - **One proposal in the reader**: the seven-button row folds into Other (`.`), a menu with the other steps and Review / Reply / its session / Done / Snooze / Mute / GitHub with their keys (picking a step makes it the proposal; D runs it). Every key still works. Items with no step, or with a helper split open, get a slim actions line. - **Fake world**: get it green runs as a helper there too; the old background run only appears in the shots of the pages documenting that mode. - A shot-renderer fix: the inspector no longer pushes the centre column below the window (it hid the new line), so most shots changed. Verified: `mise run test` 2063 pass (breaking the seen check and the ordering fails the new tests), lint clean, tutor-check 0 problems, every shot regenerated and the key ones checked by eye. Not tried: the highlight animation and clicks in a live window. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 22, 2026
…'s inbox (#313) ## What After a resume, a session that was mid-turn is nudged with \`continue_prompt\`. Since the inbox work (#239) and the hardening that followed, that nudge went through Claude's cross-session inbox. Claude can hold such a message for approval in the session (sessions that bypass permission prompts, or \`crossSessionInbound = \"hold\"\`), heed counts a held message as sent, and nothing retries, so a resumed agent could sit idle waiting for an approval nobody knew about. - The continue prompt is typed into the pane again (\`viaChannel: false\`): the resumed agent is idle and nobody is typing there. Other deliveries are unchanged. - A continue that could not be sent is now recorded on the session (\"did not send … after the resume · why\"). Before, nothing said so. - \`docs/agents/messages.md\` says the continue prompt is the one message that is always typed. ## Checked - Build passes; the Delivery, Resume, Hook and Channel tests pass (they do not cover the changed lines, which are in the app target). - **Not reproduced:** I had no session to resume on this Mac and did not run a live resume, so this rests on reading the code and docs. If a resumed session's activity shows \`sent “Continue where you left off.” · queued in Claude's inbox\`, that confirms the cause. - Not addressed: an agent that does not launch at all after a resume (nothing found in the launch path), and a manual resume of a session that was not mid-turn, which by design gets no continue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Almost everything heed sent an agent was typed into its terminal, gated on a guessed idle state, with no acknowledgement. Now each send picks the agent's real channel when it has one and records what happened.
Channels
[sessions] claude_inbox): one JSON line to the session's socket (CLAUDE_CODE_MESSAGING_SOCKET, passed on by heed's hook on SessionStart, UserPromptSubmit and Stop). Claude queues it itself, so it goes even while the agent works; it can never approve a prompt or change settings. Receipts come back to a reply socket heed binds beside the session's (held→ queued for your approval in the session,expired/refused→ falls back to typing when allowed). Messages start with "From heed, …".codex queue(off by default,[sessions] codex_queue): stored, recorded as queued.Where it applies
Continue prompt after resume, PR feedback in the session, queued notes, added items, the inspector's tackle prompt, the control socket's
send(its reply gainsdelivery), swarm messages and lead nudges all go throughsendToAgent. Allow from a notification still presses Return: no channel can answer a prompt (approvals are their own PR).Outcome
DeliveryOutcome: delivered, queued, typed (with why), waiting, failed — recorded in the session's activity, the status line, the pilot log and swarm rows.notify(session:text:)is there for helpers to tell a session what they did.Notes
CLAUDE_CODE_MESSAGING_SOCKET/_TOKENset empty so it never inherits an inbox from where heed was started; the token isn't used (heed isn't one of the session's processes)./tmp/cc-socks/heed-<pid>.sock), the only place Claude answers; stale ones are cleaned up.Verified
mise run test: 1974 pass; lint clean; tutor-check 0 problems. MutatingDelivery.routeandDelivery.resolvefails tests.claude -psessions (temp config, fake key, no model calls), including heed's own transport against held and refused sessions.codex queueagainst a running TUI, the rewired call sites in the running app.🤖 Generated with Claude Code