Skip to content

[FEATURE]: --format json does not print reasoning_content. #7202

Closed

Description

@hksdpc255

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

--format json does not print reasoning_content for now:

$ opencode run --log-level DEBUG --format json --model xiaomi/mimo-v2-flash-thinking 'Using browser tool to close the browser.'
{"type":"step_start","timestamp":1767790882247,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c2dc6001bXsFv0OrsMkp8a","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c1a5f001fxnzwEnS8bqiNq","type":"step-start"}}
{"type":"tool_use","timestamp":1767790883443,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c31f9001fsXAlUj7wQVAkN","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c1a5f001fxnzwEnS8bqiNq","type":"tool","callID":"call_d46153bfcf1f4f5c9e90347f","tool":"browser_browser_close","state":{"status":"completed","input":{},"output":"{\n  \"message\": \"Browser closed successfully\"\n}","title":"","metadata":{},"time":{"start":1767790883323,"end":1767790883439},"attachments":[]}}}
{"type":"step_finish","timestamp":1767790883443,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c327100194VEblCc5wCY8h","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c1a5f001fxnzwEnS8bqiNq","type":"step-finish","reason":"tool-calls","cost":0.00121912,"tokens":{"input":16954,"output":85,"reasoning":69,"cache":{"read":5,"write":0}}}}
{"type":"step_start","timestamp":1767790885083,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c38db001sNqLOAk31H8Hyn","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c3275001ZD3deWquk5ki3r","type":"step-start"}}
{"type":"text","timestamp":1767790885769,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c3ab3001x6ZfK5RGGaAyze","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c3275001ZD3deWquk5ki3r","type":"text","text":"The browser has been closed successfully.","time":{"start":1767790885768,"end":1767790885768}}}
{"type":"step_finish","timestamp":1767790885769,"sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","part":{"id":"prt_b988c3b88001dZqZV5k9fXzd6P","sessionID":"ses_46773e5bcffergbbCsAcLxPFQh","messageID":"msg_b988c3275001ZD3deWquk5ki3r","type":"step-finish","reason":"stop","cost":0.00106589,"tokens":{"input":15011,"output":41,"reasoning":31,"cache":{"read":2055,"write":0}}}}

I have already verified the reasoning_content can be displayed correctly in TUI.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 7, 2026
  2. github-actions commented on Jan 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. hksdpc255 commented on Jan 7, 2026

    @hksdpc255
    Author

    claude-code uses a different json schema but have the thinking content:

    {"type":"assistant","message":{"id":"05ad8e108c6bfe8a1eaf435a522609e7","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"The user wants me to use the Glob tool to check the current directory. Let me do that.","signature":"40508f0504a4977eaa9335ad315b1eb9ff2c5a162e856c5eab4900fb5ce0f8b9"}],"model":"MiniMax-M2.1","stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":174,"output_tokens":0,"cache_creation_input_tokens":19480,"cache_read_input_tokens":0},"service_tier":"standard","context_management":null},"parent_tool_use_id":null,"session_id":"ae9675f2-e988-4dc9-9fba-823121faf6a4","uuid":"ab97f8b1-abd3-486b-bcec-e040a8950daa"}
    {"type":"assistant","message":{"id":"05ad8e108c6bfe8a1eaf435a522609e7","type":"message","role":"assistant","content":[{"type":"tool_use","id":"call_function_b4q5ychg2ism_1","name":"Glob","input":{"pattern":"*"}}],"model":"MiniMax-M2.1","stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":174,"output_tokens":46,"cache_creation_input_tokens":19480,"cache_read_input_tokens":0},"service_tier":"standard","context_management":null},"parent_tool_use_id":null,"session_id":"ae9675f2-e988-4dc9-9fba-823121faf6a4","uuid":"b39d6ecf-ee22-4864-83ad-1ce2654b4fa8"}
    {"type":"user","message":{"role":"user","content":[{"tool_use_id":"call_function_b4q5ychg2ism_1","type":"tool_result","content":"No files found"}]},"parent_tool_use_id":null,"session_id":"ae9675f2-e988-4dc9-9fba-823121faf6a4","uuid":"5ee5fd17-2d27-45a5-ba67-f3853921394c","tool_use_result":{"filenames":[],"durationMs":5,"numFiles":0,"truncated":false}}
    {"type":"assistant","message":{"id":"05ad8e12b18cc5bec09eeeeaf93f6826","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"The current directory appears to be empty. Let me check if there are any files including hidden ones.","signature":"1143edc7d6cc0a27122dee6ef1b8c65e08bae55bcc92a01334f81b1907d1925d"}],"model":"MiniMax-M2.1","stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":188,"output_tokens":0,"cache_creation_input_tokens":247,"cache_read_input_tokens":19284},"service_tier":"standard","context_management":null},"parent_tool_use_id":null,"session_id":"ae9675f2-e988-4dc9-9fba-823121faf6a4","uuid":"2e0711f4-057f-4782-87e9-e258976ae9b4"}
    
  4. hksdpc255 commented on Jan 7, 2026

    @hksdpc255
    Author

    If any of the terminal output I upload contains sensitive information, please remind me to remove it.

  5. levabala commented on Jan 23, 2026

    @levabala
    Contributor

    +1 as it would be really nice to have for ralph-loop-like implementations on top of opencode

  6. hksdpc255 commented on Jan 26, 2026

    @hksdpc255
    Author

    @levabala Try PR #7434. I don't know why still no maintainers look review this. It just 3 lines additions.

  7. foglerek commented on Jan 27, 2026

    @foglerek

    +1, I rely on this in my harness that I'd like to wire opencode to.

  8. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions