Code Room
Vibe codingMediumvc-g317
Subject Ai engineering leadershipLevel Senior–Staff~20 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You're mentoring your team on agent workflows. A senior engineer is stuck: they've asked an agent three times to fix a flaky integration test in a Node.js service, and each round the agent makes a different plausible change — adds a timeout, then a retry, then a sleep — and the test still flakes intermittently. As the staff engineer, coach them: how do you diagnose why the agent is spinning, how do you re-steer it productively, and what's the principle for when to stop prompting and take over?

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.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.