Skip to content

fix(pty): capability-elevation approval prompt PTY handoff#1254

Open
lukehinds wants to merge 2 commits into
mainfrom
issue-1198
Open

fix(pty): capability-elevation approval prompt PTY handoff#1254
lukehinds wants to merge 2 commits into
mainfrom
issue-1198

Conversation

@lukehinds

@lukehinds lukehinds commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

  • An issue exists and is linked above
  • All commits are signed-off, using DCO
  • All new code follows the project's coding standards (CLAUDE.md) and is covered by tests
  • Public-facing changes are paired with documentation updates
  • Release note has been added to CHANGELOG.md if needed

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>
@github-actions github-actions Bot added bug Something isn't working nono-cli size/medium labels Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +59
Lines removed -9
Total changed 68
Classification Medium (50–300 lines)

Affected crates

  • crates/nono-cli — CLI changes. Verify argument parsing, flag documentation, and UX behaviour across supported platforms.

Blast radius — Contained

This PR touches: source code


Updated automatically on each push to this PR.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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

Labels

bug Something isn't working nono-cli size/medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capability elevation freezes

1 participant