Skip to content

Conversation

@sudo-tee
Copy link
Owner

@sudo-tee sudo-tee commented Jan 5, 2026

The permission request seems to have changed it's format

I updated the permission handling to support both format

This should fix #158

The permission request seems to have changed it's format

I updated the permission handling to support both format

This should fix #156
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes permission request handling to support a new format where permission event properties are nested under a tool object, while maintaining backward compatibility with the old flat format. The issue appears to have emerged with changes to sub-agent permission requests.

Key Changes

  • Updated permission request detection logic to support both nested (permission.tool.callID/messageID) and flat (permission.callID/messageID) formats
  • Added subscription to permission.asked event in addition to existing permission.updated event
  • Enhanced auto-scroll behavior when permission prompts are rendered
  • Added test data and configuration for the new permission format

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lua/opencode/event_manager.lua Added optional tool field to OpencodePermission type definition for nested format support
lua/opencode/ui/renderer.lua Updated permission event handlers to extract callID/messageID from either nested or flat format; added permission.asked event subscription and auto-scroll on permission updates
lua/opencode/ui/formatter.lua Enhanced permission matching logic to check both nested tool format and legacy flat format when determining whether to display permission prompts
tests/replay/renderer_spec.lua Added new test case identifier to skip list for full session tests
tests/data/*.json Added test data files for the new permission format in approve/deny/ask scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sudo-tee sudo-tee merged commit 5404cd1 into main Jan 5, 2026
10 checks passed
@romankovalov
Copy link

The issue seems to be present after the fix - the only temporary notification shown about permissions
I'm on f128f20

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No updates and interactive permissions requests when sub-agents triggers tasks

3 participants