Skip to content

[Bug]: clawdbot configure can write auth to wrong path #332

@CashWilliams

Description

@CashWilliams

Had codex do an investigation, its output-

Verification of clawdbot configure auth write path:

  • The configure flow writes creds via writeOAuthCredentials / setAnthropicApiKey in src/commands/onboard-auth.ts, which call upsertAuthProfile without an agentDir override.
  • upsertAuthProfile resolves the auth store path via resolveClawdbotAgentDir() (src/agents/auth-profiles.ts), which defaults to resolveConfigDir()/agent (src/agents/agent-paths.ts + src/utils.ts).
  • The new per-agent path is stateDir/agents/<id>/agent (src/agents/agent-scope.ts), but the configure code doesn’t use that (and doesn’t pass agentDir).

Conclusion: yes — unless CLAWDBOT_AGENT_DIR or PI_CODING_AGENT_DIR is set in the environment, clawdbot configure is still writing auth creds to the legacy [config_dir]/agent location instead of [config_dir]/agents/<id>/agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions