Skip to content

Make it a goal asks the session's agent for a handoff first - #267

Merged
Mpdreamz merged 3 commits into
mainfrom
feature/promote-handoff
Nov 16, 2026
Merged

Mpdreamz merged 3 commits into
mainfrom
feature/promote-handoff

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

What

"Make it a goal" from a session fed the new goal only the session's first prompt, hours stale. Now ↩ on the popover (goal.promote.go) first asks the session's agent for a handoff, and the plan step starts from it.

  • The handoff is short markdown with fixed headings: Work, Done (with PRs), Decisions, Open, Risks, Next. SessionHandoff parses it (any heading level and case, a few aliases, fences respected); it needs Work plus one more section.
  • Delivery reuses heed's one rule for messages (Delivery.route, via HandoffAsk.route): the agent's inbox where it has one (Claude's, which holds the ask), else typed only while the agent is idle or done and you have not typed there. A busy or typed-in session is never typed into; the ask waits and the popover says why.
  • Return path: heed goal handoff reads the markdown on stdin (--file also works). It goes over the control socket as a goal request, so the pane token vouches for the session; heed accepts it only while it is waiting, only from that session. An unreadable handoff is refused with why (exit 1) and the agent can try again.
  • UX: the popover shows "Asking claude for a handoff…", the agent's live state and what holds the ask up. s (goal.promote.skip, "Start without it") makes the goal as before; ⎋ cancels. Timeout ([goals] handoff_timeout, seconds, default 180, 0 = never ask), no agent pane, an exited agent, or a remote agent all fall back to today's behaviour with a note.
  • Plan step: the handoff is kept in GOAL.md as a ## Handoff section (headings as bold lines, because GOAL.md reads every heading level as a section), so it is visible and editable and every agent on the goal reads it. Its Work is the goal's statement, what it left Open becomes the found/planned parts, a card shows it above the conversation (e opens GOAL.md to edit), the planner's prompt includes it, and the TL;DR says the goal started from a handoff and how much was done/open.

Verified

  • swift test: 2464 tests pass (18 new: parsing, the fallbacks for timeout, skip, no agent, exited and remote agents, malformed handoff, the busy-session guard, the CLI verb, GOAL.md round trip, TL;DR, planner prompt).
  • Mutation: removing the "one more section" rule, the Work requirement, the .working and .blocked guards, the typing grace, and the timeout boundary each fail a test (restored after).
  • mise run lint, text-check, tutor-check (0 problems).
  • Shots rendered and looked at: sessions/make-it-a-goal-waiting, goals/wizard-plan-handoff.

Not verified live

Nothing here ran against a real Claude Code (no model calls were made): the ask arriving through a real inbox, a real agent running heed goal handoff, and the typed fallback in a real pane. mise run live only drives headless agents without a running heed, so it cannot cover the app side; see the report for how to check it by hand.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the enhancement New feature or request label Nov 15, 2026
Mpdreamz and others added 3 commits November 16, 2026 00:59
… the ask's state, the heed goal handoff verb and [goals] handoff_timeout

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… with the agent's live state, and starts the plan from it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Mpdreamz
Mpdreamz force-pushed the feature/promote-handoff branch from f3450fb to 3f1f55b Compare November 16, 2026 00:02
@Mpdreamz
Mpdreamz merged commit f818895 into main Nov 16, 2026
5 checks passed
@Mpdreamz
Mpdreamz deleted the feature/promote-handoff branch November 16, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant