Skip to main content
The /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:
AgentRole
FileAgentCode reading and analysis (read-only)
CoderAgentCode writing and modification
ShellAgentCommand execution and testing
GitAgentVersion control operations
SearchAgentCodebase search (read-only)
PlannerAgentReasoning and task decomposition (no tools)
ReviewerAgentCode review and quality (read-only)
TesterAgentTest generation and coverage
RefactorAgentStructural transformations (rename, extract, move)
DiagnosticsAgentTroubleshooting and error investigation
FormatterAgentCode formatting and style
DepsAgentDependency management and auditing
Custom AgentsPersonas from ~/.chatcli/agents/ registered automatically
Each agent has its own skills and executes in its own isolated mini ReAct loop. Multiple agents run simultaneously via goroutines with a configurable semaphore (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:
1

Reasoning

Before any action, the assistant writes a short reasoning block (2 to 6 lines).
2

Tool Call

If it needs to act, it emits a tool_call name="@coder" args="..." with JSON in the args.
3

No direct commands

It never uses code blocks or direct shell commands — everything goes through @coder.

Tools and Dependency

The /coder mode uses the @coder plugin, which comes built into ChatCLI — no additional installation required.
Check with /plugin list@coder appears with the [builtin] tag.

Supported Subcommands

SubcommandDescription
tree --dir .List directory tree
search --term "x" --dir .Search the codebase
read --file xRead file
write --file x --content "..." --encoding base64Write file
patch --file x --search "..." --replace "..."Apply patch
patch --diff "..." --diff-encoding base64Apply 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 xRevert change
clean --dir .Clean backups

Example Flow

1

List the tree

tree --dir .
2

Search for occurrences

search --term "FAIL" --dir .
3

Read relevant files

read --file cli/agent_mode.go
4

Apply patch

patch --file cli/agent_mode.go --search "..." --replace "..."
5

Run tests

exec --cmd "go test ./..."

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.
If you notice the AI performing sequential operations that could be parallel, remind it: “emit all independent tool_calls in a single response”.

FAQ

Yes, it is the recommended format:tool_call name="@coder" args='{"cmd":"read","args":{"file":"main.go"}}'
When the change involves multiple sections or requires more precision. It accepts unified diff in text or base64.
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.
@coder exec blocks dangerous patterns by default. For sensitive commands, prefer using the Git subcommands and test.
Yes. Use read --max-bytes, --head, or --tail to control the output size.