Repository navigation
feat(cli): add session prune command to v2 - #51255
DEAD1nsane wants to merge 3 commits into
Conversation
Add a project-scoped session prune command for the v2 CLI with dry-run preview, explicit confirmation, family-safe age filtering, and focused tests.
|
The following comment was made by an LLM, it may be inaccurate: |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
hey — tiny ci thing. i pushed an empty commit to poke it and pr-standards went green, but test/check/nix-eval are all stuck at action_required and i can't approve them from my side since i only have read access here. fwiw i ran the same suite against this exact commit in my fork and linux was totally clean — the only red was a couple of windows tests timing out on git/npm over the network, nothing to do with this pr. could someone with write access hit approve and run? thanks |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
N/A — feature request.
Type of change
What does this PR do?
Adds
opencode session prune <duration>to the v2 CLI. It previews eligible session families, supports confirmation or--force, protects active and recently-updated families, supports--include-archived, and rechecks roots before deletion. The handler paginates the complete session inventory and tolerates sessions already removed by another process.How did you verify your code works?
bun test test/session-prune.test.ts— 5 tests passed.git diff --checkpassed.Screenshots / recordings
Not applicable; this is a CLI-only change.
Checklist