From 8f313cf15a63e23e5f849842d9c74b4ed4ae5de1 Mon Sep 17 00:00:00 2001 From: jacob-wang Date: Tue, 21 Apr 2026 01:08:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(codex):=20add=20AskUserQuestion=E2=86=92req?= =?UTF-8?q?uest=5Fuser=5Finput=20tool=20rewrite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #1066 — Codex skills that call AskUserQuestion silently fail in Default mode because Codex strips AskUserQuestion from the tool schema and its equivalent (request_user_input) only works in Plan mode. The HostConfig interface already supports toolRewrites (gbrain, openclaw, factory, hermes all use it). codex.ts was missing it. Adding { 'AskUserQuestion': 'request_user_input' } to codex.ts so that when gen-skill-docs.ts applies rewrites at generation time, any prompt text referencing AskUserQuestion gets replaced with Codex's equivalent. Note: this only handles the text rewrite. A full fix would also need the Plan-mode gate in the preamble (Option 4 in #1066), but that requires codex-side feature flag changes outside gstack's control. Co-Authored-By: Claude Opus 4.7 --- hosts/codex.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/codex.ts b/hosts/codex.ts index 7dc80ea87..f2fff4e00 100644 --- a/hosts/codex.ts +++ b/hosts/codex.ts @@ -31,6 +31,10 @@ const codex: HostConfig = { { from: '.claude/skills', to: '.agents/skills' }, ], + toolRewrites: { + 'AskUserQuestion': 'request_user_input', + }, + suppressedResolvers: [ 'DESIGN_OUTSIDE_VOICES', // design.ts:485 — Codex can't invoke itself 'ADVERSARIAL_STEP', // review.ts:408 — Codex can't invoke itself