NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FACET: Preserving Source Intent and Executable State in Terminal Task Synthesis

Kou Shi, Zun Wang, Qisheng Su, Shiting Huang, Ziao Zhang, Zhen Fang, Qingnan Ren, Jin Liu, Yu Zeng, Yiming Zhao, Lin Chen, Zehui Chen, Feng ZhaoarXiv 2026

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:

  1. 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).
  2. 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.
  3. 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.
Figure 1: Overview of FACET. Stage 1 collects skills and constructs the scenario–skill repository. Stage 2 understands the selected skills, explores and recovers a joint scenario, expands it into a complete representation, and builds aligned solution and instruction references. Stage 3 constructs and validates the environment before generating the final task artifacts, with bounded repair loops for failed builds and tests.

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.
Performance comparison of base vs. fine-tuned models on Terminal-Bench 2.1

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

BibTeX
@misc{shi2026facet,
  author = {Kou Shi and Zun Wang and Qisheng Su and Shiting Huang and Ziao Zhang and Zhen Fang and Qingnan Ren and Jin Liu and Yu Zeng and Yiming Zhao and Lin Chen and Zehui Chen and Feng Zhao},
  title = {{FACET: Preserving Source Intent and Executable State in Terminal Task Synthesis}},
  year = {2026},
  eprint = {2608.18580},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.18580},
}
Figure