Debug intermittent ECONNRESET
A production Node service is throwing intermittent 'ECONNRESET' under load and nobody knows why. One engineer writes a precise one-shot prompt describing the symptom and asks the model to 'output the fix.' Another points an autonomous agent at the repo and logs to investigate. For a murky, evidence-driven debugging task like this, which posture is right, and what does the wrong one get you?
Implement
hosts_over_error_threshold(log_lines: list[str], error_code: str, min_count: int) → list[str]Examples
in
[["ts=2026-03-04T10:00:01Z host=api-3 code=ECONNRESET","ts=2026-03-04T10:00:02Z host=api-3 code=ECONNRESET","ts=2026-03-04T10:00:03Z host=api-1 code=ETIMEDOUT","ts=2026-03-04T10:00:04Z host=api-7 code=ECONNRESET"],"ECONNRESET",2]out["api-3"]in
[["ts=2026-03-04T10:00:01Z host=api-3 code=ECONNRESET","ts=2026-03-04T10:00:02Z host=api-3 code=ECONNRESET","ts=2026-03-04T10:00:03Z host=api-1 code=ETIMEDOUT","ts=2026-03-04T10:00:04Z host=api-7 code=ECONNRESET"],"ECONNRESET",1]out["api-3","api-7"]in
[["ts=2026-03-04T10:00:01Z host=api-9 code=ECONNRESET_RETRY","ts=2026-03-04T10:00:02Z host=api-3 code=ECONNRESET"],"ECONNRESET",1]out["api-3"]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 16 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.