Multi-Agent AI Debugging: Making Automated Mobile Bug Fixes Trustworthy
The team shares their journey from failed attempts at using generic coding agents for mobile bug fixing to building a multi-agent system with isolated contexts and continuous real-device sessions, featuring cross-module root-cause analysis, dynamic instrumentation, and a four-step verification pipeline that produces merge-ready patches with evidence chains.
Reading font

Part 01: Four Failure Modes of Generic AI Agents
When the team first gave production tickets to a general-purpose coding agent, the patches arrived quickly but reviewers refused to merge them. The root cause: writing the code change is trivial; the real effort lies in verification — correlating ticket details and chat logs, aligning test accounts and experiment flags, reproducing via screen recordings, chasing logs across the main repo and dozens of sub-repos, rebuilding, and re-verifying on device.
The generic agent stumbled in four predictable ways:
Mistaking normal canary releases for bugs: Testers occasionally used old control-group expectations against accounts hitting a new canary; the agent never checked experiment configs or requirement docs and blindly “fixed” the working new feature.
Assuming no crash means full functionality: Client bugs often don’t crash; a script that reaches a page doesn’t prove the feature works. Without explicit state checks, the agent missed unresponsive buttons or miscalculated amounts.
Patching only the surface from static code: Reading static source, the agent produced a seemingly self-consistent explanation and added a null-check or default value at the UI layer, swallowing the exception while underlying business data remained corrupted.
Self-review in the same session: The same session that wrote the patch then reviewed it; seeing a clean compile, it declared the fix complete.
Part 02: Prompt Engineering Cannot Overcome Confirmation Bias
Adding hundreds of lines of instructions (“verify experiment switches first”, “self-review strictly”) failed because a single long context suffers from the same confirmation bias as a human: an early wrong hypothesis colors every subsequent log line, and the model cannot objectively critique its own work.
Core insight (Harness > Prompt): Instead of pleading with the model, build engineering guardrails that enforce context isolation and role separation at the architecture level.
The team split the monolithic session into a multi-agent architecture with strict context boundaries:
Pure state-machine orchestrator: Top-level scheduler never touches a device or code; it only gates progress based on concrete result files and verification exit codes.
Clean read-only side agents (back-to-back anti-bias): Agents that trace cross-repo call chains and propose hypotheses each run in a fresh, isolated context, blind to the main task’s trial-and-error history. Every hypothesis must include a concrete on-device falsification plan.
Independent review agent (blind review): After a patch passes on-device tests, a fresh session with zero prior context receives only the original ticket symptom, the approved expectation, the minimal git diff, and the on-device evidence. It critiques like a cold reviewer who wasn’t up all night debugging; any doubt triggers an immediate rejection.
Part 03: External Isolation, Internal Continuity — “Outer Isolation, Inner Connection”
Early multi-agent runs over-engineered: downloading full screen recordings, pre-configuring test accounts, and splitting device control across phases. Any hiccup lost the hard-won reproduction state, forcing a full environment rebuild.
The team adopted a ruthless subtraction: “Outer isolation, inner connection.” Read-only side agents and the blind reviewer stay strictly context-isolated. The hands-on work — controlling the real device, editing code — is consolidated into a single main debugging agent running inside a dedicated Git Worktree directory.
Now a ticket starts light: grab base package info, claim a cloud device, pull the baseline debug build. Heavy screen-recording parsing and UI-tree simplification run asynchronously in the background. The moment the device and build are ready, the main agent takes over, stepping through the reproduction steps, filling in missing dialog transitions, and locking the cold-start path into a replay script. Side agents serve only as reference notes; they never seize the device. Root-cause verdicts come from the main task holding the live device, cross-referencing product expectations, device experiment archives, recent commits, and frontend/backend boundaries with live test evidence.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.