Group of 2 Under the hood
No documentation found
A new turnCompanion flag on user messages now decides whether they're filtered out or grouped with preceding tool results
What
Internal message-handling logic now checks a new turnCompanion flag on user messages:
- A rewritten helper now checks the
turnCompanionflag (in addition to the message's content structure) to decide whether a message should be excluded from certain processing. - The logic that decides whether a message belongs with the preceding tool-result group changed from checking tool_use_id membership against a completed set, to checking the new
turnCompanionflag plus content shape.
Why
This changes how Claude Code internally identifies which messages belong together as part of the same turn, which affects how messages are filtered and grouped without changing what a user directly interacts with.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
What sets `turnCompanion` to true, and which processing path excludes these messages, aren't shown in the finding.