zai-org / zai-org/feedback

[Bug] [ZCode] Repeated permission prompts for near-identical requests — no assessment/session memory

Open
#243 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.

问题类别 · Category
Bug (UX / Permission flow)

涉及的 Agent 框架 · Agent framework
ZCode (built-in / GLM Coding)

严重程度 · Severity
Medium

复现频率 · Reproducibility
Always (whenever the agent performs a series of near-identical permitted actions)


Bug Description

ZCode re-prompts for permission on near-identical requests within the same session, even when the action type and intent are clearly the same as something just approved. There is no assessment of whether a new request is sufficiently similar to one already granted, so the user ends up approving essentially the same operation over and over (same action, only the target differs — e.g. writing file A, then file B, then file C).

Each prompt is treated as brand new, with no memory, batching, or pattern recognition of the preceding approvals.

Steps to reproduce

  1. Approve a permission request for an action (e.g. a write/edit/bash operation).
  2. Let the agent continue; it performs the same kind of operation again on a different target.
  3. ZCode shows the permission dialog again, even though the action is effectively the same as the one just approved.
  4. This repeats for every similar subsequent request in the run.

Expected behavior

Some form of assessment so the user isn't re-prompted for near-identical requests, e.g.:

  • Session-scoped "allow this action" — once approved, the same action class doesn't re-prompt for the rest of the session.
  • Scope-based approval — "allow all writes under this directory" / "allow this exact command" with clear, bounded scope.
  • "Allow all similar" / "Don't ask again for this" option directly on the dialog.
  • Batched/grouped prompts — collect several similar requests and ask once.

Actual behavior

  • Every near-identical request triggers a fresh, independent permission prompt.
  • No recognition that the action was just approved moments before.
  • Approvals are not reused even within the same session.

Impact / 影响

  • Major friction during real workflows where the agent performs many similar steps (edits across multiple files, repeated shell calls, etc.).
  • Encourages users to reflexively mash "approve" to get through the noise, which weakens the safety value of the permission gate (the opposite problem of #242, but same root: prompts that don't match how people actually work).
  • Wastes time and breaks flow on long-running tasks.

Suggested fixes (any one or a combination)

  • Per-session allowlist keyed by action type + scope (e.g. command pattern, path prefix).
  • An explicit "Remember this choice for this session" toggle on each permission dialog.
  • Group consecutive similar requests and ask for approval once, with a summary.

Environment

  • ZCode version: 3.7.5 (build 3.7.5.4641)
  • OS: macOS 26.5.2 (Tahoe), Darwin 25.5.0, Apple Silicon (arm64)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files, tests, or code entry points are mentioned in this feedback issue. Start by locating ZCode's permission-flow and approval-state entry points, then determine the desired session or scope boundary. Done should mean near-identical permitted actions no longer trigger repetitive prompts while approvals remain clearly bounded.

Written by the indexing model from the issue text.

Assessment

Domain
security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.