Repository navigation
Conversation
axel7083
left a comment
There was a problem hiding this comment.
I've tested this very needed feature by building the branch, and got successfully the expected sessionUpdate: "plan" here is the message received asking the model to write a dummy plan.
{
"jsonrpc": "2.0",
"method": "session/update",
"params": {
"sessionId": "ses_11070d3a4ffe3x3imKODsXLp0q",
"update": {
"sessionUpdate": "plan",
"entries": [
{
"content": "Explore the codebase to understand project structure",
"status": "pending",
"priority": "high"
},
{
"content": "Identify relevant files for implementing the new feature",
"status": "pending",
"priority": "medium"
},
{
"content": "Implement the new feature according to specifications",
"status": "pending",
"priority": "high"
},
{
"content": "Write unit tests for the newly implemented feature",
"status": "pending",
"priority": "medium"
},
{
"content": "Run all tests and lint checks to verify changes",
"status": "pending",
"priority": "high"
}
]
}
}
}ℹ️ We still receive the event tool_call for the todowrite, but I guess its fine?
| // When a turn ends, any entry the agent ever started during the session | ||
| // should be considered done — either it really was finished (model forgot to | ||
| // mark it completed) or the model demoted it back to pending without | ||
| // updating it again before stopping. Both render as a non-checked item in | ||
| // ACP clients, which contradicts the visible reality that work stopped. | ||
| // Genuinely planned-but-never-started entries (status: pending and never | ||
| // in_progress) are left alone so future plans still render correctly. |
There was a problem hiding this comment.
It is not specified in the official spec https://agentclientprotocol.com/protocol/v1/agent-plan that on end turn / idle the plan must be completed.
Looking at the claude-agent-acp implementation (this is the project made by Zed maintainer, to wrap the Claude Agent sdk for the ACP protocol), they don't seems to be doing the cleanup, only updating the plan based on the SDK TaskCreated and TaskCompleted hooks[^1].
[^1] https://github.com/agentclientprotocol/claude-agent-acp/blob/e9140a035a3465da02b3f55873bc6f6ec193c83a/src/acp-agent.ts#L1943-L1961
I would say that the "cleanup" is probably not needed 🤔
The agent may require user input, and ask something by ending the turn, with the current implementation all the plan would be marked as completed, which is probably not expected
cc @smagnuso
There was a problem hiding this comment.
I thought I had observed that it was happening on other agents, is it possible claude sends it internally and thus claude-agent-acp doesn't have to? Either way I'm not against removing it if unnecessary just seemed like it should close out.
|
Came here from the same gap — I independently arrived at the same core ( On the open thread: I'd drop the If you're low on bandwidth I'm happy to open a PR against this branch that removes the idle cleanup and rebases onto current |
262d150 to
72ea856
Compare
|
Updated the PR |
|
Hello, CI checks are green ✅ and all open discussions seem to be resolved. Could someone with merge permissions (e.g., @nexxeln, @thdxr, or other maintainers) take a final look and approve if everything looks good? Also, could a maintainer please approve the workflows so that the CI checks (e2e, typecheck, unit) can run? This feature would be a valuable addition for ACP clients. Thanks! |
|
I need this too. |
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Issue for this PR
(I reopened this because I somehow got #30658 closed)
When working on hydra-acp I noticed that I was not getting plans rendered in opencode as I had in claude.
Closes #30659
Type of change
What does this PR do?
Translates todowrite tool calls into ACP SessionUpdate::Plan notifications so ACP clients (Zed, JetBrains, Hydra, etc.) can render a live plan/todo panel. This is the same data ACP clients receive from Claude Code today; opencode already produces the structured input but the ACP bridge never forwarded it.
How did you verify your code works?
Ran a prompt in in hydra-acp that created a plan:
create a plan with 5 items in it each run ping -c 1 www.google.com check off items as you complete them
Checklist