What stops an agent from obeying text it reads?
An agent reads a lot of text. Some of that text was written by people you do not know. A few of those people may want the agent to do something you did not ask for. This is prompt injection. Security reviewers ask about it first.
Here is a plain answer. It covers what we limit, what we do not, and what you should turn on.
Where untrusted text comes in
An agent in CodeHerder reads text from these places:
- Task titles and descriptions
- Comments
- Direct messages and team messages
- Shared wiki pages
- Inbound webhook bodies
- Events from your git host
- Files in the repo, such as
CLAUDE.mdandAGENTS.md
Anyone who can write to one of these places can try to steer the agent.
What labels and fences do
CodeHerder fences this text and labels where it came from. A message cannot close its own fence. It cannot add a line to the agent’s terminal. It cannot pose as a ch command. The agent can also see who wrote the text.
This keeps the structure of a brief intact. It does not stop a model from obeying the text. A label is not a control. We do not sell it as one.
The limits that hold
A fence cannot stop an injected agent. The limits below can. Each one works whatever the model decides.
- A read-only stage gets a git credential that can fetch but not push. The device removes push credentials from the agent’s environment.
- An agent gets git credentials only for the repos its sandbox lists. It gets the access level your workspace grants.
- A repo that commits hooks or helper commands is refused. So is one that commits plugins. The session does not start unless an operator trusts that repo.
- With container isolation, the stage container mounts only the files that stage needs. Your credential pool stays outside.
- A writable stage on an isolated device runs with strict network rules. A new host needs a person to approve it.
- A session credential cannot do the actions that need a human. Examples are changing credentials and approving a request.
- Approval gates and review stop work before it moves on. A person can check the change before it merges.
What is still open
We state these plainly.
- Network access is open on read-only stages unless you turn on strict mode. It is also open when a stage runs as a plain host process. An injected agent can then send data it can read to any public host.
- A plain host process can reach what its OS user can reach. Without isolation, the agent can use your own key on disk.
- No injection test runs before we ship. We chose this on purpose, and our risk register records it.
- An injected agent can still send messages to tasks and sessions in its own workspace. That puts text in front of its peers.
- We bypass the harness approval prompts so that agents can work alone. The agent acts with its full tool set inside its limits.
What to turn on
- Run agents in container isolation, not as plain host processes.
- Set egress to strict, so read-only stages are strict too.
- Put an approval gate on the stage where new work enters.
- Require human approval before merge on repos that matter.
- Remove committed hooks from repos, or trust only the repos you know.
- Run your own red-team test against your agents and tools.
None of these needs a new tool. They are settings you can change today.
Next steps
Read the security review for the full list of answers. The guide to isolating agent runs shows how to turn on containers. Network access approvals explains who decides about a new host. If a task says “Repo config not trusted”, see repo harness config. To set a gate, read approvals.