@coder envelope.
Atomic tools coexist with
@coder — @coder read/search/tree keeps working. The difference is that the LLM can now pick the narrow tool (more precise) when it wants to execute a single read-only operation.The four tools
@read — file read
Equivalent to Claude Code’s Read. Flat schema:
path, filepath. Line range, head/tail, and base64 encoding supported. files reads several files in one call with the same range options ({"files":["go.mod","Makefile"]}). Lines come numbered; a whole-file read is capped at 2000 lines and says how to continue. Output cap: 80 000 chars (versus the 30k global) — large files (~1500 lines) fit whole.
@search — regex search
Equivalent to Claude Code’s Grep. Flat schema:
pattern, query, regex. Include glob and a result cap that defaults to 200 matching lines and is actually applied. Modes: literal:true matches the text as typed (no regex), case_sensitive:true, context:N adds surrounding lines, and files_only:true returns one line per file with its match count, most matches first — the cheap first pass over a large tree before reading the files that matter. Output cap: 60 000 chars.
@tree — directory tree
Flat schema (all optional — {} lists the cwd):
.git, node_modules and vendor are always skipped and dotfiles unless include_hidden; exclude is a comma-separated list of exact names skipped anywhere in the tree; max_entries (default 2000) stops the listing, which says when the cap cut it. Output cap: 50 000 chars.
@todo — task plan management
Parity with Claude Code’s TodoWrite. Three subcommands:
pending | in_progress | completed | failed | blocked | cancelled. blocked means the task cannot proceed until the user or an external system acts (the plan’s focus moves to the next workable task; marking it pending/in_progress resumes it). cancelled drops the task on purpose and removes it from the progress count. The optional error field keeps the reason next to a failed, blocked or cancelled task (mark also accepts reason). Synonyms the model may write (done, waiting, skipped, canceled…) are normalized. The @todo adapter routes into the active AgentMode’s cli/agent/task_tracker.go.
Besides write (the whole plan) and mark (one status), add {todos:[…]} appends tasks to the current plan — for a step discovered mid-run — keeping every existing task and its status, and update {id, description} rewords one task without touching its status.
Why narrow tools matter
Transactional multipatch
New in@coder:
JSON Schema validation
Every atomic plugin ships a draft-2020-12 JSON Schema. The agent loop validates LLM args before callingExecute. Failures return ToolResult{IsError:true, ErrorCode:"InvalidArgs"} with the offending JSON path named — the model gets clear feedback instead of a panic/empty result.
Legacy plugins without JSONSchemaAware bypass validation (purely additive change).
Capability-aware permission gate
Thepolicy_manager now consults the capability resolver before falling through to the default ActionAsk:
- Deny rules (strictest)
- Safety-immune (always asks)
- Explicit allow/ask (longest pattern wins)
- Read-only exec heuristic
- NEW: capability gate — auto-allow plugins with
IsReadOnly=true - Default: Ask
@read, @search, @tree, @websearch, @webfetch (GET), @scheduler query/list run without a security prompt while write/exec stay gated.