Skip to content

Dropping a rule in /permissions does not stop the running conversation from using it #2677

Closed

Description

@AbirAbbas

Severity: P1 (a rule the person removed still lets a tool run without asking) · Regression: no (v0.8.2 does the same)

What happened

Found in the 2026-11-16 hand-QA of dev@9eb0b516b (dev-20261114-9eb0b516b6f2, linux amd64); v0.8.2 does the
same, so it is old, not a regression. After you bank always, this tool for write and then drop that rule in
/permissions, the running conversation keeps writing files without asking, for the rest of the session.

    · dropped · write · from the next session
  › <ask the model to create ask2.txt containing after-drop>
    ▸ worked · 1 tool call · ctrl+e
  ENGINE-WRITE: Successfully wrote 11 bytes to ask2.txt
    · 1 file · ask2.txt +1 −0

permissions.md, "Dropping a banked rule, and when it stops working": "Under --no-host, a drop is live on the very
next call. A plain launch through this machine's engine also reads the changed rules before its next tool decision.
Its receipt can still be dropped · <name> · from the next session when the panel could not push the gate
immediately." The receipt wording is allowed; the promise that the next tool decision reads the changed rules is
what fails: no card appears for the next write. Reproduced 3 of 3 on dev and once on v0.8.2.

Replication

Deterministic (no model). The repository's scripted endpoint (go run ./test/remote/stub -addr :8080) has no
write branch; add this one to compose in test/remote/stub/main.go (it returns a write tool call, then
quotes the result back):

case strings.Contains(ask, "PROBE-WRITE"):
	if answered == "" {
		path := pathAfter(ask, "PROBE-WRITE")
		return reply{tool: "write", args: `{"path":"` + jsonEscape(path) + `","content":"hello\n"}`}
	}
	return reply{chunks: []string{"ENGINE-WRITE: " + strings.TrimSpace(answered)}}

Then, in an empty folder, with OPENROUTER_API_KEY=stub-key CODEAF_PROFILE_DIR= CODEAF_BASE_URL=<the stub's address>/api/v1 codeaf (a plain launch, so the conversation runs on the machine's engine):

  1. Press alt+a until the box says ◇ asks. Send PROBE-WRITE ask1.txt; on the card press 2 (always, this tool).
  2. Open /permissions; the row write every call is listed. Press d twice, then esc. The transcript says
    dropped · write · from the next session.
  3. Send PROBE-WRITE ask2.txt. Today no card appears and ask2.txt is written.

Field (real models). The same with a real key: ask the model to create ask1.txt containing hello, answer 2,
drop the rule, ask it to create ask2.txt. A few cents at most.

Where

nextSessionWord and the drop path in internal/tui3/permissions.go; the gate the panel pushes to the engine
("could not push the gate immediately").

The fix

After a drop, the very next tool decision in that conversation, and in any other conversation on the same engine,
uses the rules as they now stand: a dropped always makes the next write ask again. If the gate genuinely cannot
be pushed, say so in the receipt and say the rule stays banked for this session instead of dropped.

Acceptance

  • e2e: tmux surface, a plain launch with the scripted model: bank write, drop it in /permissions, send
    PROBE-WRITE ask2.txt: the screen shows the approval card (needs your ok to run write) and ask2.txt does not
    exist until 1 is pressed.
  • e2e: the same under codeaf chat --no-host (the control that already works, per the manual).
  • The permissions.md section names the receipt wording that can still appear and when.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions