From 3f6fd3d36a07c1681f4a124bcad100dca59ec26a Mon Sep 17 00:00:00 2001 From: UXwolt Date: Mon, 13 Apr 2026 00:08:43 +0000 Subject: [PATCH] Centralize --dangerously-skip-permissions in wclaude wrapper Move the flag into wclaude so callers don't need to pass it. All wclaude callers (entrypoint, run-session, sessions.py, bashrc wolt() function, create-wolt skill, CLI) are now clean. Direct claude -p callers (hooks/run-session.sh, cron/digest.mjs) keep the flag since they bypass wclaude. Closes #253 Co-Authored-By: Claude Opus 4.6 --- container/bin/run-session.sh | 2 +- container/bin/wclaude | 2 +- container/entrypoint.sh | 4 ++-- container/entrypoint_setup.py | 4 ++-- container/lib/sessions.py | 4 ++-- container/skills/woltspace-create-wolt/SKILL.md | 2 +- woltspace | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/container/bin/run-session.sh b/container/bin/run-session.sh index d0b85e1..bc0161c 100755 --- a/container/bin/run-session.sh +++ b/container/bin/run-session.sh @@ -77,7 +77,7 @@ MODEL_FLAG="" if [ -n "$MODEL" ]; then MODEL_FLAG="--model $MODEL" fi -wclaude --dangerously-skip-permissions --session-id "$CLAUDE_SESSION_ID" --name "$SESSION_NAME" $MODEL_FLAG "$FULL_PROMPT" || EXIT_CODE=$? +wclaude --session-id "$CLAUDE_SESSION_ID" --name "$SESSION_NAME" $MODEL_FLAG "$FULL_PROMPT" || EXIT_CODE=$? # Update registry with final status $SESSION_REG finish "$SESSION_NAME" "$EXIT_CODE" > /dev/null 2>&1 || true diff --git a/container/bin/wclaude b/container/bin/wclaude index d0a63c9..c082e5c 100755 --- a/container/bin/wclaude +++ b/container/bin/wclaude @@ -19,4 +19,4 @@ if [ -n "$WOLT_HOME" ] && [ -d "$WOLT_HOME/.claude" ]; then fi trust-dir "$(pwd)" 2>/dev/null -exec claude "$@" +exec claude --dangerously-skip-permissions "$@" diff --git a/container/entrypoint.sh b/container/entrypoint.sh index 8daba4e..c4ac783 100755 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -44,10 +44,10 @@ data = json.dumps({'url': url, 'port': 7777, 'updated': int(time.time() * 1000)} open(f'{state_dir}/current-url-main.json', 'w').write(data) print(f'[viewport:main] → {url}') " "$WOLT_NAME" "$WOLT_DIR/.state" - tmux send-keys -t main "export WOLT_SESSION=main && wclaude --dangerously-skip-permissions /woltspace-create-wolt" Enter + tmux send-keys -t main "export WOLT_SESSION=main && wclaude /woltspace-create-wolt" Enter else # TODO: replace with a /wake skill — check for recent sessions, offer resume or fresh start - tmux send-keys -t main "wclaude --dangerously-skip-permissions \"hey ${WOLT_NAME}\"" Enter + tmux send-keys -t main "wclaude \"hey ${WOLT_NAME}\"" Enter fi # ── Services ── diff --git a/container/entrypoint_setup.py b/container/entrypoint_setup.py index 22a4b76..94c8698 100644 --- a/container/entrypoint_setup.py +++ b/container/entrypoint_setup.py @@ -82,10 +82,10 @@ def write_bashrc(wolt_dir: Path, wolt_name: str): f"wolt() {{\n" f' cd {wolt_dir}\n' f' if [[ "$1" == "--resume" ]]; then\n' - f" wclaude --dangerously-skip-permissions --resume\n" + f" wclaude --resume\n" f" else\n" # TODO: replace with a /wake skill instead of hardcoded greeting - f' wclaude --dangerously-skip-permissions "hey {wolt_name}" "$@"\n' + f' wclaude "hey {wolt_name}" "$@"\n' f" fi\n" f"}}\n" ) diff --git a/container/lib/sessions.py b/container/lib/sessions.py index 901adb0..739c02e 100644 --- a/container/lib/sessions.py +++ b/container/lib/sessions.py @@ -583,7 +583,7 @@ def resume_session(name: str, prompt: str = "") -> dict: if tmux_alive and not claude_running: # Tmux alive but claude exited — restart claude with --resume inside the pane cd_prefix = f"cd {shlex.quote(session_dir)} && " if session_dir else "" - resume_cmd = f"{cd_prefix}export WOLT_SESSION={shlex.quote(name)} WOLT_NAME={shlex.quote(wolt)} && {WCLAUDE} --dangerously-skip-permissions {model_flag} {resume_flag} {safe_prompt}" + resume_cmd = f"{cd_prefix}export WOLT_SESSION={shlex.quote(name)} WOLT_NAME={shlex.quote(wolt)} && {WCLAUDE} {model_flag} {resume_flag} {safe_prompt}" _tmux_paste(name, resume_cmd) registry.update(name, wolt=wolt, status="running") return {"name": name, "url": session_url, "status": "revived", "detail": "claude exited, restarted with --resume in existing tmux"} @@ -591,7 +591,7 @@ def resume_session(name: str, prompt: str = "") -> dict: # Tmux is dead — create a fresh tmux session with wclaude --resume work_dir = session_dir or str(WOLTS_DIR / wolt) if wolt else "/workspace" cd_prefix = f"cd {shlex.quote(work_dir)} && " if work_dir else "" - resume_cmd = f"{cd_prefix}export WOLT_SESSION={shlex.quote(name)} WOLT_NAME={shlex.quote(wolt)} && {WCLAUDE} --dangerously-skip-permissions {model_flag} {resume_flag} {safe_prompt}" + resume_cmd = f"{cd_prefix}export WOLT_SESSION={shlex.quote(name)} WOLT_NAME={shlex.quote(wolt)} && {WCLAUDE} {model_flag} {resume_flag} {safe_prompt}" subprocess.run( ["tmux", "new-session", "-d", "-s", name, "-c", work_dir or "/workspace", resume_cmd], check=True, timeout=_TMUX_TIMEOUT, diff --git a/container/skills/woltspace-create-wolt/SKILL.md b/container/skills/woltspace-create-wolt/SKILL.md index f1386d0..cb417d9 100644 --- a/container/skills/woltspace-create-wolt/SKILL.md +++ b/container/skills/woltspace-create-wolt/SKILL.md @@ -47,7 +47,7 @@ create-creature-wolt ```bash push-view /wolt//site/ -cd /workspace/wolts// && wclaude --dangerously-skip-permissions '/woltspace-create-wolt' +cd /workspace/wolts// && wclaude '/woltspace-create-wolt' ``` Your job is done. The new session picks up Self-Onboarding mode and takes over. diff --git a/woltspace b/woltspace index 97a0b16..47b09b9 100755 --- a/woltspace +++ b/woltspace @@ -384,7 +384,7 @@ case "$cmd" in echo " ${_L} the lodge is quiet${_R}" exit 1 } - docker exec -it "$CONTAINER_NAME" claude --dangerously-skip-permissions + docker exec -it "$CONTAINER_NAME" wclaude ;; logs) docker logs -f "$CONTAINER_NAME"