{"version":"2.1.269","anchor":"new-turncompanion-concept-in-message-filtering","canonical_anchor":"new-turncompanion-concept-in-message-filtering","heading":"Message filtering and turn grouping now use a new turnCompanion flag","tier":"internal","area":"Message Filtering","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/new-turncompanion-concept-in-message-filtering","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### Message filtering and turn grouping now use a new turnCompanion flag\n\nA new turnCompanion flag on user messages now decides whether they're filtered out or grouped with preceding tool results\n\n**Unclear.** What sets `turnCompanion` to true, and which processing path excludes these messages, aren't shown in the finding.\n\n**What**\n\nInternal message-handling logic now checks a new `turnCompanion` flag on user messages:\n\n- A rewritten helper now checks the `turnCompanion` flag (in addition to the message's content structure) to decide whether a message should be excluded from certain processing.\n\n- 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 `turnCompanion` flag plus content shape.\n\n**Why**\n\nThis 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.\n\n- Area: Message Filtering\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}