Start sessions with --dangerously-skip-permissions

Unattended sessions otherwise stop at every tool approval until someone
answers through Remote Control. The limits that make this acceptable (bot
token scoped to allowlisted repos, branch protection, nothing production on
the box) are written down in the README's security model, along with the
remaining risk of prompt injection.

The one-time bypass-mode warning would block an unattended session. It's
suppressed by skipDangerousModePermissionPrompt in ~/.claude/settings.json,
and if it ever shows anyway, status now reports it as needs_attention, the
same way as the folder-trust prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyWXJ3BVzrZ9VWk5c2CoAr
This commit is contained in:
agent 2026-09-30 16:12:46 +00:00
parent b55ea07c96
commit ece7458a55
3 changed files with 34 additions and 6 deletions

View file

@ -59,6 +59,20 @@ from="<IP of reudy.net>",restrict,command="…/sessions-ctl --remote" ssh-ed2551
capabilities dropped, published only on `127.0.0.1`.
- Every remote call is logged on the dev box: `journalctl -t sessions-ctl`.
**No permission prompts:** sessions run with `--dangerously-skip-permissions`,
so Claude acts without asking for approval: shell commands, file edits, git
pushes. That's acceptable only because of where the limits already are. The
git token is a bot limited to allowlisted repos, and branch protection makes an
unmerged PR the worst case. Nothing production lives on the box, and
instructions only arrive through Remote Control (your claude.ai account). The
remaining risk is prompt injection: a fetched page or a malicious repo file can
steer a session into running commands without anyone confirming them. Only
allowlist repos you trust, and treat the dev box as disposable.
The one-time "Bypass Permissions mode" warning would block an unattended
session. `"skipDangerousModePermissionPrompt": true` in `~/.claude/settings.json`
suppresses it. Without that setting the page shows *"stuck on the
bypass-permissions warning"*.
**Folder trust:** Claude Code asks "do you trust this folder?" on first launch
in a new directory, which would block an unattended session. There is no CLI
flag for that in interactive mode, so `sessions-ctl` records the trust in
@ -74,9 +88,10 @@ Claude Code field. If a Claude Code update breaks it, the session shows
fixed conversation UUID) and runs `systemctl --user enable --now
claude-session@NAME`.
- The unit starts a **dedicated tmux server** (`tmux -L claude-NAME`) running
`claude --remote-control dev-box-NAME`. The first launch uses `--session-id
<uuid>` and later launches use `--resume <uuid>`, so a restart continues the
same conversation and keeps the same Remote Control link.
`claude --dangerously-skip-permissions --remote-control dev-box-NAME`. The
first launch uses `--session-id <uuid>` and later launches use `--resume
<uuid>`, so a restart continues the same conversation and keeps the same
Remote Control link.
- **Crash:** `Restart=always`, 10 s delay, at most 5 restarts in 10 min.
- **Reboot:** enabled units start with the user manager, because `agent` has
linger on.
@ -164,6 +179,7 @@ sessions.reudy.net {
| "Host key verification failed" | The dev box's host key changed. Check that the change is expected, then update `SESSIONS_DEV_HOST_KEY`. Never turn off checking |
| Session `failed` | `journalctl --user -u claude-session@NAME -n 50`. After 5 crashes in 10 min systemd gives up; fix the cause, then Start again |
| "stuck on the folder-trust prompt" | `tmux -L claude-NAME attach`, accept, detach. Then the trust field has moved in a Claude Code update, so fix `trust_workspace()` |
| "stuck on the bypass-permissions warning" | Add `"skipDangerousModePermissionPrompt": true` to `~/.claude/settings.json`, then `tmux -L claude-NAME attach`, accept, detach |
| No "Open in Claude" link | The link is read from the pane once Remote Control is up; refresh after a few seconds |
## Relation to `sess`