Skip to content

interactive harness: switch off bypassPermissions to skip its disclaimer - #613

Merged
max-sixty merged 1 commit into
mainfrom
interactive-permissions
May 27, 2026
Merged

max-sixty merged 1 commit into
mainfrom
interactive-permissions

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Why

Second smoke-test retry on main (https://github.com/max-sixty/tend/actions/runs/26488931127) still timed out at 300s. The supervisor's transcript dump showed claude blocked on a third onboarding dialog after the trust + theme picker — the "WARNING: Bypass Permissions mode" disclaimer, shown the first time claude is invoked with --permission-mode bypassPermissions:

WARNING: Claude Code running in Bypass Permissions mode
In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands.
…
❯ 1. No, exit
  2. Yes, I accept

The disclaimer state has no documented pre-seed key in ~/.claude.json, and the binary's own error message for --bg says it must be accepted via an interactive run — which the supervisor can't replicate.

What

Switch to --permission-mode dontAsk with an explicit allow list. dontAsk auto-denies anything not pre-approved (no prompt, no disclaimer); flat tool names like "Bash" match all invocations, so the effective permission surface matches the bypassPermissions intent for CI use.

  • interactive/action.yaml: drop --permission-mode bypassPermissions in the wrapper script; write permissions.defaultMode: dontAsk + an allow list (built from inputs.allowed_tools via jq) into .claude/settings.local.json. Pass --permission-mode dontAsk on the CLI too as belt-and-suspenders.
  • Comment in the Run-Claude step block explains why we avoid bypassPermissions and what dontAsk does for us.

No generator changes; no test changes (no behavior visible at config-render time).

Test plan

Second smoke retry (run 26488931127) still timed out — claude blocked on
the "WARNING: Bypass Permissions mode" disclaimer, a separate dialog
from the trust/theme onboarding fixed in #611. The bypass-mode
disclaimer has no documented pre-seed key in ~/.claude.json and the
binary's own error suggests it can only be accepted via an interactive
run, which the supervisor can't replicate non-interactively.

Switch to `--permission-mode dontAsk` with an explicit allow list in
.claude/settings.local.json built from inputs.allowed_tools. dontAsk
auto-denies anything not in the allow list (no prompt, no disclaimer);
flat tool names like "Bash" match all invocations, so the effective
permission surface matches the bypassPermissions intent for CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit d6c854c into main May 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the interactive-permissions branch May 27, 2026 03:53
@max-sixty max-sixty mentioned this pull request May 27, 2026
max-sixty added a commit that referenced this pull request May 27, 2026
## Why

Cut the 0.1.2 release so consumer repos (and tend's own nightly regen)
pick up the new
`claude-interactive` harness and per-workflow `harness`/`model`
overrides.

## What's new since 0.1.1

**New `claude-interactive` harness**
(`max-sixty/tend/[email protected]`) — opt-in
alternative to the released `claude` harness. PTY-supervised interactive
`claude` via
`script(1)`, end-of-turn detected through Stop/StopFailure hooks. Built
as the
trial path ahead of Anthropic's June 15 billing split between Agent-SDK
metering and
the flat Claude Code subscription. Smoke tested end-to-end on tend
itself. PRs:
#609, #611, #613, #614, #615, #616.

**Per-workflow `harness` / `model` override** — adopters can flip a
single workflow
to a different harness or model without changing `.config/tend.yaml`
defaults. #612.

**Skill refinements** — nightly upstream-bot rebases (#605),
running-in-ci PR bar
(#604) and recheck (#573), env-filter loophole fix (#599),
authorAssociation warning
(#600), review-gates Gate 1 (#602).

**Bug fix** — mention queue-delay now uses `comment.updated_at` so edit
events report
accurately (#595).

## Compatibility

Released `claude` harness path is byte-identical; `claude-interactive`
is strictly
additive and opt-in. Consumer repos that don't touch `harness:` see no
change beyond
the new skill text and the mention-edit fix.
max-sixty added a commit that referenced this pull request Jun 10, 2026
Both Claude harnesses ran with `--permission-mode dontAsk`, which (like
every mode except bypass) hard-denies writes to Claude Code's protected
paths: `.devcontainer/`, `.github/`, `.husky/`, `.cargo/`, dotfiles.
That blocked the bot from autonomous fixes touching those files. This
switches both the Agent SDK harness (`action.yaml`) and the PTY
interactive harness (`interactive/action.yaml`) to `bypassPermissions`.

This is acceptable here because the run is sandboxed in an ephemeral,
PR-gated checkout: anything the bot writes only lands through a reviewed
PR. The interactive harness previously avoided bypass mode because of
its one-time "I accept the risks" disclaimer (#613). Smoke runs on this
branch showed that neither `CLAUDE_CODE_REMOTE=1` nor the legacy
`bypassPermissionsModeAccepted` key in `~/.claude.json` suppresses it
(the latter is consumed only by a one-time settings migration). The
dialog check reads `skipDangerousModePermissionPrompt` from any settings
layer, so the action now sets that key in the
`.claude/settings.local.json` it already writes. Verified by an
interactive-smoke run on the merged head.

A TODO in both files tracks a more hawkish follow-up (auto-mode
classifier, or scoped overrides of the specific protected paths) that
would keep the write capability without blanket bypass.

> _This was written by Claude Code on behalf of max_

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants