Seu agente gera código? (mas não software real)
Agente gera 10K linhas de código. Mas quantas lines vão pro production? Ars Technica: mais código ≠ mais software.
Equipe OpenClaw · Time de Engenharia & Produto
A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…
Seu agente gera código? (mas não software real)
Notícia: Ars Technica publicou investigação: "AI coding agents generate more code, but not more software." Achado chave: Agentes IA geram MUITO código (linhas de output massivas), mas NÃO geram mais software real (features que vão pro production). Contexto: Empresas medindo agentes por "linhas de código geradas" (métrica errada). Resultado: Ilusão de produtividade. Implicação: Seu agente WhatsApp (que gera toneladas de "responses", "workflows", "integrations") pode estar caindo nessa trap. Quantidade ≠ qualidade. Você tá sendo iludido por output vanity metrics.
Realidade: **
THE PRODUCTIVITY TRAP (WHAT'S HAPPENING NOW):
SCENARIO 1: BEFORE AI AGENTS
Developer (manual coding): ├─ Day 1: Write 200 lines of code │ ├─ Analysis: 30 min (understand requirements) │ ├─ Coding: 3 hours (write code) │ ├─ Testing: 1 hour (test code) │ ├─ Code review: 30 min (review code) │ ├─ Fixes: 30 min (address feedback) │ └─ Result: 200 lines, all tested, all in production │ ├─ Day 2: Write 200 lines of code │ └─ Same process: 200 lines, all production │ └─ Week: 1000 lines, ALL production-ready └─ Metric: 1000 lines/week = productivity
SCENARIO 2: WITH AI AGENTS (THE TRAP)
Developer + AI Agent (agent-assisted coding): ├─ Day 1: Agent generates 2000 lines of code │ ├─ Agent generates (5 minutes): 2000 lines │ ├─ Developer reviews (2 hours): "Hmm, 40% is garbage" │ ├─ Developer refactors (2 hours): Delete, rewrite │ ├─ Developer tests (1 hour): "Still broken" │ ├─ Developer fixes (1.5 hours): Fix agent hallucinations │ ├─ Code review (30 min): "This is still messy" │ ├─ Final: 200 lines go to production │ │ ├─ 1800 lines deleted (garbage) │ │ └─ Net: 200 lines production (same as manual!) │ │ │ └─ Metric: "Agent generated 2000 lines!" (sounds impressive) │ └─ But: Only 200 lines production (same productivity) │ ├─ Day 2: Same story │ ├─ Agent generates: 2000 lines │ ├─ Developer cleans: 1800 lines garbage │ ├─ Production: 200 lines │ └─ Time spent: SAME (6.5 hours, mostly cleaning up agent mess) │ └─ Week: Agent "generated" 10,000 lines ├─ But: Only 1000 lines production (SAME as manual coding) ├─ Time spent: SAME (6.5 hours/day, just different work) ├─ Quality: WORSE (agent-generated code = more bugs) ├─ Metric: "10,000 lines generated!" (false productivity signal) └─ Reality: NO productivity gain, WORSE quality, WASTED time
THE TRAP: ├─ What companies measure: "Lines of code generated" (vanity metric) ├─ What matters: "Lines of code in production" (real metric) ├─ Agent makes first number look great (2000 lines generated) ├─ But second number = same (200 lines production) ├─ Companies see big number, feel productive, don't realize no gain └─ Result: False sense of productivity
WHY IS THIS HAPPENING?
AI agents are good at: ├─ Generating code QUANTITY (tokens are cheap) ├─ Sounding confident (predicting next token) ├─ Following patterns (if-then, loops, etc) └─ FAST output (microseconds)
AI agents are BAD at: ├─ Understanding requirements (hallucinate) ├─ Logical correctness (50% of code has bugs) ├─ Knowing your codebase (hallucinate APIs) ├─ Testing code (no way to validate) ├─ Security (vulnerabilities in generated code) ├─ Performance (inefficient algorithms) └─ Maintainability (code style, documentation)
Result: ├─ Agent generates: 2000 lines ├─ Correctness: 50% (1000 lines broken) ├─ Usable: 20% (400 lines actually usable) ├─ After refactor: 200 lines production └─ Developer had to redo 90% of agent's work (unproductive)
REAL COST ANALYSIS:
Manual coding (developer, 1000 lines/week): ├─ Time: 40 hours ├─ Cost: $1500 (dev salary $37.5/hour) ├─ Output: 1000 lines production ├─ Cost per line: $1.50 ├─ Quality: High (tested, reviewed) └─ Time to fix: Low
Agent-assisted coding (agent + developer, "10,000 lines generated"): ├─ Agent time: 0.5 hours (cheap, $0.01) ├─ Developer cleanup time: 40 hours (still needed!) ├─ Total cost: $1500.01 (basically same) ├─ Output: 1000 lines production (SAME) ├─ Cost per line: $1.50 (SAME) ├─ Quality: Lower (more bugs, less tested) ├─ Time to fix: Higher (fixing agent mistakes) └─ Result: SAME cost, SAME output, WORSE quality
WHY DOES THIS MATTER FOR YOUR AI AGENT?
Your WhatsApp agent: ├─ Claims: "Generated 500 workflows" ├─ But: How many work correctly? (probably 30%) ├─ Metric: "500 workflows" (sounds impressive) ├─ Reality: 150 workflows work, 350 broken ├─ Your team manually fixes broken ones ├─ Time spent: More than if you built them manually ├─ Productivity: ILLUSION └─ Cost per working workflow: HIGH
Your agente cost analysis: ├─ Agent cost: $0.01 per workflow (cheap) ├─ Developer cleanup: 30 minutes per broken workflow (expensive) ├─ Broken workflows: 70% (350 out of 500) ├─ Cleanup cost: 350 * 0.5 hours * $50/hour = $8750 ├─ Total cost: $0.01 + $8750 = $8750 ├─ Output: 500 "workflows" (only 150 work) ├─ Cost per working workflow: $8750 / 150 = $58.33 │ └─ vs manual: ├─ Developer builds 150 workflows manually ├─ Time: 150 * 0.5 hours = 75 hours ├─ Cost: 75 * $50 = $3750 ├─ Cost per workflow: $3750 / 150 = $25 ├─ Quality: High (no bugs) └─ Agent is 2.3x MORE EXPENSIVE! (and lower quality)
Critical insight: Seu agente (que gera "500 workflows") tá te custando 2-3x MAIS do que desenvolvimento manual (porque você tá limpando a bagunça do agente). Você tá sendo iludido por vanity metrics ("500 workflows generated"). Medida certa = "workflows em production que funcionam" (provavelmente 30% do total). Productivity trap desmascarada.
The vanity metric trap (why companies fall for it)
How AI agents fool you with fake productivity
VANITY METRICS (WRONG):
Metric 1: "Lines of code generated" ├─ Agent generates: 10,000 lines/week ├─ Sounds like: Massive productivity ├─ Reality: 50% broken, 50% usable ├─ After cleanup: 1000 lines production ├─ Developer wasted: 30 hours cleaning garbage └─ True productivity: NEGATIVE (took longer than manual)
Metric 2: "Number of features built by agent" ├─ Agent builds: 100 features/month ├─ Sounds like: Huge output ├─ Reality: 70% half-baked, need rework ├─ After rework: 30 features actually complete ├─ Developer rework time: 200 hours └─ True productivity: NEGATIVE (rework more expensive than building from scratch)
Metric 3: "API integrations automated" ├─ Agent integrates: 50 APIs/month ├─ Sounds like: Impressive ├─ Reality: 40% have bugs, don't work in production ├─ After fixes: 30 APIs working ├─ Developer debugging time: 100 hours └─ True productivity: NEGATIVE
Metric 4: "Workflows created" ├─ Agent creates: 200 workflows/month ├─ Sounds like: Massive automation ├─ Reality: Edge cases break most workflows ├─ After fixes: 60 workflows stable in production ├─ Developer fixing time: 150 hours └─ True productivity: NEGATIVE
REAL METRICS (CORRECT):
Metric 1: "Lines of code in production" ├─ Agent-assisted: 1000 lines/week (in production) ├─ Manual: 1000 lines/week (in production) ├─ Difference: ZERO └─ Agent adds: NO value (same output, worse quality, more bugs)
Metric 2: "Features completed and working" ├─ Agent-assisted: 30 features/month working ├─ Manual: 50 features/month working ├─ Difference: Agent is SLOWER └─ Agent adds: NEGATIVE value
Metric 3: "API integrations stable in production" ├─ Agent-assisted: 30 APIs stable ├─ Manual: 40 APIs stable ├─ Difference: Agent is SLOWER └─ Agent adds: NEGATIVE value
Metric 4: "Workflows running error-free" ├─ Agent-assisted: 60 workflows stable ├─ Manual: 80 workflows stable ├─ Difference: Agent is SLOWER (quality worse) └─ Agent adds: NEGATIVE value
WHAT COMPANIES ARE ACTUALLY MEASURING:
Wrong metric hierarchy: ├─ #1: "Agent generated X lines/workflows/features" ← WRONG (vanity) ├─ #2: "Team feels more productive" ← WRONG (illusion) ├─ #3: "We're saving time!" ← WRONG (actually spending more on cleanup) └─ #4: "Real metrics: production output" ← NOT MEASURED (hidden problem)
What SHOULD be measured: ├─ #1: "Lines of code in production (working)" ← REAL ├─ #2: "Features completed, tested, shipped" ← REAL ├─ #3: "Bug rate in agent-generated code" ← REAL ├─ #4: "Developer time spent on cleanup" ← REAL ├─ #5: "Cost per feature delivered" ← REAL ├─ #6: "Time to production" ← REAL └─ #7: "Customer satisfaction with agent features" ← REAL
ARSTECHNICA'S FINDING (KEY RESEARCH):
Study: ├─ Companies using AI coding agents ├─ Measured: Agent code generation vs production output ├─ Result: Agent generates 5-10x more code ├─ But: Production output = SAME or SLOWER ├─ Developer time: SAME or MORE (cleanup) ├─ Code quality: WORSE (more bugs, slower) └─ Conclusion: AI agents are currently HURTING productivity
Why? ├─ Agents hallucinate (50% of code is wrong) ├─ Agents don't understand context (API misuse) ├─ Agents don't test (no validation) ├─ Developer cleanup: Takes as long as manual coding ├─ Total time: SAME or MORE ├─ Quality: WORSE └─ ROI: NEGATIVE (agents cost money, save nothing)
How to measure agent productivity correctly
Real metrics that matter
FRAMEWORK: "THE 3 REAL METRICS"
Metric 1: PRODUCTION QUALITY ├─ Definition: Code/workflows in production that work correctly ├─ Measure: │ ├─ Bug rate (% of agent code with bugs) │ ├─ Test coverage (% of code tested) │ ├─ Error rate in production (% of requests that fail) │ └─ MTTR (mean time to recovery from failures) │ ├─ Goal: < 5% bug rate (vs manual ~2%) ├─ Reality: Agent code = 30-50% bug rate (BAD) └─ Signal: If bug rate > manual, agent is net negative
Metric 2: DEVELOPER TIME ├─ Definition: Total developer hours spent (generation + cleanup) ├─ Measure: │ ├─ Time to code review │ ├─ Time to fix agent code │ ├─ Time in production debugging │ └─ Total developer hours per feature │ ├─ Goal: < manual time (agent should SAVE time) ├─ Reality: Developer cleanup = 50-70% of generation (NET NEGATIVE) └─ Signal: If cleanup time is high, agent is not worth it
Metric 3: COST PER OUTPUT ├─ Definition: Total cost (agent + developer) per unit delivered ├─ Measure: │ ├─ Agent API cost │ ├─ Developer salary (time spent) │ ├─ Support cost (fixing bugs) │ └─ Total cost per feature │ ├─ Goal: < manual cost ├─ Reality: Agent cost = 2-3x manual (cleanup expensive) └─ Signal: If cost per feature increases, agent is not worth it
CASE STUDY: YOUR AI AGENT (WHATSAPP)
Before (manual agent development): ├─ Time: Developer builds 10 workflows/week manually ├─ Hours: 40 hours/week ├─ Cost: $2000/week (dev salary) ├─ Output: 10 workflows, all working ├─ Quality: High (tested, reviewed) ├─ Bugs: 2% (0.2 bugs per workflow) └─ Production issues: Low
After (with AI agent assisting): ├─ Agent generation: Agent creates 50 workflows │ ├─ Time: Agent 1 hour (cheap) │ ├─ Cost: $0.10 (API calls) │ └─ Quality: 30% working (15 workflows good, 35 broken) │ ├─ Developer cleanup: Developer fixes broken workflows │ ├─ Time: 35 hours (fixing 35 broken workflows) │ ├─ Cost: $1750 (developer time) │ ├─ Work: Debug, rewrite, test │ └─ Total: 35 workflows fixed, 15 newly created │ ├─ Weekly totals: │ ├─ Output: 50 workflows (sounds great!) │ ├─ Usable: 50 workflows (after cleanup) │ ├─ Developer time: 35 hours (cleanup) + some generation = 40 hours │ ├─ Cost: $1750.10 │ ├─ Quality: 15% bug rate (worse than manual 2%) │ └─ Production issues: High (more bugs) │ └─ Metrics: ├─ Vanity metric: "50 workflows generated!" (false signal) ├─ Real metric: "50 workflows in production, but 15% bug rate" (red flag) ├─ Developer time: SAME (40 hours, but worse quality) ├─ Cost: SAME ($1750, plus agent cost) ├─ Quality: WORSE (15% vs 2% bug rate) └─ Verdict: Agent is NET NEGATIVE (same time, worse quality, same cost)
HOW TO DETECT IF YOUR AGENT IS HURTING PRODUCTIVITY:
Question 1: "Are we fixing more agent-generated bugs than before?" ├─ If YES: Agent is negative └─ If NO: Agent might be helping
Question 2: "Is developer cleanup time high (>30% of agent generation)?" ├─ If YES: Agent is negative └─ If NO: Agent might be helping
Question 3: "Is production bug rate higher with agent code?" ├─ If YES: Agent is negative └─ If NO: Agent might be helping
Question 4: "Are we shipping fewer features per week than before?" ├─ If YES: Agent is negative └─ If NO: Agent might be helping
Question 5: "Is the cost per feature higher than before?" ├─ If YES: Agent is negative └─ If NO: Agent might be helping
If 3+ answers are YES: Agent is hurting you. Stop using it or fix it.
How to use agents CORRECTLY (for real productivity)
The right way to integrate AI agents
THE TRAP: Using agents for code generation (high error rate) THE SOLUTION: Using agents for specific, high-confidence tasks
WHERE AGENTS ARE GOOD (HIGH CONFIDENCE):
Task 1: Boilerplate generation ├─ Example: "Generate CRUD API for customer table" ├─ Why good: Repetitive, well-defined, easy to validate ├─ Agent accuracy: 90%+ ├─ Cleanup: 10% (minor fixes) ├─ ROI: POSITIVE (saves time) └─ Use: YES, agents are good here
Task 2: Code refactoring (same logic, different style) ├─ Example: "Extract function from this code" ├─ Why good: Logic unchanged, just restructured ├─ Agent accuracy: 85%+ ├─ Cleanup: 15% (test, validate) ├─ ROI: POSITIVE └─ Use: YES, agents can help
Task 3: Documentation generation ├─ Example: "Write docstring for this function" ├─ Why good: Summarization, not logic ├─ Agent accuracy: 75%+ ├─ Cleanup: 25% (review, fix) ├─ ROI: POSITIVE (saves writing time) └─ Use: YES, agents help
Task 4: Test writing (for existing code) ├─ Example: "Generate test cases for this function" ├─ Why good: High confidence (function behavior known) ├─ Agent accuracy: 70%+ ├─ Cleanup: 30% (debug failing tests) ├─ ROI: POSITIVE (saves test writing time) └─ Use: YES, agents help
WHERE AGENTS ARE BAD (LOW CONFIDENCE):
Task 1: New feature implementation ├─ Example: "Build a new WhatsApp integration" ├─ Why bad: Requires domain knowledge, hallucinations high ├─ Agent accuracy: 30-40% ├─ Cleanup: 60-70% (rewrite most code) ├─ ROI: NEGATIVE (slower than manual) └─ Use: NO, don't use agents
Task 2: Complex business logic ├─ Example: "Implement customer tiering algorithm" ├─ Why bad: Requires understanding business rules ├─ Agent accuracy: 20-30% ├─ Cleanup: 70-80% (rewrite logic) ├─ ROI: NEGATIVE └─ Use: NO, don't use agents
Task 3: Security-critical code ├─ Example: "Build payment processing function" ├─ Why bad: Security hallucinations, vulnerabilities ├─ Agent accuracy: 10-20% ├─ Cleanup: 80-90% (security review + rewrite) ├─ ROI: NEGATIVE (dangerous!) └─ Use: NO, NEVER use agents
Task 4: Architecture decisions ├─ Example: "Design our database schema" ├─ Why bad: Requires system-level thinking ├─ Agent accuracy: < 10% ├─ Cleanup: 90%+ (redesign from scratch) ├─ ROI: NEGATIVE └─ Use: NO, don't use agents
RIGHT FORMULA FOR AGENT USE:
IF task is: ├─ Boilerplate → Use agent (high ROI) ├─ Well-defined → Use agent (high ROI) ├─ Easily validated → Use agent (high ROI) ├─ High-confidence → Use agent (high ROI) │ ELSE (complex, unclear, risky): ├─ Manual development (human knows better) ├─ Agent as helper, not generator ├─ Human makes final decisions └─ ROI: Positive only with human oversight
YOUR AI AGENT (WHATSAPP) - CORRECT USAGE:
GOOD USE CASES (high confidence, high ROI): ├─ Generate message templates (boilerplate) ├─ Create simple intent classifiers (well-defined) ├─ Build status update responses (repetitive) ├─ Generate error messages (template-based) └─ Create validation rules (deterministic)
BAD USE CASES (low confidence, negative ROI): ├─ Build customer logic flows (complex business logic) ├─ Implement payment handling (security-critical) ├─ Design conversation flows (requires domain knowledge) ├─ Handle edge cases (need human judgment) └─ Make business decisions (agent can't)
Recommendation: ├─ Use agent for: 20% of workflow (boilerplate + templates) ├─ Human builds: 80% of workflow (logic, decisions, validation) ├─ ROI: POSITIVE (agent saves time on 20%, doesn't slow down 80%) └─ Quality: HIGH (human oversight on critical parts)
Conclusão: Code ≠ Software. Output ≠ Value.
Fatos:
✗ Agent generates 10K lines of code ✓ But only 1K lines in production ✗ Agent "generated 100 workflows" ✓ But only 30 are working correctly ✗ Agent saved time (vanity metric) ✓ But took same time after cleanup (real metric) ✗ Productivity UP (false signal) ✓ Productivity SAME or DOWN (real signal)
✓ Ars Technica exposed: More code ≠ More software ✓ Your team is measuring wrong metrics (code quantity, not software quality) ✓ Agent might be hurting productivity (cleanup time = wasted time) ✓ You need REAL metrics (production output, bug rate, cost per feature) ✓ Use agents CORRECTLY (boilerplate only, not complex logic) ✓ Avoid productivity trap (don't confuse tokens with value)
ACTION ITEMS (THIS WEEK):
- TODAY: Measure agent output (how much actually in production?)
- TODAY: Track developer cleanup time (how much time fixing agent code?)
- TOMORROW: Calculate bug rate (agent code vs manual code)
- TOMORROW: Calculate cost per feature (agent + cleanup vs manual)
- WEDNESDAY: If metrics are bad (cleanup > generation), STOP using agent
- WEDNESDAY: If metrics are good, continue but optimize
- THURSDAY: Document which tasks agent is good at (boilerplate only)
- THURSDAY: Ban agent from risky tasks (business logic, security)
- FRIDAY: Report to leadership (honest metrics, not vanity metrics)
- NEXT WEEK: Restructure agent usage (only high-confidence tasks)
Problem resolved when: └─ You measure REAL metrics (production output, not generated code) └─ Bug rate ≤ manual coding └─ Developer cleanup time < 20% of generation └─ Cost per feature < manual coding └─ Agent used only for high-confidence tasks (boilerplate) └─ Result: Agent adds value (positive ROI), not costs you time
→ OpenClaw: Medir Produtividade de Agentes Corretamente (Real Metrics, Not Vanity)
Seu agente gera MUITO código, mas quanto tá em production funcionando? Ars Technica: agentes geram 5-10x mais código, mas output production = MESMO. Você tá sendo iludido por vanity metrics ("código gerado" = falso sinal). Medida certa = código em production que funciona. Se limpeza = 50%+ do tempo do dev, agente tá te custando dinheiro. Mude métrica HOJE. Use agente só pra boilerplate (alta confiança). Banir de lógica complexa (segurança, business logic). ROI positivo quando métricas reais melhoram, não quando tokens crescem. 📊❌🚀
Publicado em 12 de outubro de 2026