acceptodds
Under review as a conference paper at ICLR 2027

STRATA: Stratified Trajectory-to-Knowledge Augmentation for Terminal Agents

Abstract

Terminal agents are becoming an important interface for software development, system administration, and complex environment automation. However, they still struggle with long-horizon terminal tasks where small command mistakes can change the environment and lead to repeated failures. Supervised fine-tuning and reinforcement learning can improve such agents, but require large trajectory corpora, executable environments, and costly feedback. In this paper, we propose STRATA, a framework that converts past terminal trajectories into stratified external knowledge and uses it to enhance agents without updating model parameters. STRATA organizes external knowledge into Skills that capture successful execution patterns and Memories that distill reusable failure lessons from contrasts between successful and failed trajectories. Given a new task, STRATA adopts an agentic retrieval strategy to select relevant Skills and Memories from the library, then assembles them into the terminal agent prompt while keeping the backbone model unchanged. This design allows the agent to use both positive execution guidance and negative failure evidence when planning commands. Experiments on Terminal-Bench 1.0 and Terminal-Bench 2.0 show improvements across both weaker and stronger backbone models. On Terminal-Bench 2.0, STRATA achieves a mean pass rate of 63.3% across three runs with DeepSeek-V4-Pro, outperforming Agent Workflow Memory by 9.4 percentage points under a matched evaluation protocol. These results suggest that structured trajectory-derived knowledge is an effective way to improve terminal agents on long-horizon execution tasks without model retraining.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.