fix(cli): drop --remote-config from auth and skip reading it for unsupported commands
Merged
SA
5d ago+65+65+01234567890123456789-9-9-0123456789
Summary
Implements option (a) from #4887: drop remoteConfig from auth so every session-less command rejects --remote-config, and skip reading --remote-config files before flag validation rejects unsupported commands. Closes #4887.
- Remove
remoteConfigfromauth.supportedFlagsinpackages/command-surface/src/schema/command-overrides.ts(authwas the only command withsession: falseandremoteConfig: true). - Guard
shouldApplyRemoteConfigDefaultsinsrc/cli/resolve-cli-options.tswithisFlagSupportedForCommand('remoteConfig', command)so unsupported commands reject--remote-configwithout reading the file. - Update and add parser, resolver, CLI, and leased-session tests covering valid, invalid-JSON, and missing profiles plus
help auth.
Before / after
Built CLI, fresh state directory:
auth status --remote-config ok.json: before succeeded and ignored the profile; after exits 1 withINVALID_ARGS(Flag --remote-config is not supported for command auth.).auth status --remote-config bad.json/missing.jsonandweb doctor --remote-config missing.json: before failed with JSON or file-not-found errors; after reject--remote-configas unsupported without reading the file.
Validation
- Head
019972943:pnpm check:affected --runpassed (exactCommit=true:format,lint,typecheck,layering,fallow,build,vitest-related, fullunit), pluseager-closure-budgets(919/919),check:command-docs,check:doc-prose, andcheck:doc-links. - Controlled revert failed all 5 regression test files.
- Independent Claude Opus 5.5 verification passed.
Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved.
Created with Claude Opus 5.5 and Gemini 4 Neon in T3 Code.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.