Recovering from invalid API assumptions
You ask an AI agent to add a Rust function that parses a `Duration` from strings like `"1h30m"`, `"45s"`, `"2d"`. Its first attempt uses `chrono::Duration::from_str`, which doesn't exist; you tell it 'that API isn't real' and it pivots to `humantime::parse_duration` — but your crate can't add new dependencies, and `humantime` rejects `"2d"` plus the compound `"1h30m"` form anyway. You're three messages deep and still broken. How do you diagnose what's going wrong and re-steer it to get a working parser?
parse_duration_seconds(text: str) → int["1h30m"]out5400["45s"]out45["2d"]out172800Treat 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.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.