Skip to content

Cannot resume session after a restart #130

@gsabran

Description

@gsabran

Continuing the Claude Code specific aspects of https://github.com/orgs/agentclientprotocol/discussions/202#discussioncomment-14813341 here

There's two issues preventing resuming an existing conversation with Claude Code after restarting the client:

  • newSession returns an internal session id, not the one used by Claude Code. I don't think this is too hard to fix.
  • Even with a matching session id, there is not a straighfoward way to resume the session:
    • newSession doesn't have resume parameter. We could pass it through the _meta property of NewSessionRequest, but this is somewhat using private apis.
    • loadSession requires that The Agent MUST replay the entire conversation to the Client in the form of session/update notifications (like session/prompt). In my knowledge this is not possible with Claude Code (ie you can resume, not replay). So no loadSession
    • Alternatively, prompt could call into newSession with a resume parameter when given a session id it doesn't have in memory, instead of throwing. However PromptRequest is missing some property required in NewSessionRequest (cwd, mcpServers)

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