Summary
When Copilot CLI runs as an ACP agent (copilot --acp --stdio), it does not
implement the ACP session/close request, and its initialize response does
not advertise the sessionCapabilities.close capability. As a result an ACP
client has no protocol-level way to tell Copilot that a session it created
via session/new is finished and can be torn down.
For a client that multiplexes many sessions over a single long-lived
copilot --acp process, every session ever created stays resident for the
lifetime of the Copilot process. session/cancel only aborts the in-flight
turn — it does not release the session — so there is no clean way to reclaim
per-session resources short of killing the whole agent process.
Environment
GitHub Copilot CLI 1.0.71-0
- Transport:
copilot --acp --stdio
Reproduction
Minimal repro with any ndjson JSON-RPC driver over copilot --acp --stdio:
- Send
initialize { "protocolVersion": 1, "clientCapabilities": {} } →
note sessionCapabilities has no close.
- Send
session/new { "cwd": "<abs path>", "mcpServers": [] } → capture
sessionId.
- Send
session/close { "sessionId": "<id>" } → observe
-32601 "Method not found": session/close.
Expected behavior
-
Copilot CLI should advertise sessionCapabilities.close and implement
session/close, allowing ACP clients to release an individual live session
without terminating the shared Copilot process.
-
Closing a session should free its in-memory resources while preserving its
persisted transcript so it can be resumed later via session/load.
Why this matters
ACP was designed for a client to own the process lifetime while opening and
closing many sessions against it. Without session/close:
- No per-session teardown → unbounded growth: clients can only
session/cancel (turn abort) or kill the entire process; there is no way to release a
single finished session. As a result, a long-lived host accumulates every session
it ever created for the whole process lifetime, with no bounded-lifetime path and
no way to reclaim resources without tearing down every other session sharing that process.
References
Summary
When Copilot CLI runs as an ACP agent (
copilot --acp --stdio), it does notimplement the ACP
session/closerequest, and itsinitializeresponse doesnot advertise the
sessionCapabilities.closecapability. As a result an ACPclient has no protocol-level way to tell Copilot that a session it created
via
session/newis finished and can be torn down.For a client that multiplexes many sessions over a single long-lived
copilot --acpprocess, every session ever created stays resident for thelifetime of the Copilot process.
session/cancelonly aborts the in-flightturn — it does not release the session — so there is no clean way to reclaim
per-session resources short of killing the whole agent process.
Environment
GitHub Copilot CLI 1.0.71-0copilot --acp --stdioReproduction
Minimal repro with any ndjson JSON-RPC driver over
copilot --acp --stdio:initialize{ "protocolVersion": 1, "clientCapabilities": {} }→note
sessionCapabilitieshas noclose.session/new{ "cwd": "<abs path>", "mcpServers": [] }→ capturesessionId.session/close{ "sessionId": "<id>" }→ observe-32601 "Method not found": session/close.Expected behavior
Copilot CLI should advertise
sessionCapabilities.closeand implementsession/close, allowing ACP clients to release an individual live sessionwithout terminating the shared Copilot process.
Closing a session should free its in-memory resources while preserving its
persisted transcript so it can be resumed later via
session/load.Why this matters
ACP was designed for a client to own the process lifetime while opening and
closing many sessions against it. Without
session/close:session/cancel (turn abort) or kill the entire process; there is no way to release a
single finished session. As a result, a long-lived host accumulates every session
it ever created for the whole process lifetime, with no bounded-lifetime path and
no way to reclaim resources without tearing down every other session sharing that process.
References
session/closemethod andsessionCapabilities.closecapability:https://agentclientprotocol.com/protocol/v1/session-setup