CodingAgent is a ReActAgent subclass preconfigured for software-engineering tasks. It bundles a curated tool set, system prompt, and harness behavior — file I/O, search, shell, web, todos, plan mode, and subagent dispatch — so you can spin up a working coding assistant in a few lines.
sandbox= (e.g. a DockerSandbox) to run in isolation.
What’s included
When you constructCodingAgent with no special flags, the agent gets the following tools:
The system prompt encodes a clear working philosophy: prefer dedicated tools over
bash, parallel tool calls when independent, file references as path:line, anti-overengineering, careful handling of destructive actions, and so on.
Customizing the system prompt
There are five ways to customize the prompt, ordered from least to most invasive. The first is the recommended default for project-scoped instructions.1. AGENTS.md (recommended)
Drop a markdown file at the project root and CodingAgent picks it up automatically, wrapping it in a <system-reminder> block at the end of the system prompt. Use this for project-specific rules that should travel with the codebase.
CodingAgent walks the file at project_root/AGENTS.md (defaults to current working directory) plus a fallback CLAUDE.md. Both are included if both exist; AGENTS.md is rendered first.
AGENTS.md standard, so the same file is portable across any agent that follows it.
2. system_prompt_extra — append your own block
For per-agent rules that don’t belong in AGENTS.md (personal preferences, agent-specific roles), append text to the end of the default prompt:
AGENTS.md injection.
3. Render then patch
When you want to keep most of the default but rewrite a specific section, render the prompt explicitly and edit the string before passing it back:4. system_prompt — full replacement
Pass any string to replace the default entirely. Use when you want a completely different agent personality but still want the CodingAgent tool wiring. Note: AGENTS.md injection is skipped when system_prompt is passed explicitly — you’d need to call build_system_prompt() and incorporate the project context yourself if you want both.
5. Subclass CodingAgent
For fundamental shape changes — different file conventions, additional auto-injected sections, custom prompt-build pipeline — subclass and override. Reach for this only when the four above don’t fit.
Toggling features
All capability sets are keyword flags. PassFalse to remove a tool group.
Adding extra tools
Passextra_tools=[...] to add tools alongside the builtins:
tools=[...] instead. (extra_tools, enable_web, enable_subagents, etc. are ignored when tools= is set.)
Sandboxing
By defaultCodingAgent uses a LocalShell sandbox — actions affect your real filesystem. For isolated runs:
LocalShell, DockerSandbox, or CloudSandbox — only the sandbox arg changes.
Constructor reference
All keyword arguments aftermodel_name:
All other
ReActAgent keyword arguments pass through unchanged.
