[BUG] [FEATURE] /export command only exports visible viewport content, not full session history after compaction #7279

Open
opened 2026-02-16 18:06:40 -05:00 by yindo · 1 comment
Owner

Originally created by @NamedIdentity on GitHub (Jan 23, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Observed Behavior:
In a session that was long and had undergone compaction, the /export produces a transcript which is not 'start of session', but is the top of the text buffer viewport, and is clearly in the middle of an agent thinking.

Intended Behavior:
/export should export the full transcript

Proposed Change:
make /export produce the full transcript.

Additional Feature Requested:
Add a feature to /export all chats via CLI or in the main TUI interface for a project.

/export current provides Export Options to:

  • Include thinking
  • Include tool details
  • Include assistant metadata

Add Option:

  • export all project files to

export performed while in C:*<project dir> will export all sessions transcripts for that project.
export performed while in root folder containing all project folders will export all session transcripts for all projects

Example:
C:\opencode\projects\project1 : when in this dir, exports all sessions for project1
C:\opencode\my-projects\ : when in this dir, explorts all sessions for all projects within folder my-projects

Add CLI commands/flags for more efficient/stable export:
opencode export --thinking --tools --metadata

Suggest adding progress indicators.

Feature Is Needed Because
An efficient way to archive full transcripts helps solve problems encoutered, and optimize agentic workflows.
It also makes it easier export session data into a format that can be easily ingested into a RAG database that serves as a memory/context system.

Plugins

oh-my-opencode 2.14.0

OpenCode version

1.1.25

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 10 64-bit

Terminal

Windows Terminal

Originally created by @NamedIdentity on GitHub (Jan 23, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Observed Behavior: In a session that was long and had undergone compaction, the /export produces a transcript which is not 'start of session', but is the top of the text buffer viewport, and is clearly in the middle of an agent thinking. Intended Behavior: /export should export the full transcript Proposed Change: make /export produce the full transcript. Additional Feature Requested: Add a feature to /export all chats via CLI or in the main TUI interface for a project. /export current provides Export Options to: - Include thinking - Include tool details - Include assistant metadata Add Option: - export all project files to <input field to directory> export performed while in C:\*\<project dir> will export all sessions transcripts for that project. export performed while in root folder containing all project folders will export all session transcripts for all projects Example: C:\opencode\projects\project1 : when in this dir, exports all sessions for project1 C:\opencode\my-projects\ : when in this dir, explorts all sessions for all projects within folder my-projects Add CLI commands/flags for more efficient/stable export: opencode export --thinking --tools --metadata <directory to output files to> Suggest adding progress indicators. **Feature Is Needed Because** An efficient way to archive full transcripts helps solve problems encoutered, and optimize agentic workflows. It also makes it easier export session data into a format that can be easily ingested into a RAG database that serves as a memory/context system. ### Plugins oh-my-opencode 2.14.0 ### OpenCode version 1.1.25 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System Windows 10 64-bit ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:06:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7426: opencode export outputs messages in wrong order for long sessions (message ordering issue related to export)
  • #9387: [FEATURE]: opencode session export to markdown or json (export format and CLI command features)
  • #4609: [FEATURE]: add option to Export thinking and tool use inputs/outputs (export options similar to your requested features)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 23, 2026): This issue might be a duplicate of existing issues. Please check: - #7426: opencode export outputs messages in wrong order for long sessions (message ordering issue related to export) - #9387: [FEATURE]: `opencode session export` to markdown or json (export format and CLI command features) - #4609: [FEATURE]: add option to Export thinking and tool use inputs/outputs (export options similar to your requested features) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7279