Training terminal agents requires scalable executable supervision, yet synthesizing high-quality terminal tasks remains challenging. Each task couples an instruction, an initialized environment, a reference solution, and an executable verifier; if these artifacts are generated from inconsistent assumptions, the resulting task may be unsolvable or incorrectly evaluated. Meanwhile, multi-stage synthesis can discard the goals, dependencies, state transitions, and procedural constraints encoded in the original sources. We present FACET (Fine-grained Agentic Construction of Executable Tasks), a framework that addresses both information preservation and cross-artifact consistency. FACET reconstructs related agent skills into coherent, information-rich scenarios, then realizes and repairs the execution environment before generating the final task artifacts. The resulting container state serves as shared grounding for the instruction, solution, and verifier, while execution-based validation and targeted repair correct artifact-specific failures without unnecessarily regenerating valid components. FACET produces complex terminal tasks with dense executable checks, and successful trajectories collected from these tasks provide effective, data-efficient supervision. Fine-tuning models across multiple scales consistently improves performance on Terminal-Bench 2.1, while analyses of alternative generation schemes support the importance of environment-grounded construction for task validity and solution-verifier alignment. These results establish source-intent preservation and shared executable-state grounding as key principles for scalable terminal-task synthesis.
Figures & tables
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.
Dataset
Trajectory
Task
#Traj.
Turns
#Tasks
Tests
P@1
P@3
Nemotron-Terminal ( Pi et al., 2026 )
5K
6.12
15K
6.18
40.67
48.00
Endless-Terminals ( Gandhi et al., 2026 )
200
4.53
2,492
5.51
83.00
87.00
Terminal-Lego ( Yang et al., 2026 )
32K
5.77
15K
16.60
47.00
49.00
TerminalWorld ( Chu et al., 2026 )
200
11.94
1,530
3.98
57.00
82.00
Tmax ( Ivison et al., 2026 )
500
11.14
15K
3.29
80.00
86.00
Table 1: Trajectory- and task-level comparison of terminal-agent datasets. Trajectories are collected using the Terminus-2 scaffold, and task performance is evaluated using DeepSeek-V4-Pro with Terminus-2. Turns and Tests denote the average interaction turns per trajectory and executable checkpoints per task. Detailed protocols are provided in Appendix A.6 .
Model
Size
Agent
Terminal-Bench 2.1
Reported reference models
GPT-5.5 (xhigh) ( Terminal-Bench, 2026a )
—
Terminus-2
78.00
Claude Opus 4.7 (max) ( Terminal-Bench, 2026a )
—
Terminus-2
66.10
Gemini 3 Pro (high) ( Terminal-Bench, 2026a )
—
Gemini CLI
65.80
Intern-S2-Preview-397B ( Bai and others, 2026 )
397B
Terminus-2
67.42
MiniMax M3 ( MiniMax, 2026 )
428B
Terminus-2
66.00
Table 2: Results on Terminal-Bench 2.1. Scores under our evaluation setting are averaged over three independent attempts per task.
Figure 2: Analysis of execution and synthesis failures. (a) Distribution of failed or errored verifier checks among unsuccessful teacher rollouts; three rollouts without a parsed FAILED / ERROR result are omitted. (b) Distribution of initial validation failure types under the Forward, Reverse, and Joint generation schemes.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Category
Skills
Share
AI, agents, and tools
15,182
21.28%
Software, systems, and security
15,059
21.11%
Data, analysis, and research
12,409
17.39%
Documents, productivity, and workflows
11,267
15.79%
Multimedia, creation, and publishing
17,424
24.42%
Total
71,341
100.00%
Appendix
Table 3: Top-level source-skill distribution.
Parent
Fine-grained category
Count
Global
Within parent
AI, agents, and tools
Agent orchestration and automation
2,782
3.90%
18.32%
Prompt and model calls
3,310
4.64%
21.80%
Skills, plugins, and extensions
1,637
2.29%
10.78%
MCP and external tools
2,579
3.62%
16.99%
Memory, RAG, and knowledge bases
3,439
4.82%
22.65%
Multi-agent collaboration
1,435
2.01%
9.45%
Appendix
Table 4: Fine-grained source-skill categories. “Global” is the share of all 71,341 skills; “within parent” is the share inside the corresponding top-level category.
Figure 3: Distributions of source skills and synthesized tasks. (a) The retained skill corpus spans five top-level families and 34 fine-grained categories. (b) The 6,078 validated tasks are distributed across nine task families, whose individual shares range from 9.59% to 11.99%.
Figure 4: Strict task-level pass rates for the 20 most frequent skill tags among the 6,066 completed rollouts. Error bars indicate Wilson 95% confidence intervals, and the dashed line denotes the overall pass rate. Tags are selected by frequency and ordered by observed pass rate.
Stage
Count
Stage retention
Scenario–skill seeds
7,852
—
Seeds with first-build logs
7,841
99.86%
Initial environment success
6,630
84.56%
Environment repair recovery
874
—
Successful environments
7,504
95.70%
Entering task validation
7,446
99.23%
Appendix
Table 5: Task-construction funnel. Percentages in the last column use the immediately preceding comparable stage.
Figure 5: Command-level patterns in successful teacher trajectories. The left panel shows the most frequent shell commands, colored by their dominant contextual class. The right panel reports row-normalized transitions between adjacent assistant-turn states.
View
Statistic
Value
Command usage
cat occurrences
18,168 (46.4%)
Top three commands
27,207 (69.5%)
Top ten commands
34,598 (88.4%)
Observation commands
33,140 (84.7%)
Turn dynamics
Observation-only first turn
1,214 (95.6%)
Observation-only → observation-only
4,324 (55.6%)
Appendix
Table 6: Selected command- and turn-level statistics for successful teacher trajectories. Shares for command statistics use all 39,136 command occurrences; transition probabilities are normalized within the current turn state.
Scheme
Reached validation
Initially valid
Final yield
Forward (Ours)
99
46 (46.5%)
83/100
Reverse
91
22 (24.2%)
63/100
Joint
96
36 (37.5%)
65/100
Appendix
Table 7: Outcomes of three artifact-generation orders on 100 shared semantic paths. Initial validity is computed over tasks that reach validation, while final yield is computed over all selected paths.
Step
Stage
Operation
1
Materialize environment
Generate the Dockerfile, fixtures, dependencies, and initialization scripts from the reconstructed task specification.
2
Build and repair
Build the image with docker build . Build or initialization failures are returned to the environment-repair agent for at most three iterations.
3
Capture shared state
Start a temporary container, inspect the task workspace, and record the realized initial state e0 .
4
Generate artifacts
Generate the final instruction, reference solution, and verifier using the same reconstructed specification and shared state e0 .
5
Baseline validation
Start a clean container, copy and execute the verifier without running the solution, and require reward 0.
6
Oracle validation
Start another clean container, copy and execute solution/solve.sh , run tests/test.sh , and require reward 1.
Appendix
Table 8: Shared-state task construction and Docker round-trip validation.
Setting
Value
Supervised fine-tuning
Base models
Qwen3.5-4B, Qwen3.5-9B, Qwen3.5-27B
Training data
1.2K complete successful trajectories
Training strategy
Full-parameter SFT with BF16 and ZeRO-3
Epochs / effective batch size
3 / 64
Learning rate / schedule
1×10−5 / cosine with 0.1 warmup ratio
Appendix
Table 9: Principal training and evaluation configurations.
Pipeline
Packages
Validated
Yield
P@1
P@3
Avg. Cmds.
Baseline
437
78
15.6%
80.8%
85.9%
12.8
TW
449
139
27.8%
58.8%
64.0%
17.0
FACET (Ours)
395
350
70.0%
25.1%
33.1%
21.5
Appendix
Table 10: End-to-end comparison over 500 common skill-pair inputs. Packages denotes complete Harbor task packages, Validated denotes tasks passing oracle validation, and Yield is computed over all inputs. P@1 and P@3 are evaluated on the tasks retained by each pipeline, and Avg. Cmds. is the average number of terminal commands per rollout.