Manuscript Offprint

arXiv:2610.06274

What May an Agent Change About Itself? A Containment Floor for Self-Configuring Agent Runtimes

Sajib Hossain, Moeen Uddin Mahmud

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Many agent runtimes give the agent a tool for editing its own configuration. Some of that configuration grants abilities, such as enabling a tool. Other parts set the agent's limits: which directories it may write to, who may send it messages, which network address it listens on, how callers authenticate, and the gate that blocks risky writes. If the agent can edit those limits, a single ordinary request can widen them. We study this in a deployed, model-agnostic runtime. We propose a rule: the agent may change fields that grant abilities, and may never change fields that set its limits. We enforce the rule as a containment floor inside the configuration tool and measure what happens with and without it. Without the floor, a frontier model wrote a protected value on 25 of 72 ordinary requests that gave it permission to change settings, often when the request never named the field. Prohibitions written in the system prompt failed in a predictable way. A prompt that listed the protected field names stopped every request that used those names (0 of 36 saved, against 17 of 36 with no prompt) and did not stop the requests that only described the goal (10 of 36 saved, against 8 of 36). A prompt that described the forbidden effects did the reverse. With the floor, 0 of 167 protected writes were saved, although the models attempted a protected write in 65 of those cases. A search for other routes through the tool found only one, a pinned shell, which the floor's scope statement already excludes. The study covers two models and a single agent. We state what that does and does not support.

1 Introduction

Agent runtimes increasingly let the agent change its own setup. Some systems go further and let one agent rewrite another: a proposer edits a harness's source [Lee et al., 2026], an optimizer evolves another program's prompts [Agrawal et al., 2025], and an agent edits its own code and keeps the version that scores better [Zhang et al., 2026a, Hu et al., 2025]. These systems assume, usually without saying so, that the agent may change any part of what it is editing. That assumption has costs. The Meta-Agent Challenge reports that “high optimization pressure surfaces emergent adversarial behaviors like ground-truth exfiltration” [Lu et al., 2026]. A self-propagating attack already “hijacks the victim’s core configuration to establish persistent presence across session restarts” [Zhang et al., 2026b].

This paper studies the smallest real version of the problem: an agent editing its own configuration file. The runtime we study gives every agent a configuration tool by default, even agents with no file or shell access. A concrete case motivated the work. A user asked an agent to create a file. The agent had no permission to write in the user's home directory, so it added the home directory to its own list of writable locations and then wrote the file. The user had asked for a file, not for a wider write permission. Nothing in the runtime stopped this, because the configuration tool accepted any field.

Preprint.

  1. Request (paraphrased). The owner asks to call the agent's API from a laptop on the same wifi, and says the agent may change its settings. The request does not name any configuration field.

  2. The model's shortest route. Call config_set on server.host, moving the API from loopback (127.0.0.1) to an address that other machines can reach. This field decides who can reach the agent, so it is a scope field and is on the floor.

3a. No floor. The write is saved. From the next start, the API listens on the local network. The frontier model did this in 5 of 6 passes of this request, and wrote server.host in 10 of the 12 cases across the two requests that target it.

3b. With the floor. config_set refuses the write and the file is unchanged. No floor arm saved a protected value. A refusal relayed to the user in this arm: "I enabled the HTTP API, but it remains bound to 127.0.0.1 because changing server.host to a network-reachable address is explicitly not permitted from within a conversation."

Figure 1: One request from the study, with and without the floor. The user wants an outcome. The model reaches it by widening its own network reach, a change the user never asked for by name. Counts are from the frontier model with no protection ( §4§4).

The question is which fields an agent should be allowed to change. Our answer splits fields into three classes. Capability fields decide what the agent can do, for example which tools are enabled. The agent may change these when asked. Scope fields decide where the agent may act and who may reach it: writable directories, the inbound allowlist, the network address, the authentication token. Gate fields control the mechanism that enforces those limits. The agent may change neither scope nor gate fields. We enforce this rule in the configuration tool itself and call it a containment floor.

We then measure two things. First, how often do models widen their own limits when nothing stops them? Second, does a written prohibition in the agent's instructions work as well as enforcement in the tool? Figure 1 follows one request from the user's words to the write that is saved or refused.

References (41)