Turning Frozen AI Code Sessions into Dynamic, Replayable Workspaces for Smarter Software Agents

Photo of author

By Sophia Chen

As artificial intelligence agents increasingly interact with code through terminal commands, researchers face a challenge: while vast records of these AI “trajectories” exist, there are few realistic environments where agents can continue to practice, learn, and improve. A newly published study introduces a clever way to transform these static code sessions into fully playable environments, enabling AI agents to engage in ongoing, scalable coding tasks. This work could help accelerate the development of smarter, more adaptable AI coding assistants by providing them with richer, more interactive training grounds.

Key Takeaways

  • The researchers developed Terminal-Universe, a framework that reconstructs executable coding environments from recorded AI terminal sessions, called trajectories.
  • By replaying file operations from these trajectories, Terminal-Universe partially restores the original workspace and uses AI to fill in missing files and dependencies.
  • The framework can generate new coding tasks by exploring reconstructed environments, including multi-step, interactive sessions that mimic real developer workflows.
  • Training AI models on these reconstructed environments improved their performance on established coding benchmarks by around 12-14 points.

In simple terms, a “trajectory” is like a frozen video of an AI agent’s coding session, showing the sequence of commands and file edits it made. However, this video alone doesn’t let the agent “replay” or learn from the session because it lacks an interactive environment. Terminal-Universe changes that by using the recorded actions to rebuild the coding workspace as it existed during the session. It does this by going back through the file operations—like creating, modifying, or deleting files—to restore the workspace to its earlier state.

Since some files or dependencies might be missing from these partial reconstructions, the system uses a “completion agent,” another AI model that predicts and fills in the gaps to create a fully functional environment. This reconstructed workspace then becomes a sandbox where the original task can be rerun or new, related tasks can be synthesized. For example, Terminal-Universe can link multiple related environments to create more complex, cross-project queries, reflecting how developers often work across several codebases. It also supports multi-turn interactions, allowing iterative refinement of tasks based on user feedback, which better simulates real-world programming conversations.

This approach not only makes better use of the large amounts of existing AI coding session data but also provides a scalable way to generate rich, verifiable tasks with execution feedback—something that static trajectories alone cannot offer. The researchers demonstrated the effectiveness of their framework by applying it to public datasets of terminal agent trajectories, producing over 37,000 task-ready environments. When they fine-tuned a large AI coding model (Qwen3.5-27B) on this data, it showed significant improvements on multiple coding benchmarks, suggesting that these reconstructed environments can meaningfully boost AI coding capabilities.

Looking ahead, Terminal-Universe offers a promising path toward more robust and interactive training environments for AI coding assistants, potentially leading to tools that better understand complex developer workflows and adapt dynamically to user needs. Further research could explore expanding this technique to other types of AI agents and environments, helping bridge the gap between static demonstrations and active learning in AI development.

Based on research published on arXiv by Jie Wu, Zhenru Zhang, Beichen Zhang et al..

Editor's note

This AI briefing pairs the latest development with policy and market context so readers can judge the wider stakes quickly.

Article briefing

As artificial intelligence agents increasingly interact with code through terminal commands, researchers face a challenge: while vast records of these AI “trajectories” exist...

Story details

  • Author: Sophia Chen
  • Published: September 5, 2026
  • Category: AI

Key developments

  • In simple terms, a “trajectory” is like a frozen video of an AI agent’s coding session, showing the sequence of commands and file edits it made.
  • However, this video alone doesn’t let the agent “replay” or learn from the session because it lacks an interactive environment.
  • Terminal-Universe changes that by using the recorded actions to rebuild the coding workspace as it existed during the session.

Why this matters

This work could help accelerate the development of smarter, more adaptable AI coding assistants by providing them with richer, more interactive training grounds.

Background

A newly published study introduces a clever way to transform these static code sessions into fully playable environments, enabling AI agents to engage in ongoing, scalable coding tasks.

Source

This article is based on source material from arxiv.org.

About the author

Sophia Chen

Sophia Chen covers artificial intelligence and emerging technology. With a background in computer science and a decade of tech journalism, she specialises in AI policy, machine learning applications and the societal impact of automation.

editorial@peacknews.com

Categories AI