The plan page resumes the agent that wrote the plan (#1511) - #1717
Merged
Conversation
A plan is written by an agent, and the way to discuss it is that agent's own session — the composer there continues the same conversation, with the plan and the ticket already in its context. The plan page now finds that agent from the framework's records (the newest whose ask was the plan: the plan-ask sentence, given directly or carried in a pinned queue drain) and offers "Resume agent", which opens its session; one still running is offered as "Open agent". The plan file carries no marker of its author. The `## Agent` section the ticket proposed cannot be written by the agent itself — the driver only learns the session id from the run's output stream after it starts — so the link is made from what the framework already records instead. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Dogfooded on the real dashboard (
🤖 automated · Fable 5, effort high |
Closed
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.
Fixes #1511.
What
A ticket's plan page now knows who wrote the plan and offers Resume agent, which opens that agent's session — the composer there already continues a finished agent in place (same session, same branch, local or web), so the conversation picks up with the plan and the ticket in the agent's context. While the author is still running the button reads Open agent and the note says the plan is being written. A plan with no recorded author shows neither.
The
## Agentsection the ticket proposed is not added. Correction to what I first wrote on the issue: the agent can learn its own id — Claude Code exportsCLAUDE_CODE_SESSION_IDinto the agent's shell (checked on 2.1.246), and the drain-written plan for this ticket had already found that. The reasons for not writing the section are the remaining ones: it would need a prompt change and rely on the agent remembering to do it (a forgetful agent = a silently missing section), it is Claude-Code-specific while the records cover every driver, and it would commit a machine-local resume command into the repo. The framework's own records already carry the link, on the data branch, for every driver — so the button reads those.How
src/tickets.tsplanAgentFor(agents, file): the newest agent whoseintentcontains the plan ask (Create tickets/<stem>.plan.md) — the plan column's attended start verbatim, or a pinned queue drain's prompt carrying the entry. Not attributed: a single unpinned drain (its intent is the stock "first open entry" prompt), an implementation run linking the ticket, another ticket's plan.src/dashboard-rpc/reads.tsonPlanAgent(projectId, file)→{ agentId, status } | null, overreadAllAgents; unknown project →null. Exported throughdashboard-rpc/index.tsand stubbed indashboard/rpc/reads.ts.dashboard/components/TicketPlanPage.tsx: polls it (10s, like the plan text), renders the author row above the markdown with a tooltip; newonOpenAgentprop, wired inApp.tsxtoselectAgent.Tests
tickets.test.ts: newest matching ask wins (attended sentence and drain prompt both match); another plan, an implementation link, no ask, and an unplanned ticket do not.reads.test.ts: unknown project →null.TicketPlanPage.test.tsx: known author → "Resume agent", clicking it opens that agent; running author → "Open agent" only; no author → no control; the existing three still pass.Specs
src/tickets.SPEC.md+tickets.test.SPEC.md,src/dashboard-rpc/reads.SPEC.md+reads.test.SPEC.md,dashboard/components/TicketPlanPage.SPEC.md+TicketPlanPage.test.SPEC.md,FEATURES-SPEC.md(Tickets).🤖 automated · Fable 5, effort high