[Windows Desktop 26.707.9981.0] Trusted hook orchestration completes but PowerShell handler never reaches script entry

Open 💬 2 comments Opened Jul 16, 2026 by gianajf

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/started
  • hook/started
  • hook/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.additionalContext shape
  • correct variable expansion
  • privacy/output-shape checks pass

Reproduction

  1. Configure and trust a project-local UserPromptSubmit hook that invokes PowerShell 7 with -NoProfile -NonInteractive -File ... -Event userPromptSubmit.
  2. Add a durable marker at the first executable line of the production script.
  3. Send a later-turn prompt in Codex Desktop.
  4. Observe hook/started and hook/completed in Desktop logs.
  5. Observe that the production script's first marker is never written.
  6. Observe that no model-visible additionalContext is 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/completed does not prove successful execution, valid JSON, or empty stderr.
  • Stdout parsing and context attachment are not reached.

Expected behavior

Codex Desktop should:

  1. launch the exact trusted hook command;
  2. capture spawn result, exit code, stdout, and stderr;
  3. parse valid hook JSON;
  4. attach additionalContext to the model input;
  5. 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/started and hook/completed, but neither could be safely attributed to the configured hook.
  • Production telemetry remained unchanged at 12 records.
  • Repeated MoAppCrash events with problem code c06d007f were 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗