Skip to content

Declare native_ask so an interactive step_up becomes a terminal prompt (0.17.0) - #34

Merged
davidcrowe merged 1 commit into
mainfrom
feat/terminal-enforce
Sep 14, 2026
Merged

davidcrowe merged 1 commit into
mainfrom
feat/terminal-enforce

Conversation

@davidcrowe

Copy link
Copy Markdown
Collaborator

What

Declares capabilities: ["native_ask"] on PreToolUse so the gateway may answer an interactive step_up with decision: "ask" — Claude Code then shows its own permission prompt instead of the agent hitting a deny + console link. The existing ask() path renders it; the model‑facing steer now says a human is being asked in this terminal and not to retry the same command after a no.

Codex declares no capability: its parser acts only on deny, so an ask there would fail the hook run and let the call through unreviewed.

Nothing is sent on PostToolUse. Version 0.17.0 in all three sites.

Tests

node --test test/*.test.mjs → 192 passed. New test/native-ask.test.mjs: capability present for Claude Code, absent for Codex, ask verdict → permissionDecision: "ask" with [ACP] Approval required: on both channels, same verdict under Codex → deny, PostToolUse carries no capabilities.

Pairs with

gatewaystack-connect feat/terminal-enforce (rollout key harness_ask, internal). Merge the gateway first; against an old gateway this plugin behaves exactly as 0.16.0.

The gateway may now answer a step_up with decision "ask" when the harness
says it can render a permission dialog. Claude Code declares the capability
on PreToolUse; Codex (deny-only parser) declares none. The existing ask()
path renders it; the model-facing steer tells the agent not to retry the
same command after a no. Bumps to 0.17.0 in all three version sites.
@davidcrowe
davidcrowe merged commit d9fb096 into main Sep 14, 2026
2 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