Runaway is Ashamed, But Helpful: On the Early-Exit Behavior of Large Language Model-based Agents in Embodied Environments (2025)

Abstract: Agents powered by large language models (LLMs) have demonstrated strong planning and decision-making capabilities in complex embodied environments. However, such agents often suffer from inefficiencies in multi-turn interactions, frequently trapped in repetitive loops or issuing ineffective commands, leading to redundant computational overhead. Instead of relying solely on learning from trajectories, we take a first step toward exploring the early-exit behavior for LLM-based agents. We propose two complementary approaches, 1. an **intrinsic** method that injects exit instructions during generation, and 2. an **extrinsic** method that verifies task completion to determine when to halt an agent’s trial. To evaluate early-exit mechanisms, we introduce two metrics: one measures the reduction of **redundant steps** as a positive effect, and the other evaluates **progress degradation** as a negative effect. Experiments with 4 different LLMs across 5 embodied environments show significant efficiency improvements, with only minor drops in agent performance. We also validate a practical strategy where a stronger agent assists after an early-exit agent, achieving better performance with the same total steps. We will release our code to support further research.

## introduction large language models (llms, @xcite have shifted the paradigm from merely responding to user inputs to tackling more complex tasks within interactive environments such as household settings @xcite , virtual worlds @xcite , and games @xcite . llm-based agents serve as intelligent controllers, capable of perceiving environments, executing actions, and adapting through feedback while early termination slightly reduces the success rate, it significantly decreases the average number of interaction steps, indicating improved efficiency. @xcite . previous studies show that structured workflows-such as reasoning before acting @xcite , predicting future states @xcite , and learning from high-quality trajectories @xcite -can improve performance within a single trial. when agents do fail, post-hoc approaches such as reflexion @xcite , autoplan @xcite , and expel @xcite enable them to learn from failures and replan more effective solutions in subsequent trials. however, a key limitation of llm-based agents remains underexplored: they often fail to recognize when a goal is too difficult or when they are stuck. prior work shows that agents may repeat the same errors in unproductive loops without meaningful actions or self-correction @xcite , leading to unnecessary computational overhead. this issue becomes even more critical in real-world settings, where repeated mistakes by embodied agents can waste energy, cause wear-and-tear, or even damage physical objects in the environment. therefore, incorporating built-in self-awareness mechanisms ## experimental setup datasets we evaluate our methods across 3 embodied environments and 2 gaming environments. for embodied environments, alfworld @xcite includes 134 household tasks that require agents to explore their surroundings and complete instructions such as "look at bowl under the desklamp." scienceworld @xcite simulates a total of 90 scientific experiments in an interactive setting, such as "measure the melting point." babyai (chevalier-boisvert et al., 2019) is a 20x20 grid-based environment where agents must navigate and interact with objects to accomplish 112 defined goals. we also consider two gaming environments. jericho @xcite comprises 20 text-based fictional worlds, which we adapt using the setup from @xcite to be completed within 15 subgoals. pddl represents a suite of strategic planning tasks defined in the planning domain definition language @xcite . following @xcite , we include four distinct games, namely, 60 unique environments for evaluation. llms to ensure reproducibility, we evaluate four open-source large language models with varying parameter sizes. from the llama 3.1 series foot_3 @xcite , developed by meta, we use two instruction-tuned models: the 8b version (llama3.1-8b-instruct) and the 70b version (llama3.1-70b-instruct), with the latter quantized using 4-bit awq @xcite for efficient inference. in addition, we test two models from the mistral family foot_4 (jiang et al., 2024): mistral-7b-instruct (v0.3) and mistral-24b-instruct (mistral-small-instruct-2409). prompts we adopt react-style @xcite prompting to enable llm-based agents to interact effectively with the environment. following song et al. ( 2024 ), we format the interaction prompt as a multi-turn conversation, including an in-context example for each task. for early-exit instructions, we explore prompt variants with varying strictness levels (see in appendix b), aligning the strategy with specific llms. hyperparameters for all experiments, we set the temperature to 0.1 and limit each turn's response to a maximum of 256 tokens. ## main results we experiment on 3 embodied environments and 2 gaming environments, and report results in however, for all four tested llms, certain early exit strategies yield minimal performance loss. for example, using the extrinsic ("ext.") method on llama3.1-70b-instruct, the progress rate drops by under 2%, 3%, and 4% in alfworld, babyai, and scienceworld, respectively. this shows that appropriate early exits can greatly improve efficiency with negligible performance impact. too-early scenarios if the early exit mechanism triggers too early ("too early"), it may reduce redundant steps but significantly impair progress. this is evident in the result of the external early exit of llama3.1-8b-instruct on babyai, where early termination yields a low rs but a high pd of 30.5. too-late scenarios conversely, if the early exit mechanism triggers too late ("too late"), pd remains low but rs stays high. this is seen in mistral-24b-instruct, when using both intrinsic and extrinsic early exit methods fail to reduce rs. ## practical implications 6.1 motivation a key advantage of our proposed early-exit mechanism is that agents capable of recognizing failure can proactively terminate and seek assistance, thereby increasing the likelihood of successful problem-solving. this aligns with realistic application scenarios, where humans may intervene directly or request help via a central server. in contrast, agents without early-exit continue until the step limit, often wasting valuable interactions and failing to complete the task. to illustrate this, we simulate a practical scenario in embodied environments, where a weaker agent exits early from challenging environments and requests assistance from a stronger agent. 6.2 setting dataset we use alfworld @xcite as our test set, which is a typical embodied environment with 134 different tasks. ## discussion selecting early-exit strategies we examine three types of early-exit strategies: intrinsic, extrinsic, and hybrid. the intrinsic approach embeds exit instructions directly into the agent's prompt; the extrinsic approach relies on a separate verification module (sharing the same llm backbone) to monitor trajectories; and the hybrid approach combines both, using the extrinsic verifier to signal termination and then injecting intrinsic exit instructions for subsequent steps, ensuring alignment between verifier and agent. experiments show that different llms exhibit distinct behaviors under these strategies, preventing us from recommending a universal best setting. instead, we provide model-specific recommendations in appendix a, guided by the principle of minimizing progress degradation while reducing redundant steps. overall trends across models analysis of ## conclusion in this work, we propose a dynamic early-exit framework for llm-based agents in complex embodied environments, incorporating intrinsic and extrinsic early-exit mechanisms. both approaches improve efficiency in our experiments. to better evaluate the impact of early exits, we introduce two complementary metrics that capture both its positive and negative effects. additionally, we design a practical experiment in which a stronger agent assists a weaker one in continuing task execution, leading to enhanced performance. we hope our approach serves as a first step toward improving the efficiency of llm-based agents and that our proposed metrics can be readily adopted by future research for evaluating agent efficiency.