{"version":"2.1.333","anchor":"session-init-message-gets-code-mode-flag","canonical_anchor":"session-init-message-gets-code-mode-flag","heading":"Session start message can now include a code_mode field","tier":"internal","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/session-init-message-gets-code-mode-flag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Session start message can now include a `code_mode` field\n\nThe message sent when a session starts can now include `code_mode: true` under certain conditions\n\n**Unclear.** What conditions set `code_mode` to true is not clear.\n\n**What**\n\nWhen a session starts, Claude Code sends a start-up message to programs built on it with the Agent SDK. That message listed the available tools. It can now also include `code_mode: true` when certain conditions about those tools are met.\n\n**Why**\n\nPrograms that read this message may now see a field they have not seen before, and can use it to tell that a different mode is in use.\n\n- Area: SDK\n- Names: `code_mode`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}