{"version":"2.1.234","anchor":"query-path-receives-the-message-queue-as-an-argument","canonical_anchor":"query-path-receives-the-message-queue-as-an-argument","heading":"Query path receives the message queue as an argument","tier":"internal","area":"Message Queue","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234\/e\/query-path-receives-the-message-queue-as-an-argument","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234","markdown":"### Query path receives the message queue as an argument\n\nThe pending-message queue is now passed around explicitly, and an empty Enter can be absorbed in leader sessions.\n\n**What**\n\nThe queue of pending messages is now handed to the agent-context builder, the tool-result handler, the fork copy and the SDK entry point rather than read from a shared global. The input surface also gained a hook that can absorb an empty Enter press, used for leader sessions, which suppresses the empty-submit counter.\n\n**Details**\n\n- Mid-turn command folding now asks the queue directly, via `isMidTurnFoldSuspended`, `registerFoldInFlight` and `countRemainingWakePollEventsAfter`.\n- The query loop calls `hasCommandsInQueue()` on the passed object instead of a module-level checker.\n\n**Evidence**\n\n`hasCommandsInQueue`, `isMidTurnFoldSuspended`\n\n- Area: Message Queue\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}