fix(dispatch): load user settings so API-key auth works in --local

main

Commit

alishakawaguchi2mo ago

entire dispatch --local shells out to the claude CLI with --setting-sources "", which tells claude to load none of the user, project, or local setting sources. API-billing users configure auth in their user settings (apiKeyHelper, or the ANTHROPIC_API_KEY approval in customApiKeyResponses), so dropping all sources dropped their auth and claude reported "Not logged in · Please run /login" — even though their plain claude -p worked.

Switch to --setting-sources user, which loads the user's ~/.claude/settings.json (restoring auth) while still excluding project and local settings. The subprocess already runs in os.TempDir(), so project/local isolation is preserved regardless. Subscription and raw ANTHROPIC_API_KEY env-var users were unaffected either way.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Claude-Session: https://claude.ai/code/session_012QYA1kFFwDTbR8cZQQkb8N Entire-Checkpoint: 01KXPBMJJ1Z9J772ZABFNQBGX0