/coder mode is specialized for software engineering tasks with a read, modify, and feedback cycle.
It provides more rigor than /agent, because the assistant follows an output contract so that ChatCLI can execute actions safely (with rollback semantics).
When to Use
Use /coder for...
Real changes to the repository, running tests/lint/build automatically, applying patches with rollback, iterating until a verifiable result.
Use /agent for...
High-level conversations, writing text, ideas, plans — without executing code directly.
Engineering Flow
Multi-Agent Orchestration
/coder includes multi-agent orchestration enabled by default. The orchestrator LLM dispatches specialized agents in parallel:
| Agent | Role |
|---|---|
| FileAgent | Code reading and analysis (read-only) |
| CoderAgent | Code writing and modification |
| ShellAgent | Command execution and testing |
| GitAgent | Version control operations |
| SearchAgent | Codebase search (read-only) |
| PlannerAgent | Reasoning and task decomposition (no tools) |
| ReviewerAgent | Code review and quality (read-only) |
| TesterAgent | Test generation and coverage |
| RefactorAgent | Structural transformations (rename, extract, move) |
| DiagnosticsAgent | Troubleshooting and error investigation |
| FormatterAgent | Code formatting and style |
| DepsAgent | Dependency management and auditing |
| Custom Agents | Personas from ~/.chatcli/agents/ registered automatically |
CHATCLI_AGENT_MAX_WORKERS).
Disable with
CHATCLI_AGENT_PARALLEL_MODE=false if needed. See the full documentation.Output Contract
The assistant’s response format in/coder is mandatory:
Tools and Dependency
The/coder mode uses the @coder plugin, which comes built into ChatCLI — no additional installation required.
Supported Subcommands
| Subcommand | Description |
|---|---|
tree --dir . | List directory tree |
search --term "x" --dir . | Search the codebase |
read --file x | Read file |
write --file x --content "..." --encoding base64 | Write file |
patch --file x --search "..." --replace "..." | Apply patch |
patch --diff "..." --diff-encoding base64 | Apply unified diff |
exec --cmd "command" | Execute command |
git-status --dir . | Git status |
git-diff --dir . | Git diff |
git-log --dir . | Git log |
git-changed --dir . | Changed files |
git-branch --dir . | Current branch |
test --dir . | Run tests |
rollback --file x | Revert change |
clean --dir . | Clean backups |
Example Flow
Operation Parallelization
/coder maximizes parallelism by emitting multiple tool_calls in a single response when operations are independent. For example, when needing to read 3 files, the AI emits 3 tool_call tags at once instead of one per turn.
For complex tasks with 3+ independent operations, the AI uses <agent_call> to dispatch specialized agents in parallel via goroutines.
FAQ
Can I use JSON in args?
Can I use JSON in args?
Yes, it is the recommended format:
tool_call name="@coder" args='{"cmd":"read","args":{"file":"main.go"}}'When should I use patch --diff?
When should I use patch --diff?
When the change involves multiple sections or requires more precision. It accepts unified diff in
text or base64.Do I need to install @coder separately?
Do I need to install @coder separately?
No.
@coder is a builtin plugin — it comes embedded in the binary. If you install a custom version in ~/.chatcli/plugins/, it will take precedence over the builtin.Is exec safe?
Is exec safe?
@coder exec blocks dangerous patterns by default. For sensitive commands, prefer using the Git subcommands and test.Is there a read limit?
Is there a read limit?
Yes. Use
read --max-bytes, --head, or --tail to control the output size.