Skip to content

ACP: use session/load|resume for warm agent sessions instead of the replay-preamble hack #830

Description

@jonathanKingston

Context

The first real npm run probe:acp run (Tier-1 capability probe, PR #829) shows the two main ACP adapters already advertise session resume:

Capability Claude (claude-agent-acp 0.53.0) Codex (codex-acp 1.1.0) Cursor
Session load
session/resume ·
session/list
session/fork (unstable) · ·

But Copse's ACP session pool (acp-session-pool.ts / acp-client.ts) does not use these. Per docs/acp-agents.md, a session idle for 10 minutes is reaped and, on respawn, "the prior conversation is replayed once as a compact preamble" — a lossy, token-costly reconstruction that also feeds the cost-multiplier concern in #584.

Proposal

For adapters that advertise loadSession / session/resume, resume the real agent session (agent-owned history) instead of replaying a synthesized preamble:

  • On respawn after idle reap or a config change, call session/load (or session/resume where advertised) with the stored sessionId rather than replaying the transcript.
  • Fall back to the current replay path for agents that advertise neither (e.g. Cursor advertises only legacy loadSession, no resume).

Evidence / refs

Surfaced by the Tier-1 ACP capability probe.

Activity

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

    area:acpAgent Client Protocol integrationarea:performancePerformance, resource usage, and package sizeenhancementNew feature or requestpriority:p2Important issue to address soon

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions