How We Structured Our AI Coding Agent Workflow — Three Tools, Three Modes, Zero Context Switching Tax
Most teams pick one AI tool and force everything through it. We run three: Claude Code for terminal autonomy, Codex for persistent research/scaffolding, Cursor for quick surgical edits. Here's the routing protocol, aliases, and weekly review that keeps it frictionless.
Published 2026-06-09
How We Structured Our AI Coding Agent Workflow — Three Tools, Three Modes, Zero Context Switching Tax
TL;DR: Forcing one tool to do everything creates friction. We route by task type: cc (Claude Code) for terminal autonomy — refactors, tests, infra, deploys; cx (Codex) for research, scaffolding, docs; cursor for <30 min TS/React surgical edits. Unified cost dashboard + weekly review keeps spend at $140/mo (down from $287). Full workflow spec →
The Context
Two-dev team, ~120 hrs/mo AI coding across Basso Digital OS + 5 client sites. Jan–May 2026: tried to make Cursor do everything — Composer for refactors, chat for questions, inline for completions. Result: context loss on long tasks, no terminal autonomy, unpredictable Anthropic API bills ($150–300/mo). June 2026: adopted task-type routing after Anthropic revealed 80%+ of their codebase via Claude Code terminal agent.
What We Tested
| Workflow Pattern | Tools | Verdict | Why |
|---|---|---|---|
| Single-tool (Cursor Pro) | Cursor for all | ❌ | Composer context loss; no test/deploy autonomy; $200 Ultra gate |
| Single-tool (Claude Code only) | Claude Code for all | ⚠️ | Overkill for quick edits; no persistent research agent mode |
| Single-tool (Codex only) | Codex for all | ❌ | No terminal autonomy; different UX for editing |
| Task-type routing (current) | cc / cx / cursor | ✅ | Right tool per mode; $140/mo predictable; zero context tax |
The Pivot Point
May 28, 2026: Debugging a Stripe webhook idempotency bug. Cursor Composer: 4 context resets, couldn’t run stripe listen to test. Switched to cc (Claude Code): wrote test, ran stripe listen --forward, fixed race condition, ran migration, deployed to staging — single session, zero resets. Same day: needed to research Stripe Connect onboarding patterns. cx (Codex): persistent 2-hr research session, generated scaffold, saved to Notion. Realized: different tasks need different agent UX paradigms.
What We Use Now
Routing Protocol (enforced via aliases + team discipline):
# ~/.zshrc — source of truth for routing
alias cc='claude-code --model sonnet' # Terminal autonomy mode
alias cc-opus='claude-code --model opus --reason' # Opus: auth|infra|payments only
alias cx='codex' # Persistent research/scaffold
alias cursor='cursor' # Surgical TS/React <30 min
| Task Type | Trigger | Tool | Example |
|---|---|---|---|
| Architecture / Multi-file refactor | cc | Claude Code | ”Refactor auth module across 12 files, add tests, run migration” |
| Infra / Deploy / CI | cc | Claude Code | ”Update GitHub Actions, deploy to staging, verify health checks” |
| Debugging with reproduction | cc | Claude Code | ”Reproduce Stripe webhook race, write test, fix, verify” |
| Research / Learning | cx | Codex | ”Research React Server Components patterns, scaffold demo” |
| Scaffolding / Boilerplate | cx | Codex | ”Generate Next.js + Supabase + Tailwind starter with auth” |
| Documentation / ADRs | cx | Codex | ”Write ADR for payment provider switch, update README” |
| Quick TS/React edit | cursor | Cursor Pro | ”Fix type error in Button.tsx, update Storybook” |
| Inline completion | VS Code | Native TS LSP | Daily typing — no AI marginal cost |
Weekly Review (Monday 9am, #dev-ops Slack):
claude-code usage --since 7d --by-model→ Opus hours × $15 = Opus spend- If Opus > $30/wk: audit
--reasonflags; move tasks to Sonnet + better prompts - Cost dashboard projection:
~/.toolcrucible/cost-dashboard.sh - Routing friction check: any tasks misrouted? Update aliases/protocol
Cost Dashboard (runs daily 6pm via cron):
#!/bin/bash
# ~/.toolcrucible/cost-dashboard.sh
CC_USAGE=$(claude-code usage --json --since "$(date +%Y-%m)-01")
CC_PROJECTED=$(echo "$CC_USAGE" | jq '.projected_monthly_usd')
TOTAL=$((CC_PROJECTED + 20 + 20)) # Cursor + ChatGPT Plus fixed
echo "[$(date)] CC_Proj: \$${CC_PROJECTED} | Total_Proj: \$${TOTAL}" >> ~/.toolcrucible/cost-log.csv
if [ "$TOTAL" -gt 150 ]; then slack-post "#dev-alerts" "💰 AI coding projected: \$${TOTAL}/mo"; fi
When You’d Choose Differently
- Solo dev, <20 hrs/mo: Two-tool max (Cursor + Codex, or Claude Code only). Three-tool routing overhead not worth it.
- Team >5: Per-seat credit pool ($100×) may exceed enterprise API discounts. Standardize on 1–2 tools.
- No terminal comfort: Cursor/Windsurf dedicated editors lower friction; accept context loss tradeoff.
- Budget = $0: Aider + Ollama (local) + VS Code Continue (free) + Copilot Free tier. No persistent agent equivalent.
Tool Crucible Rating
| Dimension | Rating (1–5) | Notes |
|---|---|---|
| Overall | 5 | Routing protocol = workflow clarity; 51% cost reduction real |
| Ease of Use | 3 | Alias discipline required; onboarding doc essential |
| Value | 5 | $147/mo saved = 1.5 client projects/yr |
| Support | N/A | Internal protocol; evolves with pricing changes |
This is part of our AI Coding Tool Evaluation series. See full comparison: AI Coding Agent Routing Protocol 2026
Last reviewed 2026-06-09. See our methodology and affiliate policy.