Repository navigation
agent: a permission request says what the agent would do - #19
Merged
Merged
Conversation
foxnne
force-pushed
the
chat-approvals
branch
from
October 19, 2026 20:11
d099220 to
4039106
Compare
The agent's `session/request_permission` showed only the tool call's title beside its options. Now the question reads as one line per kind: the command for execute, the file and its +/- line count for an edit (or Create for a new file, or N files), the path (and line) for read, delete and move, the pattern for search, the URL for fetch, the title otherwise. The step's disclosure holds the detail: the request's diffs and locations, the whole command, or the call's raw input as JSON when nothing else says what it is. A request about a call the chat has not seen becomes a step, so every request has one. The agent's options are unchanged. A request still waiting when the turn is stopped, the agent exits, or it restarts is answered `cancelled` (ACP) and its question closes through the new `chat.unask`, so no buttons are left answering nothing. Part of fizzyedit/plans AGENTS_ANYWHERE_PLAN, step 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
force-pushed
the
chat-approvals
branch
from
October 19, 2026 20:15
4039106 to
1261d8c
Compare
foxnne
marked this pull request as ready for review
October 19, 2026 20:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of fizzyedit/plans AGENTS_ANYWHERE_PLAN (
plans/AGENTS_ANYWHERE_PLAN.md), step 6: approvals you can judge.What changes
An agent's
session/request_permissionshowed only the tool call's title beside its options, so the person could not tell what they were allowing. Now:src/permission.zig, std-only):Run zig build test(plain text; every piece the agent wrote, command, path or URL, is cut to its first line and 100 bytes, with "… (more lines)", so it cannot add lines of its own beside the buttons)Edit src/a.zig: +2 −1,Create new.zig: +2 −0,Edit 3 files: +5 −2, orEdit <path>without a diffMove a to bSearch for <pattern> in src; fetch:Fetch <url>orSearch the web for <query>; otherwise the title (on its own, without a step:The agent asks to <title>.)shcode) or, for a call that says nothing else about itself, itsrawInputas JSON (capped at 4 KB on a UTF-8 boundary). One update per request; a step's earlier content (a diff from itstool_call) is never wiped by a request that gives none or an empty list.tool_callfor it updates that step instead of adding a second. Each known call keeps its kind, since aToolCallUpdatemay leave it out.cancelled(as ACP requires for a cancelled turn) and closes its question through a new chat command,chat.unask { chat, question }; the buttons give way to "Not answered". Closing the chat drops them without a call.Checked against the current ACP spec (protocol/tool-calls:
ToolCallUpdatefields,diffwith optionaloldText, locations, permission outcomes).Not here: flagging a pending approval when the chat is not in view (the plan's step lists it; left for a follow-up).
How it was checked
zig build test: newpermission.zigtests for each kind's line and detail, the diff counts, and the waiting requests drained once (what exit/restart/cancel use); aTranscripttest thatcancelQuestioncloses an open question and leaves an answered one.--quietfizzy (main, macOS) with a scripted ACP agent asking three permissions (execute on a known step, an edit with a diff on an unseen step, an MCP call): each showed its line and detail; an answer throughagent.chat_answerreached the agent asselected; when the agent exited, every open question turned to "Not answered" with "The agent stopped." and nothing written to the dead pipe.pop, no allocation), the lost framing of a stepless question, and fetch queries.🤖 Generated with Claude Code