Skip to content

ACP: replay prior events on session/load #4

Closed

Description

@JAORMX

What's missing

session/load restores a persisted session (Reopen → idle, history preserved) but does not replay the prior turns' events to the client, so a re-attaching ACP editor sees an empty transcript until the next prompt.

Validated (independent cross-check):

  • handleSessionLoad calls Service.LoadSession (→ GetSession + Reopen) and returns only loadSessionResponse{Modes:…}; it emits zero session/update notifications (internal/adapter/acp/agent.go, internal/adapter/server/service.go).
  • Restore-without-replay is documented deliberately in the code + docs/adr/0001-acp-adapter.md.

Proposed approach

On session/load, synthesize session/update notifications (agent_message_chunk / tool_call / tool_call_update) from the persisted Conversation history so the editor can rebuild the transcript. Self-contained to the acp adapter + projector. Medium — and the cleanest/most self-contained of the remaining items.

Part of ACP Phase 3 long-tail (docs/adr/0001-acp-adapter.md).

Activity

  1. JAORMX commented on Jun 1, 2026

    @JAORMX
    ContributorAuthor

    Done in 481c06d. Replay reconstructs the transcript by re-projecting the persisted Conversation through the same projectUpdate path live prompts use (reuse, not a parallel mapper). Open-before-update preserved by history order. User messages, the encrypted reasoning blob, and resolved permission asks are deliberately not replayed — the last is a security property (a load structurally cannot re-prompt; asserted by test). Panel-reviewed across all four axes; security confirmed clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions