In a recent server migration experiment, an AI agent successfully drove its built-in browser through the AWS Lightsail console and a payment provider's admin panel, proving that most complex UI interactions are now automatable. The agent handled instance creation, static IP attachment, and even two-step deletion confirmations by leveraging the accessibility tree rather than coordinate clicks. However, the operation stalled at four specific 'Save' buttons, revealing a sharp boundary between tasks suitable for delegation and those requiring human intervention.
The Accessibility Tree Advantage
The agent's success in navigating the AWS console relied on a specific technical approach: querying the accessibility tree to get element references (refs) instead of guessing button locations from screenshots. This method bypassed common issues like viewport scaling and zoom distortions that typically break coordinate-based automation. Operations like filling the 'name' field and clicking 'create' worked flawlessly because the agent could directly target the DOM elements with precision, avoiding the fragility of visual recognition.
React State vs. DOM Value
The first major failure point involved the firewall rule form, where setting the port field's value programmatically caused the screen to display '443' while the underlying React state remained empty. This mismatch triggered validation errors upon saving, a classic symptom of React controlled components where the UI does not reflect the application state. While a workaround exists using native setters and dispatching input events, the agent struggled with AWS's Cloudscape custom select boxes, where internal event plumbing prevented the 'Attach' button from enabling even after correct selection.
Safety Valves and Session Expiry
Not all failures were technical; one DNS record edit was blocked by the agent's own automation policy, which classified external impact changes as high-risk and refused the click. Additionally, the payment provider's admin panel enforced a ten-minute session timeout, causing the agent to get logged out three times mid-task. These incidents highlighted that AI agents are not just limited by code compatibility but also by deliberate safety constraints and infrastructure limitations like session management.
The Human-in-the-Loop Pattern
The most effective workflow emerged from a strict division of labor: the AI agent handled reading, validating, and pre-filling values, while a human pressed the final 'Save' button. This pattern minimized errors and ensured accountability for irreversible operations like DNS cutovers. By keeping the human as the final gatekeeper for state-changing actions, the migration team achieved a balance between automation speed and operational safety.
Key Takeaways
- Coordinate clicks are fragile; always use accessibility tree refs for reliable element targeting.
- React controlled components require specific native setter hacks to sync DOM values with internal state.
- AI agents often have built-in policy blocks for high-impact actions like DNS changes.
- Session timeouts remain a significant hurdle for long-running automated tasks.
The Bottom Line
Current AI agents are excellent at navigating complex UIs but still lack the deep state synchronization needed for reliable form submission in modern web apps. The 'read-only automation' model is the only safe way to deploy agents in production environments today.