{"version":"2.1.248","anchor":"restricted-sessions-handled-the-same-way-whether-set-by-flag","canonical_anchor":"restricted-sessions-handled-the-same-way-whether-set-by-flag","heading":"Restricted sessions handled the same way whether set by flag or environment","tier":"use","area":"Restricted Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/restricted-sessions-handled-the-same-way-whether-set-by-flag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Restricted sessions handled the same way whether set by flag or environment\n\nSetting CLAUDE_CODE_RESTRICTED now restricts a session exactly as --restricted does.\n\n**What**\n\nThe check that decides how session options such as permission mode, model, fallback model, effort, agent list, settings and appended system prompt are handled now also trips when `CLAUDE_CODE_RESTRICTED` is set in the environment, not only via `--restricted`. A new message states that cloud sessions cannot be created from a restricted session because they would not enforce the restriction.\n\n**Evidence**\n\n`Cloud sessions cannot be created from a --restricted session: they would not enforce it.`\n\n- Area: Restricted Sessions\n- Names: `CLAUDE_CODE_RESTRICTED`, `--restricted`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}