Steps aren't shown in the web UI despite being in the JSON #8378

Open
opened 2026-02-16 18:09:49 -05:00 by yindo · 2 comments
Owner

Originally created by @spykr on GitHub (Feb 2, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

I'm having a recurring issue where only the text response is shown and not the tool calls, here's a small example:

Image

I can see the tool calls in the JSON response, although they show up before my message in the array:

Image

It appears the bug might be in the logic that session-turn.tsx uses to determine whether a turn has steps or not.

Plugins

None

OpenCode version

1.1.48

Steps to reproduce

This is tricky because it doesn't seem to happen every time, but it does happen often enough in my testing that I only just started using OpenCode yesterday and I've seen it a number of times already.

  1. Write a prompt that should definitely trigger a tool call (e.g. run npm install)
  2. See that no tool calls are displayed in the UI

Screenshot and/or share link

See above.

Operating System

Ubuntu 24.04.1

Terminal

I'm running opencode serve on a Linux server and then accessing it via the web UI.

Originally created by @spykr on GitHub (Feb 2, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description I'm having a recurring issue where only the text response is shown and not the tool calls, here's a small example: <img width="299" height="171" alt="Image" src="https://github.com/user-attachments/assets/6360493e-cd21-4c8c-8c07-2b73a6afdcd8" /> I can see the tool calls in the JSON response, although they show up _before_ my message in the array: <img width="954" height="436" alt="Image" src="https://github.com/user-attachments/assets/a5eb06ee-1cae-4e22-8d96-e2c2666ba52a" /> It appears the bug might be in the logic that [session-turn.tsx](https://github.com/anomalyco/opencode/blob/dev/packages/ui/src/components/session-turn.tsx) uses to determine whether a turn has steps or not. ### Plugins None ### OpenCode version 1.1.48 ### Steps to reproduce This is tricky because it doesn't seem to happen every time, but it does happen often enough in my testing that I only just started using OpenCode yesterday and I've seen it a number of times already. 1. Write a prompt that should definitely trigger a tool call (e.g. run `npm install`) 2. See that no tool calls are displayed in the UI ### Screenshot and/or share link See above. ### Operating System Ubuntu 24.04.1 ### Terminal I'm running `opencode serve` on a Linux server and then accessing it via the web UI.
yindo added the bugweb labels 2026-02-16 18:09:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 2, 2026):

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

  • #3065: Bug: Tool Calls are not shown directly if tool details are toggled off - While that issue is for TUI, it describes the same core problem of tool calls appearing in the JSON but not rendering properly in the UI, with similar symptoms of tool calls appearing after the text response completes.

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

@github-actions[bot] commented on GitHub (Feb 2, 2026): This issue might be a duplicate of existing issues. Please check: - #3065: Bug: Tool Calls are not shown directly if tool details are toggled off - While that issue is for TUI, it describes the same core problem of tool calls appearing in the JSON but not rendering properly in the UI, with similar symptoms of tool calls appearing after the text response completes. Feel free to ignore if none of these address your specific case.
Author
Owner

@spykr commented on GitHub (Feb 5, 2026):

I investigated this and it seems to be an ordering bug: messages are sorted lexicographically by ID, which doesn't always match chronological order. In the example above, my user message started with msg_c22f27bd, while the tool call message created 2ms later started with msg_c22f2793. Since 2793 sorts before 27bd, the tool call message is placed before my user message and isn’t shown.

I tested sorting by time.created and that fixed the issue locally. Is there a reason ordering is ID-based today? If not, I'm happy to open a PR with this change.

@spykr commented on GitHub (Feb 5, 2026): I investigated this and it seems to be an ordering bug: messages are sorted lexicographically by ID, which doesn't always match chronological order. In the example above, my user message started with `msg_c22f27bd`, while the tool call message created 2ms later started with `msg_c22f2793`. Since `2793` sorts before `27bd`, the tool call message is placed before my user message and isn’t shown. I tested sorting by `time.created` and that fixed the issue locally. Is there a reason ordering is ID-based today? If not, I'm happy to open a PR with this change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8378