Repository navigation
fix(copilot): restore the permission prompt as a blocked signal - #5
Merged
Merged
Conversation
Copilot's `PermissionRequest` hook fires before the permission service runs —
before rule checks, session approvals, auto-allow/auto-deny, and user
prompting — so the event alone cannot say whether a human is blocked. The
notification hook is the signal that a prompt is actually on screen, and
dropping `permission_prompt` from the blocking predicate left a real
"Allow Bash to run?" prompt showing the busy indicator instead of the red
question mark.
That mapping was removed because copilot-cli#2586 made the notification fire
for every tool execution in interactive mode, including tools already approved
for the session, so it flapped panes that had nothing to answer. The CLI fixed
that in 1.0.26 ("Permission prompt notification hook only fires when a prompt
is actually shown to the user"), so the notification is authoritative again.
Restore it for both the blocked state and the prompt text the row surfaces.
`PermissionRequest` stays `working`: it still fires for requests a rule
auto-approves, so only the notification may block.
nplez1
pushed a commit
that referenced
this pull request
Oct 19, 2026
…-page readers off the deprecated owner resolver (stablyai#30478) Thirteen read-routing callers (#4, #5, #10-#20 of the round-3 caller list) read the owner through runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. A workspace two hosts publish is no longer searched on either host. The focus-read ratchet now counts the legacy-fallback adapter, which reads the focused runtime inside an object literal its discovery skipped; the five F1 entries that blind spot pruned come back. Deprecated importers 53 -> 40.
nplez1
pushed a commit
that referenced
this pull request
Oct 26, 2026
…anel (stablyai#7655) The workspace space-manager rendered every hosted review as "PR #N", so a GitLab merge request showed as "PR #5" instead of "MR !5". The cached review already carries its provider (HostedReviewInfo.provider) — the panel's local input type just narrowed it away. Thread provider through and format via the same localizedHostedReviewCopy / '!' vs '#' helpers the rest of the app uses. Extract the label formatting into hosted-review-label.ts (a pure module, away from the panel's heavy React/store imports) so it can be unit-tested directly, and add hosted-review-label.test.ts covering github / gitlab / azure-devops / gitea and the status suffix. linkedPR stays "PR #N" — it is the GitHub-specific workspace field, distinct from linkedGitLabMR. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Neil <[email protected]> Co-authored-by: Neil <[email protected]>
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.
ELI5
When Copilot CLI stops and asks "Allow Bash to run this command?", Orca's sidebar kept showing the yellow spinning busy indicator instead of the red question mark that means "this agent needs you". This puts the red question mark back.
What Changed
Before: with a GitHub Copilot CLI pane waiting on a permission prompt, the sidebar and tab read as
working(yellow spinner), so nothing signalled that the agent was blocked on you.After: the same prompt reads as
blocked(red question mark) and the pane carries the prompt text, e.g. "Allow Bash to run?" — the same treatment Claude, Codex and Droid already give a real approval wait.Mechanism. Copilot's status is hook-driven, and the two permission-related hooks mean different things:
PermissionRequestfires before the permission service runs — before rule checks, session approvals, auto-allow/auto-deny and user prompting — and it also fires for requests a rule auto-approves. It cannot say whether a human is blocked, so it staysworking.Notificationwithnotification_type: "permission_prompt"is the signal that a prompt is actually on screen.Commit
38bfe083fe(on the unopenedfix/copilot-background-workbranch, staged intonplez1/mainbya24125701a) removed that notification from Copilot's blocking predicate, so a real prompt had no signal left to raise the wait. This restores it in both places it is read: the blocked-state predicate insrc/shared/agent-hook-listener/providers/copilot-events.tsand the prompt-text extraction in.../copilot-tool-fields.ts.Why
The mapping was removed deliberately, for a reason that no longer holds. copilot-cli#2586 made
Notification(permission_prompt)fire for every tool execution in interactive mode, including tools already approved for the session, so treating it as blocked parked panes on a prompt nobody had to answer. Copilot CLI 1.0.26 fixed that — "Permission prompt notification hook only fires when a prompt is actually shown to the user" (current CLI is 1.0.86) — so the notification is authoritative again, and the removal now costs a missed prompt instead of preventing a false one.Alternatives considered:
PermissionRequestinstead. Rejected: it fires before auto-allow/auto-deny, so every auto-approved tool call would read as "needs you".This is a fork-local regression:
origin/main(upstream) still has the mapping. It exists here only through the unopenedfix/copilot-background-workbranch.Linked Issue
None, and no
Fixes— this is a fork-local regression, so there is no upstream Orca issue to close (upstreammainstill mapspermission_promptto blocked). The CLI-side cause is github/copilot-cli#2586, fixed in copilot-cli 1.0.26.Visual Proof
N/A, and here is why: reproducing needs an interactive Copilot CLI session sitting on a permission prompt, and no Copilot CLI is installed in the environment this was written in. The state is instead pinned at the exact boundary the sidebar consumes —
server-copilot-normalization.test.tsposts apermission_promptto/hook/copilotover HTTP and asserts the listener receivesstate: 'blocked', and the renderer already mapsblockedto the red question-mark "permission" visual (src/renderer/src/lib/agent-status.ts, covered by its own test). Say the word and I will attach a CDP capture from an installed build showing the pane flipping yellow → red.Testing
pnpm test src/main/agent-hooks/— 88 files, 929 passed, 9 skippedpnpm test src/shared/agent-hook-listener— 19 files, 259 passedpnpm testfor the affected renderer notification test, plusserver-copilot-normalization.test.ts— passedpnpm typecheck— exit 0oxlintandoxfmt --checkon the three changed files — cleanpnpm run check:code-quality:changed— 0 new findingsNew tests: the
permission_prompt→blockedmapping plus prompt text; a lifecycle test pinningworking → working → working → blocked → workingacrossUserPromptSubmit,PreToolUse,PermissionRequest,Notification(permission_prompt),PostToolUse; and an HTTP-ingest test forpermission_prompton/hook/copilot.Platforms: the suite ran on macOS only; no app was launched. The change is platform-agnostic — it reads hook payload fields, with no path, shell, shortcut or windowing code, and the POSIX and PowerShell hook wrappers post the same payload shape.
AI Disclosure
Drafted and verified by an AI coding agent (Pi, DeepSeek
deepseek-flash) under @nplez1's direction. The root-cause evidence (the CLI changelog entry for 1.0.26 and copilot-cli#2586), the decision to restore rather than rework, and the final diff were reviewed and approved by @nplez1 before this PR was opened.Review
Two things a reviewer should look at:
PermissionRequestis deliberately left asworking. The lifecycle test fails if a later change makes it block, because that would mark auto-approved tool calls as "needs you".permission_promptfires per tool execution and panes will flap. There is no way to detect the CLI version from the payload; the alternative is the missed prompt this PR fixes.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
BRANCHES.mdstill describesfix/copilot-background-workas fixing "aNotification(permission_prompt)was treated asblockedeven though approval may be automatic"; that premise is what this PR reverses, andfix/copilot-background-workshould drop itspermission_prompthunk when it rebases or the two will collide.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass — typecheck plus the affected test suites pass; fullpnpm lint/test/buildwere not run locally.