Claude Code
Operating Claude Code on workers — sign-in, permission modes and allowed tools, MCP servers, several repositories, Bedrock and Vertex, and troubleshooting.
Sign-in
Sign in to Claude Code once as the worker's user (subscription login or ANTHROPIC_API_KEY). With
ANTHROPIC_API_KEY set in the worker's environment, the worker treats it as authenticated; otherwise
authentication is checked on the first run.
Settings
| Setting | Default | Effect |
|---|---|---|
| Permission mode | acceptEdits | Passed as --permission-mode; one of acceptEdits, auto, bypassPermissions, manual, dontAsk, plan |
| Allowed tools | — | Passed as --allowed-tools to restrict tools |
| Model | default | With an explicit model, --model <model> |
MCP servers
MCP servers installed from the registry for the task's scope are written to
<state>/mcp/<task>.json and passed with --mcp-config. Stdio servers get the manifest's command and env;
http and sse servers get type and url. Each server is health-checked first (results cached for five minutes);
failing ones are left out and the timeline says why.
Several repositories
For projects with several repositories, each extra checkout is passed with --add-dir. Claude Code is the only
adapter with this capability, so multi-repository tasks go only to workers that have it.
Bedrock and Vertex
With the Bedrock provider the worker sets CLAUDE_CODE_USE_BEDROCK=1 and passes AWS credentials; with Vertex,
CLAUDE_CODE_USE_VERTEX=1, ANTHROPIC_VERTEX_PROJECT_ID and CLOUD_ML_REGION.
Troubleshooting
- Task asks for input but never gets it: in headless mode Claude Code cannot ask interactive questions. Put what it needs into the prompt or background.
- Limits: a
rate_limit_eventwithresetsAtlets the task wait until the reset; add add-on models to continue instead.