[PR #13571] feat(cli): add session delete command #14719

Closed
opened 2026-02-16 18:19:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13571

State: closed
Merged: Yes


What does this PR do?

Add opencode session delete <sessionID> command to allow deleting sessions from the CLI. The command uses the existing Session.remove() function which handles recursive deletion of child sessions, messages, parts, and share links. If the session requested for deletion does not exist, an appropriate error message is printed and a non-zero exit code is required.

Resolves anomalyco#13447.

Screenshot 2026-02-14 at 3 51 36 AM

How did you verify your code works?

Manual testing, bun typecheck, bun test.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13571 **State:** closed **Merged:** Yes --- ### What does this PR do? Add `opencode session delete <sessionID>` command to allow deleting sessions from the CLI. The command uses the existing Session.remove() function which handles recursive deletion of child sessions, messages, parts, and share links. If the session requested for deletion does not exist, an appropriate error message is printed and a non-zero exit code is required. Resolves anomalyco#13447. <img width="1221" height="520" alt="Screenshot 2026-02-14 at 3 51 36 AM" src="https://github.com/user-attachments/assets/bb144efb-fb23-4a38-b0f0-0116e51b6d8e" /> ### How did you verify your code works? Manual testing, `bun typecheck`, `bun test`.
yindo added the pull-request label 2026-02-16 18:19:29 -05:00
yindo closed this issue 2026-02-16 18:19:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14719