Survey · 2026 · Living reading list

Terminal Agents: A Survey of AI Agents in Command-Line Environments

A unified execution-substrate view of how AI agents formulate commands, interpret textual feedback, manage mutable environments, verify progress, recover from failure, and control side effects.

Yi Bin1* Xiaoyang Yuan1,4* Haoxi Zeng1* Wencheng Ye1* Wenqi Shao4 Chen Qian2 Wei Ye1 Yujuan Ding3 Zheng Wang1 Pengpeng Zeng1 Jingkuan Song1 Heng Tao Shen1

* Equal contribution

1Tongji University 2Shanghai Jiao Tong University 3The Hong Kong Polytechnic University 4Shanghai Innovation Institute
01 / Overview

Terminal-Mediated Action–Observation Loop

The terminal is an execution substrate rather than merely a visible interface. Commands mutate persistent state, observations expose inspectable evidence, and later decisions depend on the resulting workspace.

Terminal-agent scope diagram showing the agent controller, terminal substrate, mutable environment state, and scope boundaries
FIG. 01Operational scope of terminal agents: the dominant progress-bearing loop is mediated by command execution, textual feedback, and stateful environment interaction.
Progressive system design

Terminal-mediated agency emerged as interfaces, mutable workspaces, runtime control, recovery, governance, and harness context became explicit design surfaces.

Technical evolution from tool-augmented prompting to runtime and harness optimization
FIG. 02Four shifts toward increasingly explicit terminal-agent architecture.
Layered terminal-agent architecture around the action-observation loop
FIG. 03Interface, runtime, control, and harness layers distribute responsibility around the loop.
02 / Taxonomy

Seven Dimensions of Terminal Competence

The profile organizes recurring responsibilities by the object being controlled, the evidence required for the next decision, and the response needed when execution diverges from the task.

01FORMULATE

Command & Action

Translate goals, constraints, and state into executable operations.

02INTERPRET

Feedback & Artifacts

Extract evidence from output, logs, diffs, traces, and files.

03MANAGE

Runtime & Environment

Prepare dependencies, services, processes, and execution constraints.

04TRACK

State, Task & Context

Maintain workspace state, history, facts, and unresolved goals.

05VERIFY

Progress Verification

Check intermediate validity, artifact trustworthiness, and completion.

06RECOVER

Recovery & Adaptation

Diagnose failure, revise hypotheses, replan, and retry from evidence.

07GOVERN

Side-Effect Control

Respect permissions, sandboxes, approvals, credentials, and limits.

07
INTERDEPENDENT / SYSTEM-LEVEL

Competence lives across the complete system.

Model, interface, harness, runtime, and environment jointly shape observed behavior. Recovery depends on feedback interpretation, state tracking, and verification; long-horizon persistence combines several dimensions at once.

Executable tracesRuntime adaptationGovernance
Terminal competence acquisition ecosystem and seven-dimensional competence profile
Environment-grounded data, learning signals, runtime mechanisms, and governance jointly shape terminal competence.
03 / Evaluation

Desired behavior needs visible evidence.

Outcome scores remain essential, but process, environment, trace, and governance evidence determine what can be concluded about how an agent reached the result.

01

Outcome

Did the task complete under the benchmark-native evaluator?

02

Process

How did the agent formulate actions, use feedback, and recover?

03

Environment

Was runtime setup, persistence, and state validity established?

04

Trace

Can commands, observations, state changes, and checks be inspected?

05

Governance

Were permissions, containment, reversibility, and side effects visible?

Repository repair

SWE-bench · Claw-SWE-Bench · SWE-PolyBench

CLI / terminal-centered

Terminal-Bench · TerminalWorld · LongCLI-Bench

Setup & process

SetupBench · OctoBench · ProcBench

Governance & safety

BashArena · ClawSafety · policy-focused protocols

Benchmark exposureDifferent task families foreground different process demands.
System attributionMeasured behavior reflects model, interface, harness, runtime, and environment together.
04 / Future directions

Toward dependable terminal-mediated agency

Four connected priorities follow from the survey's architecture, acquisition, and evaluation evidence.

01

Cross-domain competence

Separate reusable substrate-level capabilities from workflow-specific heuristics across operations, data engineering, science, cloud management, and security.

TransferDomain breadth
02

Fresh, replayable evaluation

Combine live or regenerated tasks with traces that preserve commands, observations, state changes, interventions, and verifier calls.

FreshnessReplayability
03

Runtime governability

Assess task success together with authorization, containment, reversibility, destructive-action prevention, and external side-effect control.

SafetyControl
04

Controlled attribution

Vary model, interface, harness, or runtime while preserving task identity and execution conditions to isolate transferable gains.

Factorial designAttribution
05 / Citation

Build on the survey.

The arXiv release provides the primary paper entry point. Preprints remains available as a mirror, while the companion repository maintains the curated reading list and project materials.

BIBTEX / 2026
@article{yuan2026terminal,
  title={Terminal Agents: A Survey of AI Agents in Command-Line Environments},
  author={Yuan, Xiaoyang and Zeng, Haoxi and Ye, Wencheng and Bin, Yi and
          Shao, Wenqi and Qian, Chen and Ye, Wei and Ding, Yujuan and
          Wang, Zheng and Zeng, Pengpeng and others},
  year={2026},
  publisher={Preprints}
}