Abstract
Terminal simulation, framed as a terminal command-level Turing test, is a long-standing problem of symbolic language generation in dialogue and interactive systems. Prior scripted simulators lack the flexibility needed for complex, multi-turn interactions, while LLM-based approaches often misinterpret commands, break output formats, drift from system state, and remain vulnerable to prompt injection. In this work, we propose MANTIS, a terminal simulation framework that improves realism, consistency, and robustness in command-language generation. MANTIS integrates a multi-agent architecture with a filter-based routing model that safely dispatches commands to external tools or an LLM-based agent, enabling support for interactive commands while defending against prompt injection attacks. In addition, we design an agentic file system with history pruning to preserve long-term state consistency. We release three datasets: 28,045 real terminal input-output pairs, a 1,000-session multi-turn interaction dataset, and a 25,849-instance labeled classification dataset. MANTIS outperforms state-of-the-art baselines by more than 9%, achieving over 95% accuracy on multi-turn terminal simulation. The dataset and source code are available at https://github.com/kaiwei666a/MANTIS_Terminal_Simulation
- Anthology ID:
- 2026.acl-long.1515
- Volume:
- Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
- Month:
- July
- Year:
- 2026
- Address:
- San Diego, California, United States
- Editors:
- Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
- Venue:
- ACL
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 32828–32845
- Language:
- URL:
- https://aclanthology.org/2026.acl-long.1515/
- DOI:
- Bibkey:
- Cite (ACL):
- Kai Wei, Yuwen Cui, Kehan Shen, Hua Wei, and Guangjing Wang. 2026. A Multi-Agent Framework for High-Interaction Terminal Simulation. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 32828–32845, San Diego, California, United States. Association for Computational Linguistics.
- Cite (Informal):
- A Multi-Agent Framework for High-Interaction Terminal Simulation (Wei et al., ACL 2026)
- Copy Citation:
- PDF:
- https://aclanthology.org/2026.acl-long.1515.pdf
- Checklist:
- 2026.acl-long.1515.checklist.pdf


















