feat(ironclaw): Anthropic OAuth auth and global chat mode - #25
Merged
Merged
Conversation
The validation runner was constructing an incomplete BastionState missing
required fields (objectives, taskType, invocationCount, etc.) and passing
plain {role, content} objects instead of LangChain BaseMessage instances.
This caused buildAgentSystemPrompt to throw on state.objectives.join(),
silently falling back to [Simulated] responses that score near-zero on
every metric — triggering circuit breaker disables for ALL agents.
The bug was exposed by the fixture-loading fallback (cb0a447) which made
validation tests actually run for the first time.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch ironclaw from API key billing to Anthropic OAuth (subscription-based) by building from source to include PR nearai/ironclaw#384. Add global chat mode so ironclaw is usable anywhere in the app, not just inside problem sets. - Dockerfile: multi-stage build from source (main branch) for OAuth support - docker-compose: add ANTHROPIC_OAUTH_TOKEN env var (dev + prod) - Backend: add POST /global/message and GET /global/history routes scoped per-user via DID-derived thread IDs - Frontend: enable chat input in global mode with mode indicator, dynamic WebSocket channel subscription from API response - .env.example: document ironclaw config section Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ALuhning
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ANTHROPIC_OAUTH_TOKENenv var added to both dev and prod compose filesChanges
ironclaw/Dockerfiledocker-compose*.yml,.env.exampleANTHROPIC_OAUTH_TOKENenv varironclaw-router.tsPOST /global/message,GET /global/historyroutesironclaw-service.tshandleGlobalMessage,getGlobalHistory,getGlobalChannel— per-user scopedironclaw-service.tssendMessage/getHistoryuseIronclaw.tsIronclawDrawer.tsxIronclawContext.tsxisGlobalModeinstead ofnoProblemSetSetup
claude setup-token(headless) orclaude login(browser)ANTHROPIC_OAUTH_TOKEN=sk-ant-oat01-...to.env(local) and.env.prod(server)ANTHROPIC_API_KEY(OAuth takes lower priority — if API key exists, it wins)Test plan
docker compose build ironclawUsing Anthropic OAuth API🤖 Generated with Claude Code