Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

The copilot CLI flashes the permission prompt UI, even though extension has approved.

Open
#956 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
authorization, cli

Research direction

Reproduce the permission flow with the shown onPermissionRequest callback using CLI v1.0.13-1, testing both approved and denied-rule responses. Trace the CLI's permission sequencing from the extension response to the prompt; done means an approved response suppresses the prompt while denial and no-result behavior remain correct.

Written by the indexing model from the issue text.

Description

I'm working on an extension that would auto approve based on some rules.

// Deferred fire-and-forget logger — session isn't available until joinSession resolves
let _session = null;
const log = (msg) => { if (_session) _session.log(msg).catch(() => {}); };
...

onPermissionRequest: (request) => {
        const toolName = request.toolName ?? "";
        const toolArgs = {};
        if (request.fullCommandText) toolArgs.command = request.fullCommandText;
        if (request.fileName) toolArgs.path = request.fileName;

        // 1. deny rules first
        for (const rule of parsedDeny) {
            if (matchRule(rule, toolName, toolArgs)) {
                log(`DENY (permission) tool=${toolName} kind=${request.kind} rule="${rule.raw}"`);
                return { kind: "denied-by-rules", rules: [rule.raw] };
            }
        }

        // 2. allow rules — auto-approve
        for (const rule of parsedAllow) {
            if (matchRule(rule, toolName, toolArgs)) {
                log(`APPROVE (permission) tool=${toolName} kind=${request.kind} rule="${rule.raw}"`);
                return { kind: "approved" };
            }
        }

        // 3. no match — let CLI handle (prompt user)
        log(`NO MATCH (permission) tool=${toolName} kind=${request.kind}`);
        return { kind: "no-result" };
    },

In the cli i see the UI prompt none the less, if i do nothing, i see the tool call get approved and complete in the background.
If i'm fast enough or am on autopilot with limited permissions then the ui prompt rejects the tool call and fails it.

I do not think the CLI is correctly sequencing and waiting on extensions for permissions flow.

CLI Version : v1.0.13-1

Dominant language
Java
Stars
10.5k
Forks
1.5k
Avg merge
1d 9h
Merged PRs (30d)
131

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.

More from github/copilot-sdk

All issues in github/copilot-sdk

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.