NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Agent MechSuits : Mechanistic Subspace Safety Steering for Multi-Turn CLI Agents

Weidi Luo, Qiming Zhang, Mingyu Jin, Jie Cai, Yihao Quan, Chaowei Xiao, Jingcheng Niu, Zhen Xiang

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: AI Safety, Security & Alignment › Chain-of-Thought Monitoring · Type: new method · Keywords: LLM safety, mechanistic interpretability, subspace intervention, command-line agents, multi-turn safety

Areas: AI Agents › Agent Robustness › Agent Failure Attribution; Safety & Security › Safety Benchmarking › Agent Safety

Summary

Agent MechSuits introduces a white-box defense framework that detects harmful execution states by analyzing step-level hidden representations of LLM-based command-line agents and mitigates unsafe behavior through subspace intervention, and it releases the MAS benchmark with annotated multi-turn trajectories across 194 tasks.

Explained to a 5-year-old

A robot helper that talks to a computer reads its thoughts step by step. When it seems about to do something bad, the helper looks at a special hidden space and gently nudges it away from the danger. This keeps the robot safe while it works.

Explained to a 5-year-old, longer

Imagine a chatbot that can run commands on a computer. It can do many things, but sometimes it might say something harmful. To stop this, scientists look inside the chatbot's brain at each step of its thinking. They find a tiny hidden area where they can make small changes. By adjusting this hidden area, they can steer the chatbot away from saying bad things. They also created a big collection of safe and unsafe chat logs to teach the system how to recognize danger. This way, the chatbot stays friendly and safe while it helps us.

For a technical reader

The system monitors hidden states of the LLM at each interaction step to detect unsafe patterns. It then applies a targeted intervention in a low-dimensional subspace of a single transformer layer to steer the model away from harmful outputs. This white-box approach eliminates reliance on external guardrails and includes a new benchmark for evaluating safety detection.

Problem

Multi-turn command-line agents based on large language models can exhibit unsafe behavior, and existing safety mechanisms rely on external guardrails that lack fine-grained control. Additionally, current mechanistic interpretability methods for safety are limited to single-turn settings, making it difficult to capture evolving risk dynamics in multi-turn agent execution.

Method

The approach performs runtime safety detection by examining step-level hidden representations of the LLM and mitigates unsafe behavior by intervening in a low-dimensional subspace within a single transformer layer, enabling fine-grained control without external guardrails.

Results

The approach achieves strong safety detection performance, supports lookahead risk anticipation, and substantially reduces harmful agent actions.

Contributions

The paper investigates multi-turn command-line agent safety from an internal perspective, proposes a white-box defense framework that detects unsafe states via hidden representations and mitigates them through subspace intervention, and introduces the MAS benchmark with annotated trajectories across 194 tasks.

Practical relevance

Provides a practical, runtime safety solution for deploying LLM-based command-line agents in production environments with reduced reliance on external guardrails.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction