{"version":"2.1.315","anchor":"hidden-gateway-json-flag-on-claude-auth-login-for-cloud","canonical_anchor":"hidden-gateway-json-flag-on-claude-auth-login-for-cloud","heading":"Hidden gateway JSON sign-in mode for claude auth login","tier":"use","area":"Auth","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315\/e\/hidden-gateway-json-flag-on-claude-auth-login-for-cloud","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315","markdown":"### Hidden gateway JSON sign-in mode for claude auth login\n\n`claude auth login` gains a hidden `--gateway-json` option that runs Cloud gateway sign-in as JSON lines for another program, such as the VS Code extension\n\n**Unclear.** It is not clear which setting makes a Cloud gateway count as available on a machine.\n\n**What**\n\n`claude auth login` is the command that signs Claude Code in. It gains a hidden option, `--gateway-json`, that does not show in the help. Instead of talking to a person, it writes the Cloud gateway sign-in questions as JSON lines (one machine-readable message per line) and reads the answers from standard input, so another program can show the sign-in to the person.\n\n- It is rejected when combined with `--console`, `--claudeai`, `--sso` or `--email`.\n\n- When a gateway is configured, it refuses to run in a terminal a person is typing into, saying the command is run by the VS Code extension.\n\n- It refuses to run inside a Claude Code session.\n\n- If no gateway is available, it prints an error saying sign-in \"isn't available with this machine's settings\". What makes a gateway available was not traced.\n\n- An interactive sign-in screen for the gateway case is also added for use in a terminal.\n\n- `claude auth status`, when asked for JSON output, now reports `gatewaySignInOffered` when that same gateway check finds one.\n\n- A new rule matches `auth login` when `gatewayJson` is on (or a helper returns true) and adds it to an existing list of exempted commands. What that list controls was not read.\n\nBefore, `claude auth login` only handled email, SSO, Console and claude.ai sign-in, and a gateway setup just printed a note to run the interactive `\/login`.\n\n**Why**\n\nThis gives editor extensions a way to drive gateway sign-in themselves rather than sending you to `\/login`. Because the option is hidden, it is meant for those programs rather than for typing by hand.\n\n- Area: Auth\n- Names: `claude auth login`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: both\n- Heads-up: no"}