[PR #5855] feat(tui): add session.edit command to edit session JSON in external editor #11619

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

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

State: closed
Merged: No


Summary

  • Adds a new TUI command /session.edit (or via command palette) that exports the current session as JSON, opens it in the user's external editor ($EDITOR), and imports the edited result back as a session
  • This enables users to manually edit session history, fix messages, or trim context before continuing a conversation

Details

The command:

  1. Exports the current session using the same format as opencode export
  2. Opens the JSON in the user's $EDITOR/$VISUAL
  3. On save, parses the edited JSON and imports it using the Storage API
  4. Navigates to the imported session

This addresses the feature request from #4867 for better session editing capabilities.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5855 **State:** closed **Merged:** No --- ## Summary - Adds a new TUI command `/session.edit` (or via command palette) that exports the current session as JSON, opens it in the user's external editor (`$EDITOR`), and imports the edited result back as a session - This enables users to manually edit session history, fix messages, or trim context before continuing a conversation ## Details The command: 1. Exports the current session using the same format as `opencode export` 2. Opens the JSON in the user's `$EDITOR`/`$VISUAL` 3. On save, parses the edited JSON and imports it using the Storage API 4. Navigates to the imported session This addresses the feature request from #4867 for better session editing capabilities.
yindo added the pull-request label 2026-02-16 18:16:30 -05:00
yindo closed this issue 2026-02-16 18:16:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11619