-
Notifications
You must be signed in to change notification settings - Fork 526
Description
Operating System
Linux (WSL2)
Run Mode
Docker
App Version
v0.14.0rc
Bug Description
When running Automaker via Docker with Claude OAuth credentials mounted (from ~/.claude/.credentials.json), the server startup still shows:
WARN [Server]
╔═════════════════════════════════════════════════════════════════════╗
║ ⚠️ WARNING: No Claude authentication configured ║
╠═════════════════════════════════════════════════════════════════════╣
║ ║
║ The Claude Agent SDK requires authentication to function. ║
║ ║
║ Set your Anthropic API key: ║
║ export ANTHROPIC_API_KEY="sk-ant-..." ║
║ ║
║ Or use the setup wizard in Settings to configure authentication. ║
║ ║
╚═════════════════════════════════════════════════════════════════════╝
This warning appears even though OAuth credentials are properly mounted and accessible inside the container.
Root Cause
The startup check in apps/server/src/index.ts:121-148 only checks for ANTHROPIC_API_KEY environment variable:
const hasAnthropicKey = !!process.env.ANTHROPIC_API_KEY;
if (!hasAnthropicKey) {
// Shows warning
}However, the getClaudeStatus() function in apps/server/src/routes/setup/get-claude-status.ts:102-172 has comprehensive OAuth detection logic that:
- Checks for
.credentials.jsonwith OAuth tokens viagetClaudeAuthIndicators() - Detects CLI authentication indicators
- Checks for recent activity
The startup warning should use the same detection logic (or a simplified sync version) to also detect OAuth credentials before displaying the warning.
Steps to Reproduce
- Authenticate with Claude CLI (
claude login) on host - Configure
docker-compose.override.ymlto mount~/.claudedirectory - Run
docker-compose up - Observe the warning despite OAuth credentials being available
Expected Behavior
The startup check should detect OAuth credentials from ~/.claude/.credentials.json and NOT show the warning when valid OAuth credentials are present.
Actual Behavior
Warning is always shown when ANTHROPIC_API_KEY is not set, even if OAuth credentials are configured.
Suggested Fix
The startup check should call getClaudeAuthIndicators() from @automaker/platform (or a simplified sync check) to detect OAuth credentials. Something like:
import { getClaudeAuthIndicators } from '@automaker/platform';
// At startup
const hasAnthropicKey = !!process.env.ANTHROPIC_API_KEY;
const indicators = await getClaudeAuthIndicators();
const hasOAuth = indicators.hasCredentialsFile && indicators.credentials?.hasOAuthToken;
if (!hasAnthropicKey && !hasOAuth) {
// Show warning
} else if (hasOAuth && !hasAnthropicKey) {
logger.info('✓ Claude OAuth credentials detected');
}Screenshots
No response
Relevant Logs
automaker-server | WARN [Server]
automaker-server | ╔═════════════════════════════════════════════════════════════════════╗
automaker-server | ║ ⚠️ WARNING: No Claude authentication configured ║
...Additional Context
The OAuth credentials are accessible inside the container (verified with ls -la showing .credentials.json).
Checklist
- I have searched existing issues to ensure this bug hasn't been reported already
- I have provided all required information above