$ wcode --agents
wcode
A coding agent for the terminal, built around teams and workflows — not a single agent that fires off opaque subagents.
Declare a team and a task DAG; the orchestrator delegates, and every member stays addressable and controllable live — peek at its work, ask it a question, or stop it, without waiting for it to finish.
Four Rust crates, ~52,000 lines: a ~10k-line kernel
(wcode-harness), a socket protocol
(wcode-protocol), a full-screen TUI
(wcode-tui), and a thin CLI (wcode-cli). One
binary over any OpenAI-compatible endpoint.
deps edges, a gate, and a reject that re-opens the work it judges.Teams and workflows, first-class
-
Declare the team
[team]names your members at startup — orspawnone at runtime. Each gets its ownmodel,role,tools,read_only,effort, and even its own provider. Address a member by name withmessage;peerslists the roster with live state. -
Declare the workflow
[workflow]is a real task DAG, not a to-do list: nodes withdepsedges,gatenodes, and rework caps. A scheduler dispatches ready nodes, and a gate'srejectre-opens the work it judges — so "review it" is an enforced edge, not a prompt. -
Stay in control
The
membertool works mid-run:statuspeeks a member's last completed work,askputs a question to it, andcancelstops it — all without waiting for its turn to end. The orchestrator never blocks on a worker.
A team, not a subagent
A typical agent spawns a subagent for a task and blocks until it returns one string — you can't see it, steer it, or stop it, and the plan is whatever the model improvised. wcode makes every worker a first-class member of a declared team.
| a normal subagent flow | wcode | |
|---|---|---|
| while it runs | a black box — you wait for one return value | member status peeks its work, ask questions it, cancel stops it |
| control | none — no interrupt, no redirect | message steers it at the next turn; member cancel kills a stuck run |
| the plan | improvised by the model, unenforced | a declared task DAG — deps edges, gates, rework caps, a scheduler |
| verification | a hope in the prompt ("please review") | a gate edge — a reject re-opens the work; a hook refuses an unverified completion |
| blocking | the parent turn blocks until it returns | async — the orchestrator keeps going and is woken by the worker's report (even on failure) |
| the worker | inherits everything; context discarded | own model / role / tools / read-only / effort / provider; a persistent session |
| where it runs | in-process only | in-process or across a socket — a member on another machine is reached the same way |
| in the UI | one collapsed tool result | its own surface + a live sidebar row (state + current action) |
A single agent is still one flag away — teams are opt-in
(--agents).
An orchestrator, delegating
$ wcode --agents --config .wcode/team.toml
# your team · explorer (read-only) · builder · reviewer
❯ implement the retry policy, then have it reviewed
⚙ message(explorer) → "map the retry seam" ✓ done
⚙ task(create) #1 explore → #2 implement → #3 verify
⚙ message(builder) → "#2 implement" ● running
⚙ member(builder) → "what are you on?" ✓ 1 line
⚙ message(reviewer) → "#3 review the diff" ○ queued
read · grep/find · bash · edit — content-addressed, token-lean
What's in the box
-
Full-screen TUI
Each member is its own surface, with a live sidebar (state + current action). Streaming markdown (CommonMark + GFM, syntax-highlighted), a 7-theme catalog, browse mode, and drag-to-select. A
wcode-protocolclient, so a local or socket session is driven identically. -
Persistent sessions
Every conversation is a JSONL file. A team's sessions persist as a group and resume together, and
session_searchreads across all of them. One-shot-p, a line REPL, or the TUI — the same session. -
Token-minimal by design
Content-addressed
read/edit— a line's 5-char anchor is its address, so old code is never re-typed.bashspills large output to a file and returns a bounded preview. Auto-compaction keeps the window lean. -
Skills & instructions
SKILL.mdpackages are discovered project-first; only each skill's name + description enter the prompt, and the body loads on demand.AGENTS.md/CLAUDE.md— a global file plus the ancestor chain — fold into the system prompt. -
Plan mode
Explore and propose without touching the workspace: the editing tools are disabled and mutating shell is refused, until you approve.
/planflips it live, even mid-run. -
Small, and extensible by code
One kernel (
wcode-harness) — no MCP, no permission prompts, no behavior config. A tool is aTypedTool, a policy is aHooksimpl, a provider is aStreamFn. Any OpenAI-compatible endpoint, keyless local included.
19 tools, one small kernel
| tool | what it does |
|---|---|
read | file contents as ANCHOR│line — the 5-char anchor is a line's address and the edit target |
edit · edits | replace an anchor range; or a whole batch of ranges, atomically, in one file |
replace | exact-string substitution for quick unique edits |
write | create or overwrite a file, byte-for-byte |
grep · find | regex search and glob listing; hits carry anchors, straight into edit (both respect .gitignore) |
ast_search · ast_edit | structural search and rewrite via ast-grep |
session_search | search this session, or across every session on disk |
bash · bg | sh -c with a timeout and Ctrl-C kill; big output spills to a file. Background a long command and list/wait/kill it |
webfetch | one GET; HTML reduced to readable text; bounded |
todo · task | the model's own checklist, streamed to the UI; and the shared task DAG (root-only) |
spawn · message · peers · member | the team: define a member, message it by name, list the roster, and inspect or stop a run mid-flight |
Install
-
Homebrew
brew tap WeiNyn/wcode https://github.com/WeiNyn/wcode brew install wcode -
crates.io
cargo install wcode-cli -
Prebuilt binaries
Linux (x86_64, aarch64) and macOS (Intel, Apple Silicon) tarballs — with a sha256 — are attached to each release.
Quickstart
~/.config/wcode/config.toml:
model = "gpt-4.1" # required
base_url = "https://api.openai.com/v1" # optional; any OpenAI-compatible endpoint
api_key = "sk-..." # optional
wcode -p "explain this repo" # one-shot
wcode # start the TUI
wcode --agents # start with a team + workflow