CLI-Gym: Scalable CLI Task Generation via Agentic Environment Inversion
Agentic coding requires agents to effectively interact with runtime environments, e.g., command line interfaces (CLI), so as to complete tasks like resolving dependency issues, fixing system problems, etc. But it remains underexplored how such environment-intensive tasks can be obtained at scale to enhance agents' capabilities. To address this, based on an analogy between the Dockerfile and the agentic task, we propose to employ agents to simulate and explore environment histories, guided by execution feedback. By tracing histories of a healthy environment, its state can be inverted to an earlier one with runtime failures, from which a task can be derived by packing the buggy state and the corresponding error messages. With our method, named CLI-Gym, a total of 1,655 environment-intensive tasks are derived, being the largest collection of its kind. Moreover, with curated successful trajectories, our fine-tuned model, named LiberCoder, achieves substantial absolute improvements of +21.1% (to 46.1%) on Terminal-Bench, outperforming various strong baselines. To our knowledge, this is the first public pipeline for scalable derivation of environment-intensive tasks.
698d437e65c0d15a6d162132
Yusong Lin
claimed_verified
2026-03-02T09:39:58.470Z
695f8d5d9e778cf056e56017
/avatars/a1ec00149303e4c69e43821d2ee43218.svg
Yusong Lin
x1aoche
user
x1aoche
698d437e65c0d15a6d162133
Haiyang Wang
claimed_verified
2026-02-12T13:28:33.349Z
65f43c3cc9940817caaf4434
/avatars/ecec2856ba7a7d3421a2071a0a88800b.svg
Haiyang Wang
Haiyang-W
user
Haiyang-W
698d437e65c0d15a6d162134
Shuzhe Wu
698d437e65c0d15a6d162135
Lue Fan
698d437e65c0d15a6d162136
Feiyang Pan
698d437e65c0d15a6d162137
Sanyuan Zhao
698d437e65c0d15a6d162138
Dandan Tu
CLI-Gym: Scalable CLI Task Generation via Agentic Environment Inversion
Agentic coding requires agents to effectively interact with runtime environments, e.g., command line interfaces (CLI), so as to complete tasks like resolving dependency issues, fixing system problems, etc. But it remains underexplored how such environment-intensive tasks can be obtained at scale to enhance agents' capabilities. To address this, based on an analogy between the Dockerfile and the agentic task, we propose to employ agents to simulate and explore environment histories, guided by execution feedback. By tracing histories of a healthy environment, its state can be inverted to an earlier one with runtime failures, from which a task can be derived by packing the buggy state and the corresponding error messages. With our method, named CLI-Gym, a total of 1,655 environment-intensive tasks are derived, being the largest collection of its kind. Moreover, with curated successful trajectories, our fine-tuned model, named LiberCoder, achieves substantial absolute improvements of +21.1% (to 46.1%) on Terminal-Bench, outperforming various strong baselines. To our knowledge, this is the first public pipeline for scalable derivation of environment-intensive tasks.
CLI-Gym enables scalable derivation of environment-intensive tasks by simulating and exploring environment histories, while LiberCoder achieves significant performance improvements on Terminal-Bench through fine-tuning.
CLI-Gym LiberCoder environment-intensive tasks Dockerfile agentic task execution feedback Terminal-Bench