[FEATURE]: Add /export to save session history as Markdown
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown, rust, typescript
- Domain
- cli
Research direction
Start with agent-sdk/src/bridge/history.ts to see how saved history is loaded and how the existing resume translation maps it, then check src/app/slash/executors.rs for how slash commands are dispatched. The export should reuse that mapping rather than add a second parser. Done means /export and /export ./session-notes.md write a Markdown file with messages, tool results and metadata, never overwrite existing files, add -2, -3 suffixes on default-name collisions, and report the destination or the error.
Written by the indexing model from the issue text.
Description
Problem Statement
Users need to save a conversation for later reading or sharing, including saved history no longer retained in the visible chat.
Proposed Solution
- Add
/export [path], reading SDK-visible persisted session history. - Write Markdown containing user messages, assistant responses, tool results/diffs and available session metadata.
- Without a path, write
export-<session-id>-<YYYYMMDDTHHMMSSZ>.mdin the session directory, using the full session UUID and UTC export time. Resolve explicit relative paths there and support paths containing spaces. - Never overwrite an existing file. For a default-name collision, add
-2,-3, etc. before.md; for an existing explicit destination, report an error. Make omissions/truncation explicit and report the written destination or failure.
Examples: /export and /export ./session-notes.md.
Example default filename: export-11d785e2-d277-406c-9f99-31d840a3705b-20261013T123045Z.md.
Start with agent-sdk/src/bridge/history.ts for saved-history loading and the existing resume translation, and src/app/slash/executors.rs for command dispatch. Reuse the history mapping rather than introducing a second transcript parser.
Alternatives Considered
Copying individual responses or terminal scrollback does not provide a complete saved-session export.
Checklist
- I have searched existing issues and discussions to ensure this is not a duplicate.
- Dominant language
- Rust
- Stars
- 261
- Forks
- 57
- Avg merge
- 10h 15m
- Merged PRs (30d)
- 58
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from srothgan/claude-code-rust
-
area: tui good first issue help wanted type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
srothgan/claude-code-rust#473 ·
Maintainers usually reply within 1 day
-
area: core help wanted type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
srothgan/claude-code-rust#472 ·
Maintainers usually reply within 1 day
-
area: agent-sdk area: tui help wanted status: discussion type: bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
srothgan/claude-code-rust#469 · 2 comments ·
Maintainers usually reply within 1 day
-
[FEATURE]: Make footer information and layout configurablePossibly taken @srothgan claimed this 2 days ago. Openarea: core area: tui type: feature
srothgan/claude-code-rust#466 · 1 assignee ·
Maintainers usually reply within 1 day
-
area: agent-sdk area: core good first issue help wanted type: feature
Difficulty 4/5 3-5 days Newbie friendliness 42/100
srothgan/claude-code-rust#464 · 2 comments ·
Maintainers usually reply within 1 day
All issues in srothgan/claude-code-rust
Similar issues
-
agent:triaged bug bughunt pm:pipenv priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SocketDev/socket-patch#1608 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
adorsys/status-list-server#698 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nannou-org/egui_graph#92 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 Half a day Newbie friendliness 72/100
sujithputta02/Esapay#13 ·
-
Deduplicate normalized_f64_bits (hash_table.rs and bloom_filter.rs)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
tursodatabase/turso#10002 ·
Maintainers usually reply within 1 day