Coding Agent System Prompts: Comparative Deep Dive & Benchmark
Evaluating prompt design, instruction density, and context overhead across Claude Code, DeepSeek Coder, OpenAI Codex, OpenCode, T3 Code, and the Fleet Multi-Agent Harness with live empirical test telemetry.
To prevent prompt optimization from becoming guesswork, the fleet uses an automated, reproducible benchmark harness (bin/fleet-prompt-bench) that executes A/B test runs across twin worktrees. Results are logged to an append-only ledger (~/.fleet/benchmarks/prompt-evals.jsonl).
Task T2: Feature Route Addition & Gate Contract
Standard feature addition requiring handler dispatch, test mapping update in tools/fast-gate.sh, and .fleet/coverage-contract.json sync. Model: deepseek/deepseek-flash.
Total Tokens Consumed (Prompt + Completion)-58.2% Reduction
Run ID: run-1792342174-11329Prompt: 4f266f13207c (15.5KB)Tokens: 4,345PASS
Run ID: run-1792342174-2066Prompt: 7690a754aeb6 (5.4KB)Tokens: 1,817PASS
Executive Summary
As language models scale in raw coding capability, the system prompt is no longer just a set of instructions; it is the operating system ABI (Application Binary Interface) that governs how models manipulate the host filesystem, handle fatal errors, manage context windows, and interact with other autonomous processes.
In this audit, we examine the production system prompts and control architectures of five premier coding agent implementations, benchmark them against the Exe.dev Fleet prompt architecture (roles/common.md, roles/coord.md, and role specifications), and identify four concrete improvements that reduce token bloat while boosting reasoning accuracy.
15.5 KB → 5.4 KB
Fleet Common Prompt Size (65% reduction)
4.2 KB
Claude Code Base Prompt (~1.1k tokens)
1.8 KB
OpenAI Codex Base (~450 tokens)
58.2%
Empirically Measured Token Savings
Comparative Architecture Matrix
Agent Runtime
Prompt Paradigm
Primary Strengths
Key Vulnerabilities / Gaps
Claude Code Anthropic
Dynamic Modular Fragments
Clickable file:line hyperlinks; turn-by-turn <system-reminder> injection; strong distinction between exploration and destructive execution.
Tightly bound to single interactive sessions; lacks distributed multi-agent ledger synchronization.
DeepSeek Coder DeepSeek
Code-Dense Minimalist
87% code-trained corpus bias; native Fill-In-The-Middle (FIM) syntax; high instruction adherence with minimal negative constraints.
Degrades rapidly when overloaded with multi-page conversational rules and negative warnings ("do not do X").
OpenAI Codex CLI OpenAI
Structured ACI Contract
Compact (450 tokens); explicit AGENTS.md scoping hierarchy; clear separation of streaming thoughts vs tool patches.
Requires strict external sandbox execution; assumes direct human in the loop for ambiguous commands.
Prone to deep context pollution without strict memory compaction; higher multi-turn token costs.
T3 Code pingdotgg / Theo
Control Plane & Guardrails
Git worktree isolation per task; strict process safety ("3 ways to hurt yourself" rules prevent wild pkill/kill cascades); desktop diff UI.
Orchestrator rather than an autonomous prompt harness; delegates prompt construction to underlying agents.
Exe.dev Fleet Paul Kinlan / Fleet
Distributed Ledger & Roles
"Beads is the ledger; a message is a photograph"; independent cross-family model review; preemption-aware heavy gate vs fast gate.
Prompt size inflation (roles/common.md was near the 16KB limit); repetition of deterministic rules handled by daemons.
Anatomy of the Prompts
1. Claude Code: The Dynamic Harness Mindset
Claude Code treats the model not as a generic conversationalist, but as an interactive CLI tool operating with user-selected permissions. Key prompt excerpts demonstrate how it enforces safety and clickability:
You are Claude Code, Anthropic's official CLI for Claude. You are an interactive agent that helps users with software engineering tasks.
Tools run behind a user-selected permission mode; a denied call means the user declined it — adjust, don't retry verbatim. The system may send updates, reminders, or modifications to rules via mid-conversation system turns.
Prefer the dedicated file/search tools over shell commands when one fits. Independent tool calls can run in parallel in one response. Reference code as file_path:line_number — it's clickable.
Write code that reads like the surrounding code: match its comment density, naming, and idiom.
Key Architectural Takeaway: Rather than dumping 50 edge-case rules into the boot prompt, Claude Code injects <system-reminder> blocks on specific turns (e.g., when Plan mode is activated or a test failure occurs).
2. OpenAI Codex CLI: The AGENTS.md Hierarchy
OpenAI Codex's system prompt is remarkably brief (less than 500 words), delegating project-specific behavior entirely to the filesystem:
You are a coding agent running in the Codex CLI, a terminal-based coding assistant.
You are expected to be precise, safe, and helpful.
## AGENTS.md Spec:
- Repositories often contain AGENTS.md files specifying coding conventions, organization patterns, or test execution steps.
- The scope of an AGENTS.md file covers the directory tree rooted at its folder.
- You must strictly obey instructions in any AGENTS.md file whose scope includes a file you modify.
3. The Exe.dev Fleet Architecture: Ledger & Cross-Family Verification
The Fleet prompt architecture solves an existential problem that neither Claude Code nor Codex addresses: autonomous multi-agent coordination without human stalling.
## Rules that never bend
1. Beads is the ledger. Every piece of work has a bead. Claim it with bd update <id> --claim.
2. Never review your own work. A different model family reviews every change.
3. Verify for real. "It serves" or "tests pass" is not "it works". Drive the actual behaviour in a browser.
4. Long commands: fleet-gate, then stop. Never poll with sleep loops or repeated status checks.
Proposed Architectural Improvements for Fleet Prompts
1. Compact roles/common.md by 65%
Problem:roles/common.md was 15,580 bytes (~3,895 tokens), close to the 16KB deployment limit. Over 40% of its content described mechanisms enforced deterministically by daemons. Result: Refactored to 5,469 bytes (~1,367 tokens), saving ~2,500 tokens per turn across the fleet while keeping all critical invariants.
2. Adopt Clickable Terminal Links (file:line)
Inspiration: Claude Code's clickability rule. Fix: Enforces: "Always reference code locations as path/to/file.ext:line." When reviewers report findings on beads or terminal logs, operators can click directly into the exact line in VS Code or iTerm.
3. Hypothesis-First Bounded Turn Rule
Inspiration: SWE-agent's DISCUSSION → COMMAND pattern. Fix: Enforced in roles/implementer.md: "State 1 concrete hypothesis → run focused probe → commit code → end turn. Never execute 5+ tool commands without committing progress."
4. Dynamic Phase Injection vs Static Bloat
Inspiration: Claude Code's <system-reminder>. Fix: Instead of having all reviewer and landing rules in every lane's system prompt, lanes.sh spawn injects role criteria only when that specific phase begins.