TL;DR
Fly-by-Code introduces a novel "Active Feedback" framework that allows embodied coding agents to move beyond passive observation. By generating separate diagnostic programs to actively View (navigate to better vantage points) and Probe (perform physical tests) their environment, these agents can resolve uncertainties in complex aerial manipulation tasks, boosting success rates from 31.7% to 75% in simulation and enabling zero-shot transfer to real-world robots.
What Problem Does This Paper Address?
Embodied coding agents—LLMs that translate natural language instructions into executable robot code—have shown great promise. However, they typically rely on "passive" feedback, such as terminal console logs or a single final camera image, to decide if a task succeeded or how to fix a failure.
This approach fails spectacularly in aerial manipulation. Unlike stationary industrial arms, a drone's "eyes" (onboard cameras) move with its body. Once a drone finishes a task and flies away, it often loses sight of the outcome—a problem of partial observability. Furthermore, the fragile dynamics of flight make physical interactions (like grasping or pushing) unreliable. A log might say close_gripper() succeeded, but the object might have slipped out due to a gust of wind. Passive feedback cannot distinguish between a successful task and a "silent" failure that happened off-camera.
Methods
The core contribution is Active Feedback (AF), a dedicated diagnostic stage inserted into the program-refinement loop. Instead of immediately trying to fix a failed task program, the agent first writes a separate diagnostic program to gather missing evidence.
As shown in Figure 2, AF consists of two primary actions:
- View: The agent commands the drone to fly to specific, informative viewpoints to verify outcomes (e.g., "Fly above the basket to see if the hammer is actually inside").
- Probe: The agent performs targeted physical interactions to test hypotheses about failure (e.g., "If the door didn't open with a straight pull, try a small arc motion to test the hinge").
These diagnostic programs use the same high-level APIs as the task programs (perception, motion planning, etc.) but are executed in a "sandbox" where actions don't count toward the final task score. This decoupling gives the agent the freedom to prioritize information gathering over task completion.
Datasets
The authors evaluated Fly-by-Code using:
- AM-Bench (Extended): A modular simulation suite for aerial manipulation based on NVIDIA's Isaac Lab.
- Six Diverse Tasks: These include spatial transport (Pick-and-place, Sorting) and contact-rich interactions (Aligning boxes, opening Cabinets).
- Laboratory Digital Twin: A high-fidelity simulation environment reconstructed from a real-world lab using 3D Gaussian Splatting.
Key Insights and Ideas
- Diagnosis as Code: Rather than relying on a fixed verification routine, the agent synthesizes a custom diagnostic program for every attempt. This allows it to target the specific uncertainty of a particular failure.
- The "No Harness" Failure: The authors tested a baseline where the agent had unrestricted access to raw video and logs but no structured diagnostic stage. It performed poorly, proving that simply having "more data" isn't enough; the agent needs the agency to actively seek out the right data.
- Zero-Shot Sim-to-Real: Because the task programs are written using high-level, shared APIs, code refined in simulation can be deployed directly onto a physical quad-tiltrotor robot without modification. The underlying control stack handles the messy differences between simulated and real-world physics.
Key Results
Fly-by-Code significantly outperformed existing state-of-the-art coding agent frameworks like CaP-X:
- Success Rates: In simulation, AF achieved a 75% success rate across all tasks, compared to just 31.7% for standard terminal feedback and 48.3% for trace-based feedback.
- Reliability: AF drastically reduced "false positives"—instances where the robot incorrectly claimed it had finished the task—from 25 cases down to only 5.
- Real-World Performance: In zero-shot physical deployments, the system achieved an 80% success rate on a complex two-object pick-and-place task and 60% on a cabinet-opening task. These missions required nearly 10 minutes of sustained autonomous operation.
Limitations and Future Work
While powerful, the authors note several areas for improvement:
- Overhead: The diagnostic stage adds computational cost (LLM tokens) and execution time.
- Perception Bottlenecks: If the robot's onboard sensors are fundamentally too noisy or biased, even active viewing won't yield the correct conclusion.
- Safety: The current framework allows "unrestricted physical probing" in simulation, but performing such tests on a real, expensive drone requires much stricter safety guarantees to prevent the diagnostic phase itself from causing a crash.
- Morphology: The study focused on a specific quad-tiltrotor; future work could explore how these agents adapt to different robot shapes and sizes.
Summary updated