Sessionboxer

A corrupt settings.json turned off OpenHands' confirmation mode without a word. What happened, how to check your server, and what to do until the fix ships

An unreadable settings.json made the OpenHands Agent Server drop confirmation mode for every new conversation. How to check yours and what to do now.

A Sessionboxer session where the agent's Read, Execute and screenshot steps are all marked completed, next to the box's desktop showing the page it opened in Firefox

You run the OpenHands Agent Server on your own machine, and you turned on confirmation mode so the agent stops and waits for you before a risky command. One bad file can switch that off. The server keeps running, the settings it reports are the defaults, and every new conversation runs its commands without asking. A fix merged on November 30, 2026, and no release has it yet.

The bug is tracked as CVE-2026-138167, published on November 29. This post explains what went wrong, how to check a server you run, and what to do while the fix is not yet in a release. We make Sessionboxer, a different tool for running coding agents, and the last section says how it handles the same question. It is short.

What went wrong

The report is issue #6370 in the software-agent-sdk repository, filed on November 2 and confirmed on v1.59.0. The Agent Server keeps its settings in a settings.json file, and confirmation_mode is one of them.

The function that reads the file, FileSettingsStore.load(), returned nothing in four different cases: the file does not exist, the JSON is cut off, the content fails validation, or a secret in it cannot be decrypted with the current key. The code that builds a conversation then wrote load() or PersistedSettings(). In plain words: if the read gave nothing, use the defaults. The default for confirmation_mode is false, and that maps to the policy NeverConfirm, which never asks.

So a file that was missing on a first run and a file that was broken were treated the same way. A server set up to ask before risky actions behaved like a server that had never been told to ask.

The issue lists ordinary ways to end up with a broken file. None of them need an attacker:

  • A write that stops halfway, or a hand edit with a typo.
  • A file written by a newer OpenHands build with a schema the running one does not accept.
  • A null rendered by a configuration management template.
  • A backup restored from another instance.
  • A change of OH_SECRET_KEY, which leaves the stored secrets impossible to decrypt.

The last one is easy to hit. The Agent Server docs say OH_SECRET_KEY encrypts stored secrets and tell you to keep it stable across restarts. Rotate it, or start the server once without it, and the file becomes unreadable.

Why it stayed off

Three details made this worse than a one-off.

It applied to every conversation created after the file went bad, not to a single run. The only sign was one log line, Settings file is corrupted. And the state did not repair itself: the update() path refuses to overwrite a file it cannot parse, so saving settings in the UI did not fix it. The issue calls this sticky, and it stays that way until someone repairs the file by hand.

The issue also names where the defaults were used. GET /api/settings, which the web UI reads confirmation_mode from, returned the defaults. The OpenAI-compatible gateway built its policy from the same expression on the server side. The agent profile and meta profile reads did too.

The CVE record scores it 5.3 on CVSS 3.1 and 1.9 on CVSS 4.0, with a local attack vector. That fits an attacker who needs to damage a file on your server. It understates the accident case, where nobody attacks anything and the approvals you counted on are simply gone.

The fix, and which release has it

Pull request #6435 merged on November 30 at 13:40 UTC. It adds a stricter read, load_existing(), that returns nothing only when the file is absent and raises an error with a reason (parse, validation or decryption) otherwise. The settings route, the gateway and the profile reads now use it and answer 409 with Settings file is corrupted or encrypted with a different key. The old lenient load() stays for callers that do not decide security settings. The PR notes two reads it left as they were, GET /api/profiles and one in the Docker runtime router, as outside the issue's scope.

The timing matters. v1.65.0 came out on November 29, the day before the merge, and the fix is not in it. When we checked on December 1, 1.65.0 was the newest openhands-agent-server on PyPI. The CVE record lists 1.64.0 and 1.64.1, but the issue reproduced the bug on 1.59.0 and the fix landed after 1.65.0, so treat every release up to and including 1.65.0 as affected. Update when the next release appears and its notes include #6435.

How to check a server you run

First, ask the server what it thinks the setting is. Use your session API key and the port your Agent Server listens on:

curl -s -H "X-Session-API-Key: $OH_SESSION_API_KEYS_0" \
  http://127.0.0.1:PORT/api/settings | grep -o '"confirmation_mode":[a-z]*'

If you turned confirmation mode on and this prints false, the file is probably unreadable and the server is running on defaults. On a build with the fix, the same request returns 409 instead.

Second, search the server's log for Settings file is corrupted. If it is there, conversations started since then ran without approvals. Look at what they did, especially the shell commands.

Third, check that settings.json parses at all. It lives in the directory OH_PERSISTENCE_DIR points to:

python3 -m json.tool "$OH_PERSISTENCE_DIR/settings.json" > /dev/null && echo parses

A file that parses can still fail validation or decryption, so the first check is the one that counts.

What to do until the release

Keep OH_SECRET_KEY the same across restarts, as the docs say, and store it where your service manager will always pass it. If you restore a backup, restore it on a server that has the key it was written with.

Keep a copy of the last good settings.json, as the issue suggests. When the file breaks, you can put it back instead of re-entering every setting and secret.

Run the first check above after every upgrade, key change or restore, until you are on a release with the fix.

And think about what confirmation mode is protecting. It is a prompt in front of commands that run with the server's own permissions. If the agent runs on your host, a missing prompt means commands on your host. OpenHands can run each conversation in its own Docker container with OH_CONVERSATION_RUNTIME=docker, so a command that should have been stopped still runs in a container. Keep that one updated too: GHSA-h7m4-392w-vpjj, published on November 13, was a case where the OpenAI-compatible gateway started conversations outside the Docker sandbox. It is fixed in 1.61.0.

Our comparison of OpenHands and Sessionboxer goes through the OpenHands backends and where each one puts the agent.

How Sessionboxer handles this, and what it does not do

Sessionboxer has no confirmation mode, so there is no approval setting that can fail open. That cuts both ways. The agent runs with all permissions granted and never asks you about a command, by design.

What limits it is the box. Each session runs in its own Docker container with its own copy of the code, on a private Docker network that publishes no host ports. A bad command runs inside that container, not on your machine. You keep the Stop button, and every turn ends with a snapshot you can go back to. The Snapshots and forks chapter explains how to return to one.

The box does not review what the agent does. A command steered by a malicious README can still use anything that is inside the box: the repository, the agent's login for that session, and the network. Our post on running Claude Code with --dangerously-skip-permissions covers what to keep out of an agent's box when nothing asks first. If you run OpenHands with confirmation mode on, run the check above today.

Features mentioned

Keep reading