“The call hung up halfway through goodbye.” An engineer asks a coding assistant to investigate this fictional voice-application bug. It enters an agentic software development lifecycle (SDLC) that also handles features: investigate, implement, review, verify, and preserve the learning.
The coding assistant helps change the software. The voice agent is the product talking to the caller. In this example, three parts of that product cooperate:
- Model generation: produces the farewell.
- Playback: delivers the farewell audio to the caller.
- Backend call control: decides when to disconnect and executes that action.
Compare “Premature close” with “Playback gate” below: the backend must wait for playback even after the model finishes generating.
Same generated words. Different call outcome.
Faint bands preview the sequence. Solid: activity · dashed: waiting · white line: progress. Illustrative order and duration.
Paused
Premature close
- The caller asks to finish. This illustrative flow requires a closing message before disconnect.
- The model generates the closing while playback begins.
- The backend mistakes generation completion for playback completion and disconnects.
- The generated transcript can still contain a complete farewell even though the audio was cut short.
- Evidence must compare the reply, playback lifecycle and call-control action. A good transcript alone cannot validate this fix.
Playback gate
- Use the same requested behavior: a closing message, then disconnect.
- The model generates the closing and playback begins.
- Generation ends while audio is still being delivered. The terminal action remains pending.
- The application waits for the appropriate playback boundary, with separate handling for interruption, missing events and caller hangup.
- After that boundary, execute and confirm the call-control operation. The particular transport signal still needs a real listening test.
Give the investigation a starting point
The assistant uses a shared playbook: skills (saved instructions linking to helpers and references), issue categories, and code-review checklists.
A lead derives these locally from the architecture, then refines them through at least one full-experience bug bash using internal end-to-end tests or dogfooding before sharing with everyone. Part 1 covers that setup.
Reconstruct the call before choosing a fix
Check the version deployed during the call. Today’s merged fix cannot explain an older incident. Give the assistant the call identifier, time window, and triage recipe: queries and commands for the helper tested during local setup.
Before interpreting logs, the assistant runs the helper to filter the call and collapse routine repetition into a compact event timeline.
In this voice workflow, diagnostic logs contain no spoken text. Align events with the permitted conversational trace: the assistant retrieves it in user acceptance testing (UAT), but identifies turns for manual engineer inspection in production. Use a permitted recording when the audible result remains uncertain.
For this fictional call, the combined evidence shows:
- Conversation: a complete goodbye was generated.
- Runtime: disconnection followed generation completion while matching playback remained active.
- Code: the deployed closing handler used generation completion as permission to hang up.
A missing event alone proves neither success nor failure. Separate recorded events from the inferred listening experience. The backend owns when to disconnect, placing the cause in the turn-taking and conversational-orchestration bucket. Read its design and fix history; changing farewell wording cannot repair this condition.
Agree on the change, then implement it
The assistant proposes a playback gate. Before implementation, the engineer approves its acceptance condition: only the closing response’s matching playback completion may release the pending disconnect. Caller hangup and missing completion follow separately agreed recovery policies.
The assistant implements that brief and returns the diff and tests. A fixed delay cannot establish completed playback; the correct signal depends on the audio transport.
Check which event releases the action
Following the review skill, the assistant reads the full changed files, checklist, and test evidence for this version. Suppose the patch waits for any playback-complete event. An earlier response’s late event could disconnect the current farewell. Review requests a check that unrelated events leave the action pending.
The checklist reinforces the agreed rule: completion belongs to the protected response. The assistant corrects the patch and reruns the targeted check and neighboring successful paths.
Verify the result before marking Done
The assistant checks the corrected version:
- Normal closing: playback completes before disconnection; a permitted listening check confirms the complete farewell.
- Unrelated events: an earlier response’s completion does not release the current action.
- Recovery: caller hangup and missing-event handling follow their agreed policies.
Illustrative review packet (fictional results): Build demo-r2, UAT; closing response C. Response B completed: disconnect stayed pending. Response C completed: disconnect followed; the listening check heard the full goodbye. Agreed caller-hangup and missing-event checks passed. Engineer verification: pending.
A test-environment pass does not establish production verification; event ordering cannot replace every listening check. Anthropic’s evaluation guide likewise distinguishes the recorded trajectory from the actual outcome.
An issue is marked Done in its issue bucket only when an engineer explicitly confirms it has been tested and verified. A merge or deployment alone does not close it.
Make each fix useful to the next task
The assistant records the cause and verification, updates the design, and proposes a check: match completion events to their protected action. Engineers review affected guidance and skills with the code. Keep the lesson scoped; one incident must not become a universal rule.
Slack bug reports or analytics triggers can start the next investigation. Shared records distinguish architectural areas needing attention, patterns being watched before deeper investment, and emerging user behavior.
This self-healing loop keeps fix-or-watch decisions and verification with engineers. Part 3 explains how to refine that shared knowledge without overfitting to one incident.
The example and timeline durations are illustrative.