Skip to content

Claude: "Always allow this session" behaves like "Approve once" #383

Closed

Description

@mubeda

Problem / summary

(measured) The composer shows Always allow this session on every pending approval, for every provider. For Claude, that decision is sent to the driver as acceptForSession, then folded into the same one-time allow as Approve once. The control reply is {"behavior":"allow"} with no session permission update.

(inferred) Claude therefore asks again the next time the same tool or MCP server needs approval in that session. This was not reproduced at runtime; the conclusion follows from the wire payload being identical for both buttons.

(measured) Diagnosis is static only, at the SHA below. No app, test, or provider process was run.

Current behavior

(measured) Verified at be03142dcd9f14378d4357d83ad65d2cf5af513a (origin/main as of 15 November 2026, 19:21 America/Buenos_Aires, merge of PR #379). Every path:line below refers to this SHA.

(inferred) The user-visible effect — Claude prompting again for the same tool or MCP server later in the session — follows from that identical allow payload. It was not confirmed in a live session.

Proposed fix

(inferred) When the decision is acceptForSession, the Claude control reply should apply the stored suggestions as session-scoped permissions (the updatedPermissions field, or whatever the current Claude control protocol names). Approve once stays a one-time {"behavior":"allow"}. Other providers stay as they are. The composer buttons do not need a visual change if the Claude path honors the existing label.

Goals and non-goals

Goals:

  • For Claude, Always allow this session lasts for the rest of that Claude session for the approved tool, MCP server, or rule described by the stored suggestions.
  • Approve once, Decline, and Cancel turn keep their current meaning.
  • Codex, Cursor, Grok, and OpenCode session-allow behavior is unchanged.

Non-goals:

  • Changing review-session policy or making reviews autonomous (#376).
  • Persisting session allows across a new Claude process, a new thread, or a restart.
  • Redesigning the approval card, or hiding Always allow this session for Claude.
  • Tightening or loosening the default runtime approval mode.

Acceptance criteria

P0:

  • A hermetic Claude approval test sends acceptForSession for a permission request that includes suggestions, and asserts the control control_response applies those suggestions as session-scoped permissions. A later request in the same fixture session that matches those rules is allowed without another user decision. Extend or replace the existing resolve-only assertion in apps/server/src/production/provider_runtime.rs (around the approve(..., "acceptForSession") fixture at :34569).
  • A paired test sends accept for the same request shape and asserts a one-time allow only: a later matching request is still opened.
  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and the focused Rust tests pass.
  • vp check and vp run typecheck pass if any TS/contracts change; otherwise state that no frontend or contract change was required.

P1:

  • If Claude sends no suggestions, the implementation has a defined, tested behavior (session allow by tool name, or a clear one-time fallback with a reason), not a silent no-op that still looks like a session allow.
  • Living docs that describe approval decisions, if any are affected, are updated. If none are, the PR says they were reviewed and remain accurate.
  • UI.md and vercel-react-best-practices reviews are recorded if the web UI changes; if it does not, the report says they were not needed.
  • Testing runbooks are reviewed and remain accurate.
  • Profiler coverage line in the delivery report. Approval payloads, tool input, and user text never reach profiler records or logs.

P2:

  • Optional: a composer-level test remains unnecessary if the UI already sends acceptForSession and this fix is server-only.

Open questions

  1. (guess) What is the exact Claude control-response schema for session rules on the CLI version BibCode targets? The proposal assumes an updatedPermissions (or equivalent) field built from the stored suggestions. Confirm against current Claude control protocol before implementing.
  2. (inferred) When suggestions is empty, should BibCode still attempt a session allow, or treat the click as Approve once and say so?
  3. (inferred) Session scope is the current Claude process. Is that the intended meaning of Always allow this session, or should a later Claude session in the same thread inherit the allow?

Duplicate check

Searched open and closed issues (titles and body search for acceptForSession, "Always allow this session", updatedPermissions, approval/permission titles).

  • Not a duplicate of #376 (open): that issue is about chat reviews starting Supervised so Codex asks on review commands. It is adjacent, and the screenshot there happens to show this button, but it does not cover Claude collapsing acceptForSession into a one-time allow.
  • No other open or closed issue describes this Claude session-allow bug.

Reference

Similar change in T3 Code: pingdotgg/t3code#33707 (Claude session approvals).

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.size:S

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions