Repository navigation
Description
Describe the bug
In ACP mode (copilot --acp --stdio), Copilot advertises /session in available_commands_update, but its delete, cleanup and prune subcommands fail over ACP. Sent as a session/prompt, each ends with end_turn in about 1 ms, without a model call, and replies with an error:
| Prompt | Reply |
|---|---|
/session delete <id> |
Failed to run /session: Error: slash command effect sessionsApi.list is unavailable for this session |
/session cleanup |
Failed to run /session: Error: slash command effect sessionsApi.list is unavailable for this session |
/session prune --older-than 1 --dry-run --include-named |
Failed to run /session: Error: slash command effect sessionsApi.pruneOld is unavailable for this session |
Nothing is deleted: the sessions' folders stay in session-state.
An ACP client has no other way to delete Copilot sessions. initialize offers sessionCapabilities list and close only, without ACP's stable session/delete.
Affected version
GitHub Copilot CLI 1.0.104
Steps to reproduce the behavior
- Start
copilot --acp --stdioandinitialize. - Call
session/newtwice, for sessions A and B. - Send session A a
session/promptwith the text/session delete <B's sessionId>. - The reply is the
sessionsApi.listerror above, withstopReason: end_turn. Session B's folder is still insession-state. - Send
/session cleanup, then/session prune --older-than 1 --dry-run --include-named. Each gets its error above.
Expected behavior
These subcommands work over ACP as they do in the interactive CLI:
/session delete <id>deletes the session./session cleanupremoves empty or abandoned sessions./session prune --older-than <days>deletes old sessions, or lists them with--dry-run.
Each replies with what it did.
Better still for ACP clients: advertise sessionCapabilities.delete and support session/delete. Then a client can delete a session without sending a prompt through another one.
Additional context
- Windows 11, x86_64, driven from a Node ACP client, in a scratch
COPILOT_HOME. prunechecks its arguments before it fails. Without--older-thanit replies with its usage, and--older-than 0getsInvalid number of days: 0. It fails once it needs the sessions API.- This is like ACP: /rename reports success but doesn't rename the session #5115. There,
/renameover ACP replies that it renamed the session but saves nothing. In both cases the command is advertised over ACP, but the ACP session lacks what it needs. - Related: Support all slash commands in ACP #2555 (advertising every slash command over ACP) and /cleanup or command to remove empty/abandoned sessions #1451 (
/cleanup).
Activity
devm33 commentedon Nov 3, 2026
This should be fixed in Copilot CLI 1.0.106-1, the first public release containing the fix: https://github.com/github/copilot-cli/releases/tag/v1.0.106-1 (prerelease, published October 31, 2026).
Verified against that published build over ACP stdio with an isolated profile:
/session cleanupand/session prune --older-than 1 --dry-run --include-namedcomplete without the unavailable-effect errors, and/session delete <id> --yessuccessfully deletes a saved test session and removes its session directory. This fixes the reported slash-command failures; it does not add the separatesession/deleteprotocol method.Closing as fixed. Please reopen if the slash-command failures persist on this version or newer.
Generated by Copilot