{"version":"2.1.296","anchor":"gateway-policy-files-new-code-block-and-clisettings-conf","canonical_anchor":"gateway-policy-files-new-code-block-and-clisettings-conf","heading":"Gateway policy files gain a code block for Claude Desktop's Code tab","tier":"use","area":"Gateway","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/gateway-policy-files-new-code-block-and-clisettings-conf","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### Gateway policy files gain a code block for Claude Desktop's Code tab\n\nGateway policies can use a code block for Claude Desktop's Code tab, cannot mix it with cli or settings, and get clearer warnings about serve_to_desktop\n\n**What**\n\nThe Claude apps gateway is a self-hosted server that hands out managed settings, which are settings an administrator sets for users. Its policy files and their checks changed.\n\n- Policy entries accept a new `code` block, which applies to Claude Desktop's Code tab. Per this change, the Code tab needs Claude Code v2.1.296 or later.\n\n- A policy that mixes `code` with `cli` or `settings` blocks is rejected. The error tells the author to put all settings into the one `code` block (\"Choose cli or code\").\n\n- A new warning says `code:` blocks reach the Code tab only when the machine's own managed settings name the gateway and reach it over HTTPS on a private network.\n\n- `serve_to_desktop: false` is ignored in a file that has a `code:` block.\n\n- The old warning that no policy sets `serve_to_desktop`, which meant the Code tab got a 404 from `\/managed\/settings`, is replaced. The new warning says settings outside a `code:` block do not reach the Code tab, even with `serve_to_desktop: true`.\n\n- The no-policy message now names the fix: set `serve_to_desktop: true` on the user's policy, or change `cli` to `code` in every policy. Before, it only said to check `serve_to_desktop`.\n\n- Validation errors for a policy using `code` now point at `.code` instead of `.cli`.\n\nSeparately, signing out now waits for an extra cleanup step to finish before it clears your sign-in details.\n\n**Why**\n\nGateway admins who serve settings to Claude Desktop need to move those settings under a `code:` block, and keep each policy to either `cli` or `code`. Otherwise the Code tab gets no settings. The messages now say exactly what to change.\n\n- Area: Gateway\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: org\n- Heads-up: no"}