[BUG]

Status Closed — duplicate
Reported on v2.1.235
Maintainer reply None cached
Activity 1 comment · opened Aug 19, 2026 · closed Aug 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A branch point in the session transcript can leave a server_tool_use block
and its corresponding advisor_tool_result block on divergent parentUuid
chains. Both records are present in the .jsonl, but only the result is
reachable when walking parents back from the leaf. Every subsequent turn then
fails with:

What Should Happen?

Either (a) the two halves of a single logical assistant turn should stay on the
same chain across a fork, or (b) history reconstruction should drop an
advisor_tool_result whose tool_use_id has no reachable server_tool_use
rather than sending an invalid array.

An empty user record should not be persisted, and/or history reconstruction
should not split records sharing a message.id across a user turn.

Error Messages/Logs

| line | uuid | parentUuid | record |
|------|------|------------|--------|
| 106  | `1d6f2fa0` | `ba1f2384` | assistant, `server_tool_use` id=`srvtoolu_XXXX` |
| 107  | `c6f740e5` | `1d6f2fa0` | **user, content: []** |
| 108  | `460e2f63` | `c6f740e5` | assistant, `advisor_tool_result` tool_use_id=`srvtoolu_XXXX` |

Lines 106 and 108 share `message.id` and `requestId` — they are one logical
assistant turn. The zero-content user record at 107 splits them into two
messages on reconstruction, so the `advisor_tool_result` lands at `content.0`
of a message with no preceding `server_tool_use`.

Steps to Reproduce

I don't have a reliable trigger for the write. I can't say what caused the
empty user record at line 107 to be persisted. Conditions at the time:

  • Long design session (~190 records), model claude-opus-5
  • An advisor tool call was in flight when the bad record was written
  • Ordinary approve-and-continue flow; I was answering a "say go" prompt
  • No /compact run manually in this session
  • No Esc-rewind that I recall, though I can't rule one out
  • Single version throughout (2.1.235), so no upgrade boundary

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.235

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

What I can provide: The three records (106–108) with content stripped, on request. I'd rather not
attach the full transcript since it contains project internals.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗