Skip to content

feat(opencode): add session view to print a transcript#32265

Open
molloyzak13 wants to merge 1 commit into
anomalyco:devfrom
molloyzak13:feat/session-view
Open

feat(opencode): add session view to print a transcript#32265
molloyzak13 wants to merge 1 commit into
anomalyco:devfrom
molloyzak13:feat/session-view

Conversation

@molloyzak13

@molloyzak13 molloyzak13 commented Jun 14, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #32264

Type of change

  • New feature

What does this PR do?

opencode session list lists sessions but there is no way to read one from the terminal. This adds opencode session view [sessionID] - it renders a session as a Markdown transcript to stdout, paged through less when interactive. It defaults to the most recent session and takes --no-reasoning / --no-tools to trim output. It sits next to session list / session delete in the same command group and reuses Session.Service (get + messages), the same service export uses.

How did you verify your code works?

Ran bun dev against a real session: session view <id>, session view (picks the most recent, prints which on stderr), --no-tools --no-reasoning, and a bad id (prints Session not found). tsc --noEmit is clean. I also hit a yargs gotcha where options named no-* collide with yargs built-in boolean negation, and fixed it by using positive reasoning/tools booleans defaulting to true.

Screenshots / recordings

Not a UI change (CLI output).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Adds `opencode session view [sessionID]` rendering a session as a Markdown transcript to stdout (paged when TTY). Defaults to the most recent session; --no-reasoning / --no-tools trim the output. Sits next to `session list` / `session delete`.

Closes anomalyco#32264
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jun 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: opencode session view - print a session transcript to the terminal

1 participant