From 521390f8cec8ada543f00f7177239ce4f73a7c2e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 3 Dec 2026 17:19:56 +0100 Subject: [PATCH] Start interactive sessions with permissions bypassed instead of auto mode --- README.md | 2 +- docs/decisions.md | 6 ++++-- settings.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 46eeaa11..97db7da2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Me, and anyone who installs a release and runs it, on their own machines or on t ## Install -Take this checkout only onto a machine that is a sandbox with no direct access to a production environment, such as a dedicated VM: `settings.json` runs Claude Code in auto mode with the dangerous-mode prompt skipped. +Take this checkout only onto a machine that is a sandbox with no direct access to a production environment, such as a dedicated VM: `settings.json` runs Claude Code with permissions bypassed and the dangerous-mode prompt skipped. This release still installs into `~/.claude`, which goals 2 and 3 work to end. diff --git a/docs/decisions.md b/docs/decisions.md index 657a6943..fee391b5 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -7,7 +7,7 @@ Each project principle states one rule that the decisions below apply; their ent 3. **Each file has one writer.** `~/.claude/loop-claude-models.json` is written only by `save_model`, which the entry points, build-release and do-epic, both call. `~/.claude.json` is Claude Code's, and `~/.claude` moves only through `deploy-release`. The exception is `~/.claude/settings.json`, which Claude Code writes from any session. Git's clean filter `bin/settings_filter.py` keeps each machine's model and Claude Code's key order out of every commit, and `README.md` → "Update" carries its other changes into this repo. 4. **A rule a program can check is enforced by a program, and reviewers rule on the rest.** rule-hook and its overrides, `docker-run-memory`, the refused writes of reviewers under `agents/`, and CI with `main`'s branch protection apply it. 5. **A chunk can't vouch for itself.** What a chunk writes is approved by a review pass, by the human, or by a precedent the repo held before the chunk began. So an unanswered ask leaves the PR unmerged, the human approves the premises chunk and runs `deploy-release --cut`, and the judge holds a chunk open while an answer the human typed isn't recorded anywhere. -6. **An unattended run never waits on a prompt, and a lasting failure stops it.** Every claude build-release starts bypasses permissions inside its sandbox, each claude it opens on a terminal has `CLAUDE_CODE_SANDBOXED` set, and interactive sessions run in auto mode with the dangerous-mode prompt skipped. A failed archive stops the loop, while a `claude` that cannot start, as during an update, is retried. +6. **An unattended run never waits on a prompt, and a lasting failure stops it.** Every claude build-release starts bypasses permissions inside its sandbox, each claude it opens on a terminal has `CLAUDE_CODE_SANDBOXED` set, and interactive sessions bypass permissions with the dangerous-mode prompt skipped. A failed archive stops the loop, while a `claude` that cannot start, as during an update, is retried. 7. **One word names one thing, and one rule has one home.** In `bin/`, an outcome is an entry of a `.outcomes.md` file in build-release's archive, a record is a document tools or people keep entries in, and a place is what a comprehension seat names. `CLAUDE.md` holds only the rules no path can scope, and each `rules/` file loads by its `paths:`. # Decisions no project principle covers @@ -830,10 +830,12 @@ Claude Code's user-level rules tie this repo to Claude Code, which "Prefer the v Valid while Claude Code loads `~/.claude/rules/*.md` in every project, a path-scoped one when a session reads, writes or edits a matching file, or reads one with a single-file Bash command such as `cat`, and after a write only once the write is done. On 2026-10-13 a smoke test confirmed both triggers: a rule in `~/.claude/rules/` with `paths: ["**/smoke-target.txt"]` held a secret word. `claude -p` in a project under `/tmp` printed the word after reading the target with the Read tool, and after creating it with the Write tool. A control run that opened no file printed none. Per the docs, a path-scoped rule leaves the context at compaction and returns at the next matching read. -## settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped +## settings.json: Claude Code bypasses permissions with the dangerous-mode prompt skipped 2026-10-04, lilleman, answering the principles audit of PR #215. Serves goal 1: this setup is meant to run in a sandbox and to work autonomously, so tool access is granted by the sandbox, as "Always grant explicit access to data" in `principles/technical-principles.md` asks. Valid while every machine taking this checkout is such a sandbox. +2026-12-03, lilleman. Interactive sessions now start in `bypassPermissions` instead of auto mode: auto mode still asked for permission too often for a sandbox, where the sandbox, not the prompt, grants access. Valid while every machine taking this checkout is such a sandbox. + ## settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit 2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over one synced in `env.ANTHROPIC_MODEL`, which would override a `/model` pick from the next session on. A model per machine is simpler, and build-release picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. The cost: a move or pull that changes `settings.json` drops the machine's model. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on the effort `settings.json` gives every interactive session. Valid while Claude Code writes the model it picks into `settings.json`. diff --git a/settings.json b/settings.json index 2159d926..7a153e34 100644 --- a/settings.json +++ b/settings.json @@ -59,7 +59,7 @@ "~/.local/state/larv-review", "~/code" ], - "defaultMode": "auto" + "defaultMode": "bypassPermissions" }, "skipDangerousModePermissionPrompt": true, "skipWorkflowUsageWarning": true,