{"version":"2.1.238","anchor":"initialize-now-tells-a-connecting-client-what-the-session-is","canonical_anchor":"initialize-now-tells-a-connecting-client-what-the-session-is","heading":"initialize now tells a connecting client what the session is doing","tier":"use","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.238\/e\/initialize-now-tells-a-connecting-client-what-the-session-is","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.238","markdown":"### `initialize` now tells a connecting client what the session is doing\n\nPrograms connecting over stream-json now learn whether the session is idle, running or waiting on you.\n\n**What**\n\nWhen a program connects to Claude Code over the stream-json control protocol, the reply now includes `session_state` (idle, running or requires_action at the moment of connection) and `hooks_applied`. A client attaching to a CLI that is mid-turn can see that immediately instead of guessing.\n\n**Details**\n\n- `hooks_applied` is false when a repeated initialize's hooks were ignored because another client owns the CLI's stdin.\n- Both fields are present on this build; if they are missing from a reply, the CLI on the other end is older.\n\n**Evidence**\n\n`a client joining a remote session another client configured`\n\n- Area: SDK\n- Names: `session_state`, `hooks_applied`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5"}