Skip to content

auth: --remote-config is read but ignored since #4879 #4887

Closed

Description

@samanyudas

Note

🤖 Drafted by Claude Opus 5.5. Reviewed by @samanyudas and posted on their behalf.

Follow-up from the review of #4879 (#4879 (comment)).

Purpose

auth lists remoteConfig in its supported flags (packages/command-surface/src/schema/command-overrides.ts, supportedFlags: ['remoteConfig', 'stateDir']). Since #4879, no auth path reads it. The CLI reads the file, then ignores it.

Current behavior

At #4879's head (18ec3c8), with the built CLI and a fresh state directory:

  • auth status --remote-config ok.json --json succeeds and writes nothing. The profile has no effect.
  • auth status --remote-config bad.json fails with INVALID_ARGS, "Invalid JSON in remote config file".
  • auth status --remote-config missing.json fails with INVALID_ARGS, "Remote config file not found".

Before #4879, auth login --remote-config <profile> sent the profile's tenant, runId, daemonBaseUrl, and session as hints in the device-auth start request. It also leased a device on the local daemon, which #4879 removed.

Required behavior

Choose one, then implement it:

  • (a) Drop remoteConfig from auth. Then auth --remote-config <file> fails as an unsupported flag, like the other commands that take no session.
  • (b) Keep the flag for auth login only, and pass the profile's hints to loginWithDeviceAuth explicitly, with no connection, lease, or saved state.

Completion conditions

  • (a) A CLI test shows auth status --remote-config <file> refused as unsupported, and the help and docs no longer list the flag for auth.
  • (b) A test shows auth login --remote-config <profile> sending the profile's hints in the device-auth start body, and writing no remote-connection state.

Dependencies

Blocked by: #4879 (merge).

Activity

  1. added
    bug
    on Nov 22, 2026
  2. samanyudas commented on Nov 22, 2026

    @samanyudas
    ContributorAuthor

    Note

    🤖 Gemini 4 Neon responding on behalf of samanyudas

    Opened #4957 (019972943) implementing option (a).

    • Removed remoteConfig from auth.supportedFlags in packages/command-surface/src/schema/command-overrides.ts, aligning auth with every other session-less command (daemon, device, mcp, plugins, proxy, web).
    • Guarded shouldApplyRemoteConfigDefaults in src/cli/resolve-cli-options.ts with isFlagSupportedForCommand('remoteConfig', command) so unsupported commands reject --remote-config as INVALID_ARGS before reading the profile from disk (covering valid, invalid-JSON, and missing paths on both auth and other session-less commands such as web).
    • Verified with built-CLI runs, controlled revert (all 5 test files fail when production edits are reverted), pnpm check:affected --run (exactCommit=true, 8/8 local gates including full unit), eager-closure-budgets (919/919), doc checks, gpt-6.2-sol review (1 round, APPROVE), Claude Opus 5.5 verification (PASS), and 15/15 passing CI checks on fix(cli): drop --remote-config from auth and skip reading it for unsupported commands #4957.
  3. added a commit that references this issue on Nov 22, 2026
    52f7c6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions