Repository navigation
Session command with list subcommand added - #4558
Closed
opencode-agent[bot] wants to merge 1 commit into
Closed
opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
Co-authored-by: rekram1-node <[email protected]>
github-actions
Bot
force-pushed
the
dev
branch
3 times, most recently
from
November 22, 2025 18:07
f1dc981 to
3e15a39
Compare
github-actions
Bot
force-pushed
the
dev
branch
3 times, most recently
from
November 27, 2025 01:29
f8ee907 to
6a9856d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Perfect! Now let me create a final summary of what I've implemented:
Summary
I have successfully implemented a new
sessioncommand with alistsubcommand for the opencode CLI. Here's what was created:Files Created/Modified:
/src/cli/cmd/session.ts- New command file containing:SessionListCommand- Handles thesession listsubcommandSessionCommand- Main session command that registers the list subcommand/src/index.ts- Modified to register the new SessionCommand/test/cli/session.test.ts- Basic test file for the command structureFeatures Implemented:
Command Structure:
opencode session list- Main command invocationOutput Formats:
--format default): Git log-style table with Session ID, Last Updated, and Title--format json): Full session data as JSON--format ids): Just session IDs, one per line (CI-friendly)Options:
--format, -f: Output format choice (default, json, ids)--limit, -l: Limit number of sessions shownKey Features:
--format idsoption outputs just session IDs for easy scriptinggit logUsage Examples:
Design Choices:
--format idsoption directly addresses the user's need for easily extractable session IDsThe implementation directly addresses the GitHub issue where users couldn't easily find session IDs to use with the
--sessionflag, providing both human-friendly and CI-friendly ways to list and access session information.Closes #4557
opencode session | github run