Skip to content

Claude Code

Claude Code is Anthropic’s official command-line agent. Agentslan dispatches it in headless mode (claude -p) and pipes prompts via the Claude Code CLI, so agents work without supervision once you wire them up.

The adapter type inside Agentslan is claude_local and the menu label is Claude Code (local).

You need Node.js 18 or newer. Install Claude Code globally so the claude binary is on your PATH:

Terminal window
npm install -g @anthropic-ai/claude-code

Verify the install:

Terminal window
claude --version

If claude is not on your PATH, set the command field in the adapter configuration to the full path of the binary.

Run claude once interactively before connecting it to Agentslan:

Terminal window
claude

Complete the OAuth flow in your browser. After you sign in once, Claude Code caches credentials on disk and Agentslan can dispatch it headlessly.

You can also use an API key by setting ANTHROPIC_API_KEY in the host environment or in the adapter env map.

  1. Open the Agentslan desktop app.
  2. Go to Agents → Add agent.
  3. Choose Claude Code (local) as the adapter type.
  4. Set a model. The adapter ships with these options:
    • claude-opus-4-7 (Claude Opus 4.7)
    • claude-opus-4-6 (Claude Opus 4.6)
    • claude-sonnet-4-6 (Claude Sonnet 4.6)
    • claude-haiku-4-6 (Claude Haiku 4.6)
    • claude-sonnet-4-5-20250929 (Claude Sonnet 4.5)
    • claude-haiku-4-5-20251001 (Claude Haiku 4.5)
  5. Save. The agent is now eligible to be assigned to issues.

The fields below are read from the adapter’s agentConfigurationDoc constant in claude-local. Most defaults are sensible; surface them only when you need to override.

FieldTypeNotes
cwdstring, optionalDefault absolute working directory for the agent process. Created if missing when possible.
instructionsFilePathstring, optionalAbsolute path to a Markdown instructions file injected into the run at runtime.
modelstring, optionalOne of the model IDs above.
effortstring, optionalReasoning effort, passed via --effort: low, medium, or high.
chromeboolean, optionalPass --chrome when running Claude.
promptTemplatestring, optionalRun prompt template.
maxTurnsPerRunnumber, optionalMaximum agent turns in a single run.
dangerouslySkipPermissionsboolean, optionalDefaults to true. Passes --dangerously-skip-permissions so headless --print runs do not stall on interactive permission prompts.
commandstring, optionalDefaults to claude. Override with a full path if Claude Code is installed somewhere else.
extraArgsstring[], optionalAdditional CLI arguments.
envobject, optionalExtra KEY=VALUE environment variables for the run.
workspaceStrategyobject, optionalCurrently supports { type: "git_worktree", baseRef?, branchTemplate?, worktreeParentDir? }.
timeoutSecnumber, optionalRun timeout in seconds.
graceSecnumber, optionalSIGTERM grace period in seconds before SIGKILL.
  • Agentslan runs Claude in headless --print mode. Anything that would prompt for interactive input will hang the run; that is why dangerouslySkipPermissions defaults to true.
  • Claude Code reads AGENTS.md from the working tree if present; that discovery cannot be suppressed.