Skip to content

docker entrypoint should detect ANTHROPIC_AUTH_TOKEN as valid Claude auth #483

@eric-sss89

Description

@eric-sss89

Summary

The Docker entrypoint currently reports No auth configured when Claude auth is provided via ANTHROPIC_AUTH_TOKEN. This is a bug: the auth check should recognize ANTHROPIC_AUTH_TOKEN as a valid Claude auth source.

Problem

In docker/entrypoint.sh, Step 1 only checks these Claude-side variables:

  • ANTHROPIC_API_KEY
  • CLAUDE_CODE_OAUTH_TOKEN

It does the same when checking the mounted .env fallback. If neither of those is present, it errors with:

No auth configured. Set ANTHROPIC_API_KEY / CLAUDE_CODE_OAUTH_TOKEN (Claude) or OPENAI_API_KEY / CODEX_API_KEY (Codex).

However, there are setups where Claude auth is provided through ANTHROPIC_AUTH_TOKEN. In that case, the entrypoint should not fail the auth precheck, but today it does because that variable is ignored.

Reproduction

  1. Start the Docker image with ANTHROPIC_AUTH_TOKEN set
  2. Do not set ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN
  3. Observe the container fails early with No auth configured

Expected behavior

The Docker entrypoint should treat ANTHROPIC_AUTH_TOKEN as valid Claude auth during:

  • environment-variable auth detection
  • .env fallback auth detection
  • Claude auth/runtime detection logic
  • auth token resolution for the later zylos init path, if applicable

Why this matters

The current precheck is incomplete and rejects valid Claude auth configurations. This causes startup failure even though usable auth is already present in the container environment.

Suggested direction

  • Add ANTHROPIC_AUTH_TOKEN to the Step 1 auth presence check
  • Add ANTHROPIC_AUTH_TOKEN to the .env fallback grep
  • Include it in Claude-auth detection (HAS_CLAUDE_AUTH)
  • Review whether AUTH_TOKEN resolution should also prefer / accept ANTHROPIC_AUTH_TOKEN
  • Update the error/help text and docs so supported Claude auth env vars are listed consistently

References

  • docker/entrypoint.sh Step 1 auth check
  • docker/entrypoint.sh AUTH_TOKEN resolution
  • docker/entrypoint.sh HAS_CLAUDE_AUTH runtime detection

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