Skip to content

Box writes its own messages to stderr in one format, and most messages carry a code that names their kind. This page explains each code and what to do when you see it. With the box CLI, box explain <code> prints a code’s row from this page.

Each message starts with a line in this form:

<source>: <severity>[<code>]: <text>

For example:

policy: warning[P0201]: dogwood evaluation failed: <reason>; denying
PartIn the exampleMeaning
SourcepolicyThe part of Box that wrote the message.
SeveritywarningHow serious the message is.
CodeP0201The kind of message. Each code has one row on this page.
Textdogwood evaluation failed: <reason>; denyingWhat happened, with the details of this case.

A message has one of five sources:

  • strands-box: the box’s trusted process.
  • policy: the policy engine.
  • telemetry: the telemetry collector.
  • strands-box-sock-alias: the alias that every interpreter and MCP program in the box runs.
  • strands-box-contain-trampoline: the helper that applies a sandbox and then starts its program.

The alias runs inside the box and writes to the agent’s own stderr, so the agent reads its messages. The trampoline and the sandbox supervisors it starts write before or beside the agent’s program.

Each code always names the same source, whichever part of Box prints it, and the first letter of the code tells you which: P is policy, T is telemetry, B is strands-box, and H is the alias or the trampoline. A line whose code and source do not match was not written by Box.

A message has one of three severities:

  • error: something failed, and the run, or the request the message names, did not go ahead.
  • warning: something went wrong, and the run goes on.
  • note: a statement the operator should see, such as a startup disclosure.

A line that starts with a space or a tab belongs to the message above it:

strands-box: note[B0201]: [tool.check] interpreter aliases for configured access:
alias /bin/sh -> /usr/bin/dash (interpreter spelling)

A message with no code, such as strands-box: error: <text>, reports an internal failure of Box. Nothing on this page explains it. Report it as a bug, with the full stderr of the run.

A line in no other form, such as a line that a workload prints, is not a Box message.

A coded line does not prove that Box wrote it

Section titled “A coded line does not prove that Box wrote it”

The format is a convention on a shared stream. It is not an authenticated channel. The processes that the box starts, such as MCP servers and tools, write to the same stderr as the box, and any of them can print a line that looks like a coded Box message. Do not treat a coded line as proof that Box wrote it.

The decision log is the record of what the box decided. See Telemetry.

The box prints these warnings when it loads a policy, and then it starts.

CodeSeverityMeaningWhat to do
P0101warningA like pattern names the operator’s home after a wildcard, so the load cannot judge what it reaches.Spell a path under the operator’s home as ~/.... See address spellings that refuse to load.
P0102warningA program literal holds a path separator, so it matches only that spelling of the program.Compare context.input.program_path to match the resolved binary. See address spellings that refuse to load.
P0103warningA permit’s temporal clause sits beside another permit for the same principal and action, so its budget may never apply.Write the cap as a forbid. See a cap written as a permit.

The box denies the request that each of these messages names, and the run goes on.

CodeSeverityMeaningWhat to do
P0201warningA rule errored while it decided a request, so the request was denied.Read the reason in the text, and correct the rule. The agent receives the denial because the request could not be evaluated., as how a denial reads describes.
P0202warningPolicy could not check a request, so it was denied as an internal fault.When the text starts with durable timestamp or an earlier outcome is not recorded yet, correct the system clock, as a reused box whose history and record disagree describes. Otherwise, report it as a bug with the full stderr of the run.
CodeSeverityMeaningWhat to do
P0301warningOutcomes that later decisions depend on were not recorded in the policy history.A rule that counts or reads earlier outcomes does not see these. See history persistence and process crashes.
P0302warningThe policy history was not written to disk when it was due.Check the disk that holds the box directory. Events that were not written can be lost if the run stops, as history persistence and process crashes describes.
P0303errorThe policy history could not be written to disk, so the box stopped.Free disk space under the box directory, then run the box again. See history persistence and process crashes.
CodeSeverityMeaningWhat to do
T0101warningTelemetry records were lost before they reached a target.The count is exports, not records, and the run’s exit code does not change. See errors and exit codes.
T0102warningOne export of telemetry records to a target failed.Read the cause in the text, and check the target’s destination and credential. See failed sends.
T0103errorA telemetry target could not be opened, so the box did not start.Correct the [telemetry.<label>] table that the text names. See errors and exit codes.

Each of these stops the box, almost always before the workload starts. strands-box exits with status 1.

CodeSeverityMeaningWhat to do
B0101errorThe configuration is not valid, so the box did not start.Correct the box.toml key that the text names. See errors.
B0102errorA filesystem grant is refused, so the box did not start.Correct the entry that the text names. See what is refused.
B0103errorThe policy could not be read, checked, or installed, so the box did not start.Correct the policy. See troubleshooting load failures.
B0104errorA credential or secret source could not be set up, so the box did not start.Read the line before it for the reason. See how a run reads the secrets and egress errors.
B0105errorThe box directory holds another box, a newer record, or history that disagrees with its record.Remove the box directory to start again, or name a new box_dir. See a reused box whose history and record disagree and if something goes wrong.
B0106errorThe box is already running, or this process already ran a box.Stop the other run of this box, or give this box its own box_dir.
B0107errorA program the box needs is missing from its installation, or cannot be trusted.Keep all of the Box executables from one build together. See Linux requirements, macOS requirements, and installation integrity.
B0108errorThis host cannot harden the box’s process or build its sandboxes, so the box did not start.See operating system and container permissions on Linux, and macOS requirements.
B0109errorA declared MCP server could not be prepared, so the box did not start.Read the step that the text names. See MCP errors and exit codes.
B0110errorThe egress gateway or its relay failed, so the box did not start or stopped.Report it as a bug with the full stderr of the run.
B0111errorThe socket the box’s interpreters reach could not be served.Report it as a bug with the full stderr of the run.
B0112errorThe library caller’s on_ready callback returned an error, so the box did not start its workload.Read the callback’s error in the text; it comes from the program that runs the box, not from Box.
B0113errorA secret source program failed to read a secret, so the box did not start.Sign in to the vault or correct the reference, then run the box again. The line names the entry and the program’s own error. See how a run reads the secrets.

The box prints these before the workload starts. A note needs no action when the reach it describes is what you intended.

CodeSeverityMeaningWhat to do
B0201noteA process reaches these paths directly, with no policy decision.Check each path. Remove an entry from the filesystem lists if the process must not reach it. See [agent.filesystem] and [tool.<name>.filesystem].
B0202noteA process’s filesystem grant reaches a credential store.Remove the grant unless the process needs that store. See [agent.filesystem] and [tool.<name>.filesystem].
B0203noteA secret source runs a host program outside every sandbox, or skips a path it protects.See how a run reads the secrets and what Box protects.
B0204noteThe egress gateway also trusts root certificates from this host’s trust store.See networks that re-sign TLS.
B0205warningThe host’s trust store could not be read, so the gateway trusts only its own roots.A server whose certificate chains to a root on this host fails its TLS handshake. See networks that re-sign TLS.
B0206noteFile watching may disclose names and event metadata outside the process’s grants.Remove file-watching = true if denied names must stay confidential. See file watching.
B0207noteA tool’s program is not installed, so the box left the tool out of this run.Install the program, or build it, before run. See a tool whose program is not installed.
B0208noteHow a bare program name in the Shell resolves differs from what a table suggests.See a grammar action replaces shell:spawn, monty, and PATH.
B0209noteA telemetry target receives each MCP tool call’s arguments and output in clear text.Remove mcp_tool_calls from the target’s include unless it must receive them. See a tool call.
B0210noteA process connects to the network directly, with no egress gateway, no network policy decision, and no credential injection.Set contain_egress = false only for a program whose client cannot use a proxy. See Network.
B0211noteBox gives a process with native egress no proxy and no certificate authority, so its client uses its own defaults.No action when the program trusts its own roots. See Network.
B0212warningA process’s write grant reaches the program it runs, so the process can replace that program.Move the program out of the writable grant, or narrow the grant. See what is refused.
B0213noteThe policy runs in log-only mode, so each denial is recorded and the action goes ahead.Use log-only mode only to trial a policy where it is acceptable that the policy protects nothing. See log-only mode.
B0214warningA credsd route names no secret.type, so it signs with AWS credentials.Set secret.type = "aws", or "token" for a token. A later release requires the key. See credential sources.
CodeSeverityMeaningWhat to do
B0301noteThe box was created, opened, or refreshed.No action.
B0302noteThe box starts its workload.No action.
CodeSeverityMeaningWhat to do
B0401warningA server’s tool catalog could not be read, so its calls are decided without per-tool actions.Read the reason in the text. See when a rule cannot load.
B0402warningA server’s per-tool policy rules did not load, so they decide none of its calls.Check the rule’s tool and argument names against the server’s catalog. See when a rule cannot load and which rules Box can refuse for.
B0403warningA tool’s schema could not be read, so Box left the tool out of its server’s catalog and refuses its calls.The server’s other tools work. A rule that names the tool does not load. See find the tool and argument names.
CodeSeverityMeaningWhat to do
B0501warningA request through the egress gateway to an upstream failed.Read the reason in the text. See egress errors and exit codes.
B0502warningA Monty fetch was refused because no egress route reaches it.The script’s Python has no network in this box, and the request was not sent. See fetch().
B0503warningA Monty fetch was refused before it was sent: its URL names a private or local address, or a scheme Box does not fetch.The request was not sent. See the OSError: access denied row in fetch().
CodeSeverityMeaningWhat to do
B0602warningA credential capability reported a condition that does not stop the run.Read the condition in the text. For a bare aws:// route, name a profile as aws://PROFILE. See credential sources.
CodeSeverityMeaningWhat to do
B0701noteA host listener is relayed to a port of the agent.No action. See [[agent.ingress]].
B0702warningAccepting a caller on a host listener failed, and the relay retries.Read the reason in the text. See [[agent.ingress]].
B0703warningThe agent’s port did not answer a relayed caller.Make the agent listen on its workload_port on 127.0.0.1 or 0.0.0.0. See [[agent.ingress]].
B0704errorAn ingress listener could not be bound or relayed, so the box did not start or stopped.Free the host address, or stop the process that already listens on the agent’s port. See [[agent.ingress]].

These apply only when native filesystem policy is on. See experimental native filesystem policy.

CodeSeverityMeaningWhat to do
B0801noteThis host’s kernel limits what native filesystem policy can intercept.See Linux ARM64.
B0802warningNative filesystem policy refused a request it cannot decide.The workload received a permission error. See Linux ARM64 for the requests it refuses.
B0803warningA native filesystem request was denied because deciding it failed.Read the reason in the text. See macOS.
B0804noteNative filesystem enforcement is ready.No action.
CodeSeverityMeaningWhat to do
B1001warningPart of the box’s shutdown failed.Read the part that the text names. A failed final history flush can lose pending history, as history persistence and process crashes describes.
B1002warningBox held its messages while the workload drew on the terminal, and discarded those past its limit.Run the box with stderr sent to a file or a pipe to read every message as it is written.
B1003errorNative filesystem policy failed after the workload started, or did not stop cleanly, so the box stopped.The workload ran. Read the reason in the text. See experimental native filesystem policy. If it repeats, report it with the full stderr of the run.
CodeSeverityMeaningWhat to do
B1101warningThe broker rejected a client of its socket.Read the reason in the text. If it repeats, report it with the full stderr of the run.
B1102warningServing a client of the broker’s socket failed.Read the reason in the text. If it repeats, report it with the full stderr of the run.

Box writes these into the stderr of the command the agent ran, so the agent reads them as that command’s output.

CodeSeverityMeaningWhat to do
B1201warningA command’s stdin was longer than the limit, so the command received only the first part.Pass less input, or raise shell.max_stdin. See [limits].
B1202errorA command could not start in the directory it named.Nothing ran. See exit statuses.
B1203errorA call’s deadline is past this platform’s clock range, so the call did not run.Reduce limits.shell.timeout. See exit statuses.

The alias prints these on the agent’s stderr when the box refuses a call.

CodeSeverityMeaningWhat to do
H0101errorThe alias and the box speak different protocol versions.Install the alias and strands-box from the same build. See Linux requirements.
H0102errorThe box refused a malformed frame from the alias.Report it as a bug with the full stderr of the run.
H0103errorA call exceeded a size or output budget, such as the stdin limit.Send less input or output, or raise the limit in [limits]. See standard input.
H0104errorA call was refused because the program was busy or its input was not read in time.Retry the call.
H0105errorA call outlived its deadline.Shorten the command, or raise shell.timeout. See limits.shell.timeout.
H0106errorThe box refused the call for a reason the text names, such as an undeclared MCP command or a program that failed to start.Read the reason in the text; it names what to change, such as a missing [mcp.<name>] table or limits.shell.timeout.
CodeSeverityMeaningWhat to do
H0201errorThe alias could not read its input.The alias stopped the command and exited with status 125. See standard input.
H0202errorThe alias could not start or reach the box.Check that the box is still running. If it is, report it with the full stderr of the run.
H0203errorThe alias was run with arguments, input, or a working directory it cannot use.Change how the command is run, as the text says: for example pass one script or -c, or set PWD. See exit statuses.
CodeSeverityMeaningWhat to do
H0301errorNo ordinary program by that name is on the agent’s PATH.The alias exits with status 127. On Linux, a missing grant can hide a program. See MCP errors and exit codes and PATH.
H0302errorThe ordinary program could not be run.The alias exits with status 126. A script needs a #! line and a visible interpreter. See MCP errors and exit codes.
CodeSeverityMeaningWhat to do
H0401errorApplying a sandbox failed before its program started.Read the stage in the text. See check sandbox startup on Linux, and check sandbox startup and the workload on macOS.
H0402warningA sandbox’s configuration carries a limit the operator should know.When a path is both writable and executable, remove the write, because the workload can replace a program it runs. See what is refused.

The trampoline starts these on Linux, so their messages name it as their source.

CodeSeverityMeaningWhat to do
H0501errorThe namespace reaper failed, so it stopped the sandbox.Report it as a bug with the full stderr of the run.
H0502errorThe filesystem query supervisor failed.Report it as a bug with the full stderr of the run.