fix(pty): capability-elevation approval prompt PTY handoff#1254
fix(pty): capability-elevation approval prompt PTY handoff#1254lukehinds wants to merge 2 commits into
Conversation
Pause the supervised PTY relay before Linux seccomp-notify approval prompts and restore relay mode afterward. This keeps the terminal in cooked mode while the approval backend reads from /dev/tty, avoiding garbled prompt rendering and input freezes when --capability-elevation asks for runtime access. Also group per-notification mutable state into a small context struct so the seccomp handler stays within clippy limits. Resolves: #1198 Signed-off-by: Luke Hinds <lukehinds@gmail.com>
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
There was a problem hiding this comment.
Code Review
This pull request introduces terminal pausing and resuming around supervisor-owned approval prompts. It refactors handle_seccomp_notification to accept a new SeccompNotificationState struct, which bundles several parameters including the PTY proxy. When requesting approval, the terminal is paused and subsequently resumed using the newly added resume_terminal_after_prompt method in PtyProxy. A unit test has also been added to verify this behavior. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Pause the supervised PTY relay before Linux seccomp-notify approval prompts and restore relay mode afterward. This keeps the terminal in cooked mode while the approval backend reads from /dev/tty, avoiding garbled prompt rendering and input freezes when --capability-elevation asks for runtime access.
Also group per-notification mutable state into a small context struct so the seccomp handler stays within clippy limits.
Linked Issue
Resolves: #1198
Checklist
CHANGELOG.mdif needed