Claudex — a third engine: Claude leads a team of parallel Codex workers#90
Claudex — a third engine: Claude leads a team of parallel Codex workers#90mega123-art wants to merge 12 commits into
Conversation
Add a "Team mode" where a lead Claude session spawns 1–4 Codex worker subagents in parallel via one MCP tool (spawn_codex_subagents), reusing the existing spawnCli runtime — no new orchestrator. Workers are spawned directly, so they never get the tool back (depth guard is automatic). - codexSubagent.ts: runCodexTask/runCodexTasks + the SDK MCP tool. Two worker gates — read-only researcher (default) vs writing coder (when the session is in claudex mode). Clamp 4, 5min timeout, 8k output cap. - runtime/index.ts: mode==="claudex" enables writing workers; tool wired Claude-only. - spawn.ts: map "claudex" mode to acceptEdits so the lead's merge-edits auto-apply. - convert/claude.ts: surface the fan-out as a "Claudex" war-room action. - webview: 🧬 Team mode chip + one-line consent; war-room worker cards + trust badge. Plan: plans/claudex-team-mode.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ment in Codex workers
Strengthen the spawn_codex_subagents description so Claude defaults to splitting any 2+-part request into parallel workers itself, without the user having to name them. Only skips fan-out for truly single-step tasks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claudex is now its own engine tab alongside Claude and Codex, not a permission mode. It's an IDENTITY (own tab, sessions, badge, purple accent) that runs the claude binary with parallel-Codex fan-out forced on — engineBinary() normalizes claudex->claude at every binary-facing boundary (spawn, inject, memory, resume), while storage/UI keep the claudex identity. - contract: Cli union gains 'claudex' + engineBinary() helper - runtime/spawn/session: route via engineBinary; claudex slot; team config (write workers + Task disabled) keyed on the engine - webview (both surfaces): 3rd tab, purple accent on tab + typing box, claudex shares claude's model/mode catalogs, status/login map to claude - mode picker no longer carries claudex (it's an engine now) - UI de-emoji'd: war-room + tab use a purple vector glyph, not emoji Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Claudex tab is dulled + unclickable until BOTH Claude and Codex are signed in (claude leads, codex does the work). Clicking while locked explains why. Refreshes live on cliStatus + login completion. Applied in both webview surfaces. - Detect usage/rate/quota limit errors from workers (isLimitError) and surface them plainly: the worker output is tagged [LIMIT], the marquee shows a rate-limit cue, and the tool appends a note telling the lead to inform the user instead of silently retrying. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lead Claude/Codex usage/rate-limit errors now render a human message
("<engine> hit a usage/rate limit — try again in a bit, or switch
engine") instead of a raw stack, reusing isLimitError. Raw text kept
appended for debugging.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The pretty card-based PickEngine (mobile/React onboarding) now shows a third Claudex card (purple + fan-out vector icon), locked + dulled until both Claude and Codex are signed in — matching the composer tab gating. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Worker goals containing long unbreakable strings (file paths) overflowed the tile and bled across the grid. Add overflow-wrap:anywhere + min-width:0 + overflow:hidden on tiles in both surfaces (inline webview + React). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On the claudex engine in Plan mode, the fan-out tool now dispatches READ-ONLY Codex researchers (workers forced read-only when mode=plan), so Claude can send a research team, gather their reports, then propose the plan — without touching the repo. - buildPassiveSpawn: claudexWrite = claudex && mode !== 'plan' - canUseTool: always allow spawn_codex_subagents (incl. plan mode); the workers self-gate, so no extra approval in plan - tool description: in read-only mode, tells Claude it's safe + encouraged to dispatch parallel researchers while planning, then write the plan Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This is genuinely great work, Parth. The multi-brain teamwork, Claude leading a team of Codex workers, is the most "AgentNet" idea in the whole product, and you built it cleanly (the One idea on how to roll it out, building on what you have rather than changing it: Ship Claudex as a discoverable easter egg first, with a clear test window, then promote it to a main feature. Instead of adding a third engine tab right away, keep the surface as Claude / Codex, and make Claudex something you find: drag the Claude chip onto the Codex chip, a fusion effect plays, and that session becomes Claudex. It's eye-catching enough that people will notice it and talk about it, and because it only activates when both engines are signed in, it naturally scopes who's exercising it. Two reasons I like this rollout:
The reason underneath: we're a vibe-coding app, and Claude + Codex are just the starting pair. I want headroom to test more engines and combos, and introducing Claudex this way lets us trial the multi-engine direction with a real feedback loop first. Everything in |
Follow-up: implementation spec for the "drag to fuse" easter eggSharing a concrete build plan so this is easy to pick up. It is purely additive UI on top of your PR. Nothing in Files touched (all in
|
What
Adds Claudex, a third engine alongside Claude and Codex. In Claudex (Team mode) a lead Claude session fans out 1–4 Codex workers in parallel via one MCP tool (
spawn_codex_subagents), then merges their work. The parallelism is visible (war-room card), and the team result carries a trust label.Claudex is an identity, not a separate binary: it runs the claude binary with fan-out forced on.
engineBinary()normalizesclaudex → claudeat every binary-facing boundary (spawn, inject, memory, resume), while storage/UI/badges keep theclaudexidentity (own tab, own sessions, purple accent).Highlights
spawn_codex_subagents(tasks[])→Promise.all, clamp 4, per-worker timeout, depth guard (workers never get the tool back).Tests / build
codexSubagent.spec.ts— fan-out clamp, safety classifiers, limit detection (7 tests).tscclean; VSCode + webview build clean on top of latestmain(rebased).Plan:
plans/claudex-team-mode.md.🤖 Generated with Claude Code