Repository navigation
Done
Labels
enhancementNew feature or request
Description
Part of #144
#151 adds snapshot/recap handoffs and the compatible /acp-agent command spelling. The session chooser and earlier-history replay described below remain outstanding.
Problem
/agent-acp <name> --resumecontinues the agent's previous session and the agent keeps its context, but the pane shows none of the earlier messages, so the user can't see what was discussed or done.--resumealways resumes the last stored session for the folder. After starting a new conversation (or/clear) the older sessions still exist in the agent, but the user can't pick one.
Cause
- The resume path uses
session/resume, which does not replay history. The Claude adapter (@agentclientprotocol/claude-agent-acp0.103.0) advertisesloadSession: true, andsession/loadreplays the conversation assession/updatenotifications. - Only the last session id per folder is stored; the agent's own list (
session/list) isn't used for selection.
Proposal
History
- Prefer
session/loadwhen the agent advertisesloadSession; fall back tosession/resume(with the current "earlier messages are not shown here" message) otherwise. - Render replayed user turns (
user_message_chunk), agent text, completed tool calls and plans. No permission prompts during replay. - Replay must not count as an active turn (
HasActiveWork) and must not be re-sent to the agent; prompts typed during replay are queued. - Mark the replayed part with separator lines; cap the rendered part for long histories (last N turns) and keep the UI responsive.
Choosing a session
--resumewithout an id: ask the agent for its sessions for the current folder (session/list, follow the cursor, cap the number shown). One session: resume it directly. Several: show a selection list (title or first prompt, last-updated time, shortened id); Esc cancels without changing the pane.--resume <id>: resume that session directly (works with--new-panel). The id is treated as an opaque string, validated, and never placed into a shell command.- If the agent doesn't advertise
session/list, keep using the stored last-session id and say that choosing isn't supported by this agent. /agent-acp sessionsstays a plain list and shows the full id. Update the stored last-session id after a resume, after/clearand after a new session.
Acceptance criteria
- Resuming with the Claude adapter shows the earlier conversation in the pane; agents without
loadSessionkeep today's behavior and message. - Picker result, direct id, single session, no
listsupport and cancel are covered by tests (mock agent with several sessions and a load/replay scenario). README.mdACP guidance updated (the standalonedocs/acp.mdguide was retired).
Reacted by Mando
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity