github / github/copilot-cli

Permission-gate/tool-approval preview truncates full Windows paths

Open
#4,701 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:permissions area:terminal-rendering
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

When the CLI displays a permission-gate/tool-approval confirmation prompt before running a tool call (e.g., a PowerShell command referencing a file path), the rendered preview shows a truncated version of the path — dropping the leading drive letter and/or earlier path segments (e.g., showing \Users\UserName\ instead of the full C:\Users\UserName\Folder\SubFolder\...) — even though the actual command text passed to the tool contains the complete, correct absolute path.

Affected version

GitHub Copilot CLI 1.0.82

Steps to reproduce the behavior
  1. Start an interactive session with GitHub Copilot CLI on Windows.
  2. Ask the agent to run a PowerShell command that references a full absolute path, e.g.: Get-ChildItem "C:\Users\Username\Folder\SubFolder" -Force
  3. When the permission-gate confirmation dialog appears (asking to approve the tool call), observe the path as rendered in that preview.
  4. Compare against the actual command string — the underlying command is correct and full, but the displayed preview text is partial/truncated.
Expected behavior

The permission-gate preview should render the full, untruncated absolute path exactly as it appears in the command being executed, with no segments dropped.

Additional context
  • CLI version: 1.0.82
  • OS: Windows
  • This is purely a display/rendering issue in the confirmation UI — the command itself executes against the correct full path when approved. Reproduced consistently across multiple tool-call approvals across multiple sessions.

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

Start an interactive Windows session in GitHub Copilot CLI and reproduce the permission-gate/tool-approval confirmation prompt with the PowerShell command shown in the issue. Compare the rendered preview with the complete command text, focusing on how the absolute path is displayed. Done means the preview preserves the full drive letter and path segments without truncation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.