What happened?
If /tree changes the active branch while a tool is running, the returned toolResult can be appended to the new branch instead of the branch containing its assistant toolCall.
This leaves an orphan result in provider history. Model provider then rejects subsequent requests on that branch:
Codex error: No tool call found for function call output with call_id call_orphan_repro.
This makes the session branch unusable. It differs from #2796: there the selected branch is missing a tool result; here it contains a result whose tool call exists only on a sibling branch.
Steps to reproduce
A minimal JSONL session fixture and the command used to run it are included in a separate comment below.
The fixture represents this sequence:
- A tool call starts on a side branch.
- Tree navigation changes the active branch before the tool returns.
- The result is attached to the new branch instead of the branch containing its tool call.
- The next Codex request fails with the error above.
I reproduced this with extensions disabled.
Expected behavior
A pending tool result should remain on the branch containing its originating tool call, regardless of later changes to the active leaf. Tree navigation should not make a session branch unusable.
Version
0.80.6
What happened?
If
/treechanges the active branch while a tool is running, the returnedtoolResultcan be appended to the new branch instead of the branch containing its assistanttoolCall.This leaves an orphan result in provider history. Model provider then rejects subsequent requests on that branch:
This makes the session branch unusable. It differs from #2796: there the selected branch is missing a tool result; here it contains a result whose tool call exists only on a sibling branch.
Steps to reproduce
A minimal JSONL session fixture and the command used to run it are included in a separate comment below.
The fixture represents this sequence:
I reproduced this with extensions disabled.
Expected behavior
A pending tool result should remain on the branch containing its originating tool call, regardless of later changes to the active leaf. Tree navigation should not make a session branch unusable.
Version
0.80.6