ECC
ECC Performance and Cost: Budget Context, Hooks, and Agent Runs
A source-backed ECC performance guide for measuring context overhead, hook latency, MCP calls, memory writes, and operator review time.

What you will learn
- Instrument a complete ECC task loop
- Attribute context, hook, and tool cost
- Set safe optimization budgets
Before you start
- Basic Git and command-line usage
- Comfort reading a project README
You can explain the project, run its documented first step, and decide what to verify before adopting it.
Key takeaways
- Trace model, tools, hooks, MCP, tests, review, and memory as separate spans.
- Context and hook selection can dominate cost even before extra tool calls.
- Optimize budgets without removing approvals, redaction, or security hooks.
Measure the whole agent loop
ECC adds a catalog, lifecycle hooks, MCP integrations, memory, and client adapters around a coding model. Measure plan time, model latency, tool execution, hook work, tests, review, and memory persistence as separate spans; otherwise a slow external command can be blamed on the harness.
Use one harmless repository task, fixed model/settings, and a pinned ECC revision. Record context size and generated-file count because a larger catalog can increase prompt tokens even when no extra tool runs occur.
Control context and hook overhead
Compare a minimal selected skill set with a full catalog. Track input/output tokens, hook invocations, shell duration, MCP round trips, memory writes, and failed/retried actions. A hook that performs network discovery on every tool call can dominate both latency and privacy risk.
Keep hooks idempotent and asynchronous only when the event contract allows it; hiding work in the background can improve perceived latency while making failures harder to observe. Publish event IDs and completion status in the receipt.
Turn spend into a decision
A run can consume model tokens, hosted API credits, local compute, CI minutes, and operator review time. Keep provider prices as variables unless the source and date establish them. Compare cost per verified change or per accepted review, not tokens alone.
For teams, a small canary matrix across clients reveals adapter overhead and parity gaps. A faster client that omits a security hook may be cheaper but unacceptable for the target risk profile.
Optimize and preserve guardrails
Select only needed skills, cache static manifests, batch non-sensitive lookups, and move expensive analysis to explicit commands. Never remove approval checks or redaction to win a latency benchmark. Set budgets for tokens, tool calls, wall time, and memory writes, then fail with a recoverable receipt.
After an upgrade, replay the same task and compare context, events, tests, generated files, and review outcome. The best ECC configuration is the least expensive one that still produces explainable, safe engineering work.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Pin ECC, client, model, and a harmless repository task.
- 2
Capture tokens, hook/MCP events, tool duration, memory writes, and review time.
- 3
Compare minimal and expanded catalogs with the same task.
- 4
Replay after upgrades and enforce visible token/tool/time budgets.
Copy-ready example
trace_id,client,ecc_rev,skill_set,input_tokens,output_tokens
tool_ms,hook_ms,mcp_calls,memory_writes,review_ms,accepted_change,cost_variableFrequently asked questions
Does fewer tokens always mean a cheaper ECC setup?
No. A setup can use fewer prompt tokens but add slower tools, retries, or operator review. Measure the complete verified-change path.
Can I disable hooks for a benchmark?
Only in a clearly labeled comparison. Production decisions must include the approvals, redaction, and security hooks the workflow requires.
Sources
- ECC README (captured 2026-08-31)Source checked 2026-08-31
- ECC repositorySource checked 2026-08-31