Skip to content

bug: CLAUDE_CODE_OAUTH_TOKEN from .env not picked up in web terminal (ttyd) #21

Closed

Description

@itscooleric

Summary

When running Claude Code via the web terminal (./clide web / make web), CLAUDE_CODE_OAUTH_TOKEN set in .env is ignored. Claude starts into the normal unauthenticated first-run setup loop, requiring a browser-based OAuth login to proceed.

This works correctly via make claude and make shell.

Steps to Reproduce

  1. Set CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-... in .env
  2. Run ./clide web or make web
  3. Open the web terminal at http://localhost:7681
  4. Run claude

Expected Behaviour

Claude authenticates silently using the token from .env, same as it does in make claude / make shell.

Actual Behaviour

Claude enters the unauthenticated startup loop and prompts for browser-based OAuth login.

Root Cause (suspected)

The web service in docker-compose.yml likely doesn't pass CLAUDE_CODE_OAUTH_TOKEN through to the container environment, or the claude-entrypoint.sh pre-seed logic that handles auth config isn't wired into the ttyd session the same way it is for the claude and shell services.

Acceptance Criteria

  • CLAUDE_CODE_OAUTH_TOKEN set in .env is available inside the ttyd web terminal session
  • Running claude in the web terminal authenticates without prompting, same as make claude
  • ANTHROPIC_API_KEY path is verified to work the same way
  • No regression to make claude / make shell auth behaviour

Activity

  1. added a commit that references this issue on Mar 5, 2026
    cbe871c
  2. added a commit that references this issue on Mar 5, 2026
    d485440
  3. added a commit that references this issue on Apr 23, 2026
    6d8bac0
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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions