Skip to content

fix(pabcd-state): name the async route when the goal guard denies request_user_input - #340

Open
LilMGenius wants to merge 1 commit into
lidge-jun:devfrom
LilMGenius:fix/interview-guard-names-async-route
Open

LilMGenius wants to merge 1 commit into
lidge-jun:devfrom
LilMGenius:fix/interview-guard-names-async-route

Conversation

@LilMGenius

Copy link
Copy Markdown
Contributor

An agent working under an active thread goal that needs to ask the user something (an approval before a write, say) calls request_user_input, and the goal-mode interview guard denies it with:

Blocking Interview / request_user_input denied. Owner: $codexclaw:cxc-dev async-questions.md; silence is not approval.

The user sees only Blocked by hook. The reason names no tool to use instead, so the agent either retries the same blocked call or stops and asks in a final message, which ends its goal turn. In the session that hit this, the agent tried request_user_input twice, the user saw two hook blocks, and only a later turn found request_user_input_async, which the same reference already names as the route.

Change

GOAL_MODE_DENY_REASON in components/pabcd-state/src/goal-gate.ts now carries the route:

Blocking Interview / request_user_input denied while a goal is active; ask with request_user_input_async if exposed, else in text. Owner: $codexclaw:cxc-dev async-questions.md

The guard still denies under an active or unreadable goal and passes through otherwise. With the (goal-active=<status>) suffix the additionalContext stays under the 200-byte limit the test pins. dist/goal-gate.js was rebuilt with npm run build, and a CHANGELOG entry sits under [Unreleased].

Validation

Check Before After
goal-gate.test.ts asserts the reason names request_user_input_async fails (actual: ...silence is not approval.) passes
goal-gate.test.ts + test/hook-e2e.test.mjs 72 pass, 0 fail
npm run build OK, 206 files

npm run gate fails on this machine with missing INDEX under the external ~/.codexclaw state root on dev and on this branch alike, so it is a local setup gap. I did not drive the change through a live Codex session, because the installed plugin cache only refreshes at session start.

…uest_user_input

- The goal-mode interview guard's deny reason named no alternative and ended with "silence is not approval", so an agent holding an approval question retried the blocked tool or stopped; it now says to ask with request_user_input_async when exposed, else in text
@github-actions github-actions Bot added the bug Something isn't working label Nov 10, 2026

This branch has not been deployed

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant