opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: add option to Export thinking and tool use inputs/outputs

Open Ninja3047 opened this issue 1 month ago • 5 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Right now the export to markdown only exports the user and assistant messages and nothing about the reasoning or the tool use information. Only the tools used are exported but nothing about the details of what parameters were used or the output of the tools.

I know it could potentially make the markdown export very large so maybe having it as an option would suffice.

Ninja3047 avatar Nov 21 '25 20:11 Ninja3047

I figure it would make troubleshooting issues like this easier: https://github.com/sst/opencode/issues/2464

I'm curious what tool call causes my token count to instantly quadruple, the output i see in the ui looks simple enough!

dan-kirberger avatar Nov 21 '25 21:11 dan-kirberger

@Ninja3047 have u tried opencode export? It is everything u need, just not in markdown

rekram1-node avatar Nov 24 '25 05:11 rekram1-node

I see this exported markdown with empty assistant and tool. Is this by design or a bug?

# Debugging npx jest in.service.spec.ts failure

**Session ID:** ses_4d84ff224ffeYhLIVwlrNF5nxB
**Created:** 12/16/2025, 6:03:27 PM
**Updated:** 12/19/2025, 6:38:58 PM

---

## User

this test: npx jest in.service.spec.ts failed, try to understand why

---

## Assistant

'''
Tool: read
'''

---

## Assistant
'''

'''
Tool: read
'''

---

## Assistant

'''
Tool: bash
'''

---

Rom888 avatar Dec 20 '25 05:12 Rom888

i think its “by design” but could be improved for sure

rekram1-node avatar Dec 21 '25 08:12 rekram1-node

Opened #6089 because what we have now makes it basically impossible to reflect on what has happened in a session in any deep capacity.

Longer term I hope that the plugin API can give us hooks to be able to capture & understand the session at a deep level, ideally shunt it into observability systems like MCP Semantic Conventions. But this is an advanced hope! 🚀

rektide avatar Dec 24 '25 09:12 rektide