anomalyco / anomalyco/opencode

/export (TUI) and opencode export (CLI) are unrelated commands with the same name — causes silent-looking import failures

Open
#48,105 0 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 9, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

/export in the TUI and opencode export on the CLI share a name but do completely different things:

/export (TUI) opencode export (CLI)
Output Human-readable Markdown, opened in $EDITOR Structured JSON
Purpose Read/archive the conversation Re-importable session backup
Works with opencode import? No Yes

Nothing about /export indicates it's not the counterpart to opencode import. A user trying to hand a session to a colleague to continue naturally reaches for /export (it's discoverable in the TUI; the CLI command isn't visible unless you already know to look for it), gets a .md file, and only discovers it's the wrong format when opencode import rejects it.

Steps to reproduce

  1. In the TUI, run /export on a session → get session.md.
  2. opencode import session.md
  3. Import fails (not valid JSON).

Suggested fixes (any one of these would help; happy to see other approaches)

  • Rename /export to something that doesn't imply session-portability, e.g. /transcript or /export-md.
  • Or, have opencode import detect a Markdown/non-JSON file and fail with a specific message pointing at opencode export instead of a generic parse error.
  • Or, document the distinction inline — e.g. /export's TUI description could say "for reading only; use opencode export/opencode import to transfer a session."

Why it matters

Right now the only way to learn these are unrelated is to hit the failure and go read the CLI docs page separately from the TUI docs page — there's no signal at the point of using either command.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.