Skip to content

Feature: Choose past ACP sessions and restore conversation history in a focused fullscreen picker - #154

Merged
DevMando merged 4 commits into
mainfrom
feature/acp-session-history
Dec 4, 2026
Merged

DevMando merged 4 commits into
mainfrom
feature/acp-session-history

Conversation

@DevMando

@DevMando DevMando commented Dec 4, 2026

Copy link
Copy Markdown
Owner

What this solves

Returning to an ACP conversation previously meant continuing only the last remembered session, often with none of its earlier messages visible. Users can now choose an earlier conversation for the current project and see its recent history when the agent supports loading it.

User experience

  • /acp-agent <name> --resume discovers this folder's saved sessions. One session continues directly; multiple sessions open a dedicated picker. Escape keeps the current agent and conversation unchanged.
  • The picker shows readable titles and local update times, with keyboard navigation and paging. Workspace, agent, and model bars are hidden while choosing; controls sit at the lower-right corner. Normal navigation returns afterward without remounting the conversation.
  • /acp-agent <name> --resume <session-id> continues a specific session, including with --new-panel. IDs are treated as data and stay out of the picker; /acp-agent sessions still lists full IDs. The /agent-acp spelling remains supported.
  • History loading is preferred when available. Earlier user and agent messages, completed tool activity, and plans appear between separators. Input typed while loading waits, then follows the restored history without sending the replay back to the agent.

Compatibility and limits

Agents that support resuming but not history loading retain their context without displaying earlier messages. Agents that cannot list sessions use the last locally remembered session for the folder. If no session is available, a new conversation starts. An adapter refusal is reported with a warning and the existing new-conversation fallback.

Discovery does not create a conversation. The picker filters by folder, removes duplicate IDs, follows bounded pagination, and shows up to 100 choices. Visible replay is limited to 40 recent turns and 240 entries, with bounded text and tool content; these display limits do not remove anything from the agent's own memory. Replay does not execute tools or request permissions.

Validation

  • Full .NET 10 Release suite before the final fullscreen refinement: 2,069 passed, 1 existing skip.
  • After that refinement: all 71 relevant workspace, explorer, and terminal layout checks passed, including real terminal-paint assertions for the bottom-right controls and chrome restoration without disposing the conversation.
  • Release builds completed with 0 warnings and 0 errors.
  • Automated coverage includes adapter discovery, folder filtering, pagination loops, single/multiple-session choice, cancellation in current/new-pane flows, explicit opaque IDs, resume-only fallback, load preference, bounded history, replay-time permission suppression, reused tool IDs, and input delivered once after replay.
  • Manual testing confirmed the Claude picker/history flow, the revised fullscreen layout, and successful Codex resume after releasing a session held by another client. The session-in-use warning correctly distinguished that case from a folder mismatch.

Review organization

Four detailed commits separate session discovery/history services, resume-command and pane integration, the fullscreen picker UI, and documentation/release notes. No new standalone ACP guide was added.

Closes #145.
Related to #144. Editor-facing ACP agent mode is tracked separately in #153.

…y loading

Discover saved sessions through a trusted, read-only adapter connection without creating a conversation. Filter by project folder, remove duplicate or invalid IDs, follow bounded pagination, stop repeated cursors, and offer up to 100 sessions ordered by update time. Keep opaque IDs separate from readable titles and local date captions, with remembered-session fallback for agents that cannot list sessions.

Prefer session/load when available so resumed conversations replay earlier messages; retain session/resume behavior for adapters without loading support. Collect a bounded display of recent user and assistant messages, completed tool results, and plans. Merge tool updates within their turn, preserve reused IDs across different turns, and omit unfinished activity and private thoughts.

Reject permission prompts during history replay and keep replay outside the active prompt loop. Add mock-adapter and protocol regressions for read-only discovery, load preference, resume-only fallback, pagination, local dates, selection cancellation, opaque IDs, and history size limits.
… conversation

Extend --resume to accept an optional opaque session ID and pass it through both current-pane switches and --new-panel. Resolve the selection before replacing the active agent or opening another pane, so Escape leaves the runtime, transcript, and pane count untouched. Preserve the selected project folder and allow explicit IDs even when local persistence is disabled.

Connect discovery to the existing prompt gate and cancellation lifecycle. Cancel pending selection when the pane closes, retain independent new-pane behavior, and keep the remembered session updated through the existing session-start notifications.

Render restored user messages, replies, completed tools, and plans between history separators, with a notice when display limits trim the replay. Queue newly typed input until loading completes and append it after restored messages without resending those messages to the agent. Cover cancellation, direct IDs, folder retention, replay rendering, and queued-input order through the real pane command paths.
Replace the bottom approval menu with a dedicated session panel showing readable conversation titles and local update times. Keep IDs out of visible rows while returning their exact values on selection, support arrows, Home/End and page navigation, and preserve selection across presentation remounts.

Hide workspace navigation, agent navigation, model/settings chrome, and tips while selecting a session. Reclaim the freed rows, anchor continue/cancel controls to the lower-right viewport edge, and restore normal chrome without disposing or remounting the conversation.

Add component and real terminal-paint regressions for hidden IDs, small layouts, scrolling, selection and cancellation, footer coordinates, and stable conversation identity when chrome hides and returns. Validation: 2,069 tests passed with one existing skip before the final fullscreen refinement; all 71 relevant workspace, explorer, and terminal layout checks passed afterward. Manual Claude and Codex picker/resume testing also succeeded.
…llbacks

Update the README ACP workflow with the session picker, explicit session IDs, new-pane support, local timestamps, fullscreen controls, and plain listing of full IDs. Explain history replay limits and that trimming the visible history does not trim the external agent memory.

Document the resume-only and no-list fallbacks, display-only replay, cancellation behavior, and queued input. Add release highlights and validation coverage for the backend, pane integration, fullscreen layout, and successful manual testing.
@DevMando
DevMando merged commit 16b08f6 into main Dec 4, 2026
2 checks passed
@DevMando
DevMando deleted the feature/acp-session-history branch December 4, 2026 08:09
@DevMando DevMando mentioned this pull request Dec 4, 2026
8 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: ACP: resume sessions: choose a session and show its history

1 participant