cs.SEFeb 19, 2026

Wink: Recovering from Misbehaviors in Coding Agents

Authors: Rahul Nanda, Chandra Maddila, Smriti Jha, Euna Mehnaz Khan, Matteo Paltenghi, Satish Chandra

Organizations: Meta Platforms, Inc. New York, NY, USA · Meta Platforms, Inc. Bellevue, WA, USA · Meta Platforms, Inc. Menlo Park, CA, USA

Abstract

Autonomous coding agents, powered by large language models (LLMs), are increasingly being adopted in the software industry to automate complex engineering tasks. However, these agents are prone to a wide range of misbehaviors, such as deviating from the user's instructions, getting stuck in repetitive loops, or failing to use tools correctly. These failures disrupt the development workflow and often require resource-intensive manual intervention. In this paper, we present a system for automatically recovering from agentic misbehaviors at scale. We first introduce a taxonomy of misbehaviors grounded in an analysis of production traffic, identifying three primary categories: Specification Drift, Reasoning Problems, and Tool Call Failures, which we find occur in about 30% of all agent trajectories. To address these issues, we developed a lightweight, asynchronous self-intervention system named Wink. Wink observes agent trajectories and provides targeted course-correction guidance to nudge the agent back to a productive path. We evaluated our system on over 10,000 real world agent trajectories and found that it successfully resolves 90% of the misbehaviors that require a single intervention. Furthermore, a live A/B test in our production environment demonstrated that our system leads to a statistically significant reduction in Tool Call Failures, Tokens per Session and Engineer Interventions per Session. We present our experience designing and deploying this system, offering insights into the challenges of building resilient agentic systems at scale.

Figures & tables

Explore similar work

CardsList
  1. SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents

    Oct 13, 2026Do Xuan Trong, Duc Anh Nguyen, Do Xuan Long +12AI Coding AgentsAI Agent Safety

  2. Failure as a Process: An Anatomy of CLI Coding Agent Trajectories

    Jul 10, 2026Xiangxin Zhao, Han Li, Shuaiting Li +4Agent Failure AnalysisCoding Agents

  3. Learning When and How to Intervene: A Hindsight-Distilled Sentinel for Coding Agents

    Sep 30, 2026Jiangrui Zhao, Chenglong Li, Meng Zhang +1Coding AgentsRuntime Enforcement for AI Agents