[Windows Desktop 26.707.9981.0] Trusted hook orchestration completes but PowerShell handler never reaches script entry
What version of the Codex App are you using?
- Codex Desktop:
26.707.9981.0(x64) - Packaged Codex CLI:
0.144.2 - Platform: Windows
What issue are you seeing?
A trusted project UserPromptSubmit hook is selected by Codex Desktop and generic hook orchestration runs, but the configured PowerShell handler never reaches the script's first durable telemetry marker.
Desktop emits:
turn/startedhook/startedhook/completed
During the same window, two PowerShell hosts start, but Codex Desktop does not persist enough execution evidence to identify the configured child process or determine its result. The production hook telemetry remains byte-for-byte unchanged, stdout parsing is not reached, and no additionalContext is attached.
Configured command
"C:\Program Files\PowerShell\7\pwsh.exe" -NoProfile -NonInteractive -File "<PROJECT_ROOT>\memory\SESSION-CONTINUITY\hooks\itagent-continuity.ps1" -Event userPromptSubmit
The handler is trusted, syntactically valid, and succeeds when invoked directly. Direct validation confirms:
- exit code
0 - valid JSON
- expected
hookSpecificOutput.additionalContextshape - correct variable expansion
- privacy/output-shape checks pass
Reproduction
- Configure and trust a project-local
UserPromptSubmithook that invokes PowerShell 7 with-NoProfile -NonInteractive -File ... -Event userPromptSubmit. - Add a durable marker at the first executable line of the production script.
- Send a later-turn prompt in Codex Desktop.
- Observe
hook/startedandhook/completedin Desktop logs. - Observe that the production script's first marker is never written.
- Observe that no model-visible
additionalContextis attached.
Actual behavior
- Hook orchestration starts and completes generically.
- The configured production script does not reach entry telemetry.
- Actual child command line, resolved image path, parent/child PID relation, spawn result, exit code, stdout, and stderr are not persisted.
hook/completeddoes not prove successful execution, valid JSON, or empty stderr.- Stdout parsing and context attachment are not reached.
Expected behavior
Codex Desktop should:
- launch the exact trusted hook command;
- capture spawn result, exit code, stdout, and stderr;
- parse valid hook JSON;
- attach
additionalContextto the model input; - persist enough diagnostic information to distinguish launch failure, child-process failure, parse failure, and attachment failure.
Evidence summary
- Repaired hook SHA-256:
19ebea91b6302633f64aac5206bbc7990b66c3c3c90063d9e5c85da762d3b394 - Desktop app binary is validly signed by OpenAI.
- Two PowerShell processes started between
turn/startedandhook/completed, but neither could be safely attributed to the configured hook. - Production telemetry remained unchanged at 12 records.
- Repeated
MoAppCrashevents with problem codec06d007fwere temporally correlated with several affected turns, but causation is not claimed. - No project hook/config/trust change occurred during reproduction.
Failure boundary
The product selects the trusted hook and begins orchestration, but execution fails somewhere between PowerShell host startup and production-script entry. The exact sub-boundary remains hidden because Desktop does not persist child-command, exit, stdout, or stderr details.
A privacy-minimised maintainer package exists locally with reproduction, crash evidence, and verification manifests. I can provide specific sanitized excerpts requested by maintainers.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Related open regression: #21639 documents Codex Desktop hooks failing after an update, including cases where the same hooks succeed through CLI but not Desktop/app-server execution. This Windows report is narrower: Desktop emits
hook/startedandhook/completed, PowerShell hosts appear, but the configured script never reaches its first durable marker and noadditionalContextis attached. No safe ITAgent-side repair is currently evidence-supported. Please treat this issue as unresolved until Desktop child-command execution and result handling are fixed or a supported migration/workaround is documented.Thanks for documenting this. I may be seeing the same execution boundary on Windows Desktop, with a native executable rather than PowerShell.
Environment:
%PLUGIN_ROOT%\dist\usetokensaver-hook.exeObserved:
This does not appear to be the quoted-path/cmd.exe case in #32402 because the configured command contains no quoted executable path.
Could maintainers confirm whether Desktop persists the child-process spawn result, exit code, stdout, and stderr for a trusted UserPromptSubmit hook, and whether plugin-bundled hooks are supported on this surface? A redacted diagnostic or supported workaround would help.