TL;DR
FACET introduces a novel framework for synthesizing high-quality, complex terminal tasks to train AI agents by grounding instructions, solutions, and verifiers in a pre-built, verified execution environment. By ensuring cross-artifact consistency and using dense verification, FACET generates highly reliable training data that significantly boosts agent performance on Terminal-Bench 2.1 across multiple model scales.
What Problem Does This Paper Address?
Building effective LLM-based agents for terminal environments (like bash or command-line interfaces) requires high-quality training data. A single terminal task consists of four tightly coupled pieces: an instruction, an initialized environment (e.g., a Docker container), a reference solution, and an executable verifier.
Existing automated pipelines struggle with two main issues: information loss (complex multi-step workflows get oversimplified during generation) and artifact drift (the instruction might reference a file that doesn't exist in the environment, or the verifier might test for a state the solution never produces). If these components are inconsistent, the task becomes unsolvable or broken. FACET addresses this by enforcing strict environment-grounded consistency during task generation.
Methods
The authors propose FACET (Fine-grained Agentic Construction of Executable Tasks), a three-stage framework designed to preserve source intent and guarantee environment consistency:
- Scenario Reconstruction: Instead of translating raw skills directly into tasks, FACET agentically reconstructs them into rich, multi-dimensional scenarios (capturing goals, context, capabilities, states, and I/O tools).
- Environment-First Grounding: Crucially, FACET builds and initializes the Docker environment before generating the final task artifacts. The actual, realized container state is exposed as a read-only interface.
- Sequential Generation & Targeted Repair: Instructions, solutions, and verifiers are generated sequentially against this exact environment state. If validation fails, a constrained router identifies the broken component and runs a targeted repair loop rather than discarding the whole task.
Datasets
- Source Skills: 71,341 valid agent skills harvested from OpenClaw, ClawHub, and GitHub.
- FACET Dataset: A newly synthesized dataset containing 6,078 validated terminal tasks and 1.2K successful teacher trajectories used for Supervised Fine-Tuning (SFT).
- Terminal-Bench 2.1: Used as the primary evaluation benchmark to test the fine-tuned models.
- Compared against existing datasets including Nemotron-Terminal, Endless-Terminals, Terminal-Lego, TerminalWorld, and Tmax.
Key Insights and Ideas
- Grounding in Reality Beats Textual Specs: Generating task artifacts based on a realized container state prevents the hallucination of files, paths, or dependencies that plague text-only generation pipelines.
- Order of Operations Matters: The authors show that a "Forward" generation order (Instruction $\rightarrow$ Solution $\rightarrow$ Verifier) yields much higher alignment than generating the verifier before the solution ("Reverse") or all at once ("Joint"). Seeing the solution first helps the verifier understand the expected behavioral state transitions.
- The "Near-Success" Phenomenon: FACET tasks feature exceptionally dense verification (averaging 22.77 tests per task). Analysis revealed that 54% of failed agent attempts actually passed all but one or two checks, showing that agents often get the main job done but trip over minor constraints or secondary deliverables.
Key Results
- High Synthesis Yield: FACET achieved a 70.0% end-to-end task construction yield, vastly outperforming a standard baseline (15.6%) and a TerminalWorld-style pipeline (27.8%).
- Substantial Performance Gains: Fine-tuning Qwen3.5 models on just 1.2K FACET trajectories led to massive improvements on Terminal-Bench 2.1. For instance, Qwen3.5-4B jumped from 17.60 to 24.72, and Qwen3.5-9B rose from 27.34 to 35.58.
- Closing the Scale Gap: The fine-tuned Qwen3.5-27B model achieved a score of 47.57, coming remarkably close to the 49.06 score of the massive, 15× larger Qwen3.5-397B base model.
Limitations and Future Work
- Command Parsing Constraints: The current command parser cannot fully recover dynamically generated shell operations during trajectory analysis.
- Scope Expansion: The authors plan to extend FACET to broader sources of procedural knowledge and more diverse interactive environments beyond standard terminal tasks.
- Reinforcement Learning: Future work will explore using the generated tasks and dense execution feedback to support reinforcement learning for continuous agent improvement.
Summary updated