Repository navigation
Studio: keep each imported tool call's own result when a chat file reuses call ids - #11596
Conversation
Review + GitHub Actions UI evidencePinned review: I reproduced the real Studio flow in Chromium at 1366×1000, on fresh upstream
Unit A/B: with the base CI: the 35 red upstream checks are all Conclusion: I reproduced the wrong-result bug and verified the fix. I found no new blocker. |
|
Confirmed that main maps tool results by id across the whole imported chat in chat-import.ts, so reused ids like tool_call_0 give every earlier card the last result. Thanks for the tests covering both the cross-turn and same-turn cases; will get this reviewed. |
|
Pushed 3f07007: the reuse test now starts with an interrupted turn whose |
|
Codex review and CI on the same head
|
…uses call ids (unslothai#11596) * Studio: keep each imported tool call's own result when a chat file reuses call ids * test(studio): cover imported tool results skipping an earlier unanswered turn --------- Co-authored-by: Lyxot <[email protected]>

When an imported chat has more than one turn using the same tool call id, like tool_call_0, every earlier tool card shows the last result. That wrong result is also sent to the model if you continue the chat. This happens with providers that do not send their own ids.
Each result now goes to the matching call in the closest turn before it, and two calls with the same id in one turn get their results in order.