Skip to content

Desktop readiness ignores per-agent auth environment and blocks signed-in Claude accounts #7836

Description

@zeanserssi

Bug

Buzz Desktop 0.5.23 on macOS (Apple Silicon) starts an authenticated managed Claude agent in setup-listener mode when the agent uses a separate CLAUDE_CONFIG_DIR and the desktop's default Claude account is logged out. The agent never starts its normal model pool; mentions produce setup nudges instead of normal replies.

Reproduction

  1. Configure a managed Claude agent with its own CLAUDE_CONFIG_DIR in its effective environment.
  2. Authenticate that account. Leave the default Claude configuration logged out.
  3. Compare the same CLI under the two environments:
    • claude auth status: loggedIn: false, exit 1.
    • CLAUDE_CONFIG_DIR=/path/to/agent-account claude auth status: loggedIn: true, authMethod: claude.ai, exit 0.
  4. Start/restart the agent in Buzz.

Observed on a live installation: the runtime received the correct agent-specific CLAUDE_CONFIG_DIR, but also received a BUZZ_ACP_SETUP_PAYLOAD containing surface: cli_login, availability: available, and probe_args: ["claude", "auth", "status"]. Its log then recorded:

buzz-acp: setup payload present, entering setup-listener mode
buzz-acp entering setup mode ... requirements=1

The relay connection and channel subscriptions succeeded. Other Claude agents using separate account directories were affected as well. This is a local startup readiness failure, not evidence of a relay delivery failure.

Expected

The startup readiness check uses the same account environment as the agent being launched. An authenticated isolated account should start the normal agent pool even if the desktop's default account is logged out.

Root cause

In desktop/src-tauri/src/managed_agents/:

  • runtime.rs constructs EffectiveAgentEnv from descriptor.env for readiness and later applies that environment to the launched process.
  • readiness.rs::collect_missing_requirements does not pass the effective environment to cli_login::requirements for Claude/Codex.
  • readiness/cli_probe.rs::login_probe only overrides PATH; the auth subprocess otherwise inherits the desktop's environment.

Thus the startup probe and the actual agent consult different account configurations. The same omission affects CODEX_HOME routing, although the reported live failure was reproduced with Claude.

Fix direction

Pass the effective environment through cli_login::requirements into login_probe, applying it to the child process with the same precedence as agent startup. Keep failed-account and invalid-config classification intact. Add regression coverage for account-specific config paths (including spaces) and logged-out accounts.

A local patch and regression test are prepared; deployment validation is in progress. No upstream PR yet.

Related: #5460 describes CLI/adapter credential-store disagreement. This report isolates the additional per-agent environment omission in the startup readiness path, reproducible with the same CLI binary simply by changing CLAUDE_CONFIG_DIR.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions