ECC
ECC: rendimiento y coste de contexto, hooks y ejecuciones
Mide tokens, latencia de hooks, llamadas MCP, memoria y revisión humana por cambio aceptado.

Qué aprenderás
- Instrument a complete ECC task loop
- Attribute context, hook, and tool cost
- Set safe optimization budgets
Antes de empezar
- 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.
Conclusiones clave
- 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
El coste de ECC combina contexto, herramientas, hooks, MCP, memoria y revisión. Fija cliente, modelo, tarea y revisión, y registra tokens, eventos, tiempos, escrituras y resultado aceptado.
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.
Cómo elegir
| Criterio | Opción A | Opción 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 |
Pasos de implementación
- 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.
Ejemplo para copiar
trace_id,client,ecc_rev,skill_set,input_tokens,output_tokens
tool_ms,hook_ms,mcp_calls,memory_writes,review_ms,accepted_change,cost_variablePreguntas frecuentes
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.
Fuentes
- ECC README (captured 2026-08-31)Fuente verificada 2026-08-31
- ECC repositoryFuente verificada 2026-08-31