Customize sessions in self-hosted environments changedself-hosted-environments-configuration
Nearest release: v2.1.335, published 5 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 3 Dec 2026 03:26 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 03:37 UTC.
Upstream edited
Recorded here
Lines+8added
Lines−3removed
From line
215
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits61to this page, all time
The whole hunk
from line 215, old and new numbered
/
from line 215
215215
216216* `completed`: the session ended cleanly. The Claude Code process exited normally, or exited by itself after the session was archived or deleted.
217217* `failed`: the Claude Code process crashed, or setup failed after it started.
218* `interrupted`: the runner stopped the session, in one of these cases:
218* `interrupted`: the session was stopped or taken off this runner, for example:
219219 * The runner released the session to free the slot.
220220 * The session timed out at startup.
221221 * The server moved the session off this runner.
from line 836
836836
837837## Permissions and tool approval
838838
839A self-hosted session has no terminal attached, so an unanswered permission prompt stalls the turn until the user responds in the UI. Anthropic's control plane sends each session's tool list and permission rules with the work payload; the default configuration pre-approves routine tool calls, including `Bash`, and cloud sessions [pre-approve file edits regardless of mode](https://code.claude.com/docs/en/permission-modes.md#switch-permission-modes). A call that nothing pre-approves prompts through the session UI.
839A self-hosted session has no terminal attached, so an unanswered permission prompt stalls the turn until the user responds in the UI.
840840
841Anthropic's control plane sends each session's tool list and permission rules with the work payload. The default configuration pre-approves routine tool calls, including `Bash`. In Accept edits mode, Claude can also [make most file edits](https://code.claude.com/docs/en/permission-modes.md#switch-permission-modes) in most cloud sessions without asking. A call that nothing pre-approves prompts through the session UI.
842
841843### Pin a permission mode from your wrapper
842844
843845> [!NOTE]
from line 928
926928
927929Don't put a bare `"Edit"`, `"Write"`, or `"NotebookEdit"` entry in a repository-committed `permissions.allow`. A bare file-tool rule matches the tool regardless of path, granting writes anywhere on the host rather than only the workspace, so the runner's write-scope confine guard flags the session; with [`--confine-repo-settings enforce`](https://code.claude.com/docs/en/self-hosted-environments-reference#runner-cli-flags) it refuses to spawn the session instead of logging and continuing. See the [hardening section](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#harden-your-deployment).
928930
929A repository needs no file-tool rule at all: cloud sessions [pre-approve file edits regardless of mode](https://code.claude.com/docs/en/permission-modes.md#switch-permission-modes). If you do commit a rule, scope it to the workspace, such as `"Edit(/**)"`; a single leading slash is relative to the project root, which is the session's workspace. Bare file-tool rules are fine in the operator's host-level `settings.json`, since that file isn't repository-committed.
931How you write a file-tool rule depends on which settings file holds it:
932
933* **Repository-committed settings**: scope the rule to the workspace, such as `"Edit(/**)"`. A single leading slash is relative to the project root.
934* **`settings.json` on the runner host**: you can use a bare file-tool rule.
930935
931936A `defaultMode` of `auto` is only honored from the image-wide or user-level settings file, so a checked-out repository can't grant itself auto mode. For which modes cloud sessions accept and the full rule syntax, see [permission modes](https://code.claude.com/docs/en/permission-modes.md).
932937
No line in this hunk matches that.