anomalyco / anomalyco/opencode
/export (TUI) and opencode export (CLI) are unrelated commands with the same name — causes silent-looking import failures
@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
- In the TUI, run
/exporton a session → getsession.md. opencode import session.md- Import fails (not valid JSON).
Suggested fixes (any one of these would help; happy to see other approaches)
- Rename
/exportto something that doesn't imply session-portability, e.g./transcriptor/export-md. - Or, have
opencode importdetect a Markdown/non-JSON file and fail with a specific message pointing atopencode exportinstead of a generic parse error. - Or, document the distinction inline — e.g.
/export's TUI description could say "for reading only; useopencode export/opencode importto 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.