# Mechanistyczne sterowanie bezpieczeństwem agentów CLI

EN: **Mechanistic subspace safety steering for multi-turn agents** · id `mechsuits`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Bezpieczeństwo i governance](https://aiatlasgraph.com/t/safety.md) › [Bezpieczeństwo aplikacji AI](https://aiatlasgraph.com/t/security.md) › [Bezpieczeństwo agentów: uprawnienia i izolacja](https://aiatlasgraph.com/t/agentsecurity.md) › Mechanistyczne sterowanie bezpieczeństwem agentów CLI

## Description

- PL: Eksperymentalna metoda białoskrzynkowa wykrywa szkodliwe stany wykonania wieloturowych agentów CLI z ukrytych reprezentacji i interweniuje w dziesięciu wybranych wymiarach jednej warstwy.
- EN: An experimental white-box method detects harmful execution states of multi-turn CLI agents from hidden representations and intervenes in ten selected dimensions of a single layer.

## In one sentence

- PL: Eksperymentalna metoda wykrywania niebezpiecznych stanów agenta terminalowego w aktywacjach modelu i korygowania ich podczas działania bez zmiany wag.
- EN: An experimental method that detects unsafe states of a terminal agent in model activations and corrects them at run time without changing the weights.

## Problem it solves

- PL: Zewnętrzne zabezpieczenia oceniają tekst lub komendy agenta, lecz nie sterują bezpośrednio jego zmieniającym się stanem wewnętrznym podczas wieloetapowego wykonania.
- EN: External safeguards judge agent text or commands but do not directly steer its evolving internal state during multi-step execution.

## What it does

- PL: Liniowa sonda sprawdza ukryty stan po każdym kroku; gdy wykryje ryzyko, metoda modyfikuje wybrane wymiary aktywacji w kierunku ograniczającym szkodliwe działanie.
- EN: A linear probe checks the hidden state after each step; when it detects risk, the method modifies selected activation dimensions in a direction that suppresses harmful action.

## Everyday example

- PL: W eksperymencie agent CLI przygotowuje szkodliwe polecenie; sonda rozpoznaje ryzykowny stan przed wygenerowaniem kolejnej akcji i uruchamia sterowanie aktywacjami.
- EN: In an experiment, a CLI agent is preparing a harmful command; the probe identifies the risky state before the next action is generated and triggers activation steering.

## This concerns you if you…

- PL: agent wykonuje wielokrokowe działania w terminalu
- PL: chcesz kontrolować bezpieczeństwo z wnętrza modelu
- EN: agent performs multi-step terminal actions
- EN: want to control safety from inside the model

## Keywords

mechanistic steering · subspace intervention · agent safety · hidden state monitoring · CLI agents · MAS benchmark

## How it works

- PL: Liniowa sonda odczytuje reprezentację ostatniego tokenu bieżącego kroku. Po wykryciu szkody wybiera się 10 wymiarów o największej różnicy wag sondy i modyfikuje te wymiary dla wszystkich tokenów w jednej warstwie. Siłę interwencji dobiera zewnętrzny sędzia LLM, równoważąc bezpieczeństwo i użyteczność.
- EN: A linear probe reads the last-token representation at the current step. When harm is detected, the ten dimensions with the largest probe-weight differences are selected and modified for every token at one layer. An external LLM judge chooses the intervention strength, balancing safety and utility.

## Limits

- PL: Wyniki pochodzą z 194 zadań i trzech otwartych modeli 7–9B; detekcja ryzyka z wyprzedzeniem ma mały, niezrównoważony zbiór testowy. Silne sterowanie może powodować powtórzenia lub ucięcie odpowiedzi, a dobór siły przez zewnętrzny LLM zwiększa koszt i opóźnienie. Autorzy nie traktują metody jako samodzielnego zabezpieczenia produkcyjnego.
- EN: Results come from 194 tasks and three open 7–9B models; lookahead detection has a small, imbalanced test set. Strong steering can cause repetition or truncated output, while an external LLM selecting the strength adds cost and latency. The authors do not present it as a standalone production safeguard.

## Key terms

- PL: **podprzestrzeń mechanistyczna**: Niskowymiarowy kierunek w aktywacjach odpowiadający za konkretne zachowanie.
- PL: **sterowanie aktywacjami**: Modyfikacja ukrytych stanów modelu w czasie działania bez zmiany wag.
- EN: **mechanistic subspace**: A low-dimensional direction in activations corresponding to specific behaviour.
- EN: **activation steering**: Modifying a model's hidden states at runtime without changing weights.

## Know first

- [Sterowanie aktywacjami (wektory sterujące) (Activation steering and representation engineering)](https://aiatlasgraph.com/t/activationsteering.md)

## Related topics

Untyped, symmetric "see also" links.

- [Interpretowalność mechanistyczna (Mechanistic interpretability)](https://aiatlasgraph.com/t/mechinterp.md)
- [Monitor interwencji krokowej dla agentów (Step-level timely intervention monitors for agents)](https://aiatlasgraph.com/t/stepsafe.md)
- [Sterowanie aktywacjami (wektory sterujące) (Activation steering and representation engineering)](https://aiatlasgraph.com/t/activationsteering.md)

## Sources

- [Agent MechSuits: Mechanistic Subspace Safety Steering for Multi-Turn CLI Agents](<https://arxiv.org/abs/2606.22673>) `mechsuits-arxiv-2026` · by Weidi Luo, Qiming Zhang, Yihao Quan, Mingyu Jin, Jie Cai, Chaowei Xiao, Jingcheng Niu, Zhen Xiang

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/mechsuits · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
