Skip to content

Honor hook denials, prevent MCP replay, and clarify TUI approvals - #7

Merged
mevarx merged 1 commit into
mainfrom
fix/hook-mcp-approval-review
Dec 1, 2026
Merged

mevarx merged 1 commit into
mainfrom
fix/hook-mcp-approval-review

Conversation

@mevarx

@mevarx mevarx commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Security and execution

  • Classify completed shell hooks by exit status so exit 2 denies a call and exit 49 also halts the turn.
  • Reconnect a dead MCP server before dispatch. If a dispatched mutation loses its reply or times out, report the unknown outcome, skip remaining prepared calls, and return control to the user.
  • Require an exact local entry in the server's trusted_read_only_tools list plus the advertised read-only hint for read-only grants and parallel execution. The default list is empty.

Terminal approvals

  • Keep the warning and actions visible while paging through the preview with PgUp and PgDn. Show the visible line range.
  • Put command and path first, sort remaining arguments, truncate by display width, and expose full wrapped text with v.
  • Show the command or target in session grant confirmations and history. List eligible MCP tools in the approval details.

Verification

Ran the full Go test suite, go vet, and staticcheck with Go 1.26.11. Regression tests exercise real shell denials, a subprocess losing its MCP reply, per-server trust, stopping pending mutations, and a long approval at 80×24 with Unicode arguments.

@mevarx
mevarx merged commit b4b388c into main Dec 1, 2026
6 checks passed
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.

1 participant