Skip to content

fix: Enter/Escape work on subagent permission dialogs#50

Merged
oribarilan merged 2 commits into
mainfrom
fix/child-session-permissions
Jun 22, 2026
Merged

fix: Enter/Escape work on subagent permission dialogs#50
oribarilan merged 2 commits into
mainfrom
fix/child-session-permissions

Conversation

@oribarilan

@oribarilan oribarilan commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Fixes #47

Permission dialogs from child sessions (subagents) swallowed Enter and Escape because the pass-through only checked the current session ID. Subagent permissions live on a different session ID.

Now subscribes to permission.asked/permission.replied events to track prompts from any child session, keyed by the root session. The intercept passes all keys through when the counter is non-zero.

The permission pass-through check only looked at the current session's
permissions/questions via api.state.session.permission(sid). When a
subagent (child session) requested permission, it was stored under the
child's session ID, so vimcode kept consuming Enter/Escape instead of
letting them reach the permission dialog.

Now uses api.event to track permission.asked/permission.replied events
globally, aggregated by root session ID. The intercept checks both the
direct session state and the event-tracked child prompt counter.

Fixes #47
@oribarilan oribarilan force-pushed the fix/child-session-permissions branch from 9d42a1a to a519b96 Compare June 22, 2026 15:56
@oribarilan oribarilan changed the title fix: pass through keys when child sessions have pending permissions fix: Enter/Escape work on subagent permission dialogs Jun 22, 2026
@oribarilan oribarilan force-pushed the fix/child-session-permissions branch from ac55e8a to 09db046 Compare June 22, 2026 16:04
@oribarilan oribarilan force-pushed the fix/child-session-permissions branch from 09db046 to 2877ec3 Compare June 22, 2026 16:04
@oribarilan oribarilan merged commit 6c87b63 into main Jun 22, 2026
1 check passed
@oribarilan oribarilan deleted the fix/child-session-permissions branch June 22, 2026 16:06
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.

Enter key doesn't work on permission dialog in insert mode

1 participant