What version of the Codex App are you using (From “About Codex” dialog)?
26.721.41059
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
User-defined SessionStart lifecycle hooks are detected by Codex Desktop and appear correctly in the Hooks UI, but the configured command is never executed.
The hook is listed under the User Config hooks, its status message is displayed during session startup, but no process is launched and no side effects occur.
This makes SessionStart hooks unusable for startup automation.
What steps can reproduce the bug?
- Create a
hooks.json file containing a simple SessionStart hook that executes a command (for example, launching PowerShell, Notepad, Calculator, or creating a file).
{
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{
"type": "command",
"command": "powershell.exe -NoExit -NoProfile -Command \"Write-Host 'Hello, World';\"",
"statusMessage": "Opening PowerShell...",
"timeout": 30
}
]
}
]
}
}
-
Restart Codex Desktop.
-
Open Settings → Hooks and click Trust for the discovered hook.
-
Start a new Codex session.
Commands tested include:
powershell.exe -NoExit -NoProfile -Command "Write-Host 'Hello, World'"
cmd.exe /c echo Hook executed > %TEMP%\codex-hook-test.txt
notepad.exe
calc.exe
Observed behavior:
- The hook appears correctly in the Hooks UI.
- The hook can be trusted.
- The configured status message is displayed when the session starts.
- None of the configured commands are executed.
- No PowerShell window opens.
- Notepad and Calculator do not launch.
- The test file is never created.
What is the expected behavior?
SessionStart command hooks should execute the configured command when a new session starts.
For the examples above:
- PowerShell should open and display the configured message.
- Notepad or Calculator should launch.
- The test file should be created in the Temp directory.
If the hook configuration is invalid or unsupported, Codex Desktop should display a clear error message instead of silently ignoring the command.
Additional information
Environment:
The hook is marked as Trusted.
The Hooks UI successfully discovers the SessionStart hook and displays it under User Config, including the configured matcher, timeout and status message. This suggests the hook is being parsed correctly, but the command itself is never executed.
I originally discovered this while trying to use a SessionStart hook to trigger the Windows permission prompt for PowerShell before running autonomous tasks. During testing it became clear that no command executes at all, regardless of whether it launches PowerShell, Notepad, Calculator or simply creates a file.
What version of the Codex App are you using (From “About Codex” dialog)?
26.721.41059
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
User-defined SessionStart lifecycle hooks are detected by Codex Desktop and appear correctly in the Hooks UI, but the configured command is never executed.
The hook is listed under the User Config hooks, its status message is displayed during session startup, but no process is launched and no side effects occur.
This makes SessionStart hooks unusable for startup automation.
What steps can reproduce the bug?
hooks.jsonfile containing a simpleSessionStarthook that executes a command (for example, launching PowerShell, Notepad, Calculator, or creating a file).{ "hooks": { "SessionStart": [ { "matcher": "startup", "hooks": [ { "type": "command", "command": "powershell.exe -NoExit -NoProfile -Command \"Write-Host 'Hello, World';\"", "statusMessage": "Opening PowerShell...", "timeout": 30 } ] } ] } }Restart Codex Desktop.
Open Settings → Hooks and click Trust for the discovered hook.
Start a new Codex session.
Commands tested include:
powershell.exe -NoExit -NoProfile -Command "Write-Host 'Hello, World'"cmd.exe /c echo Hook executed > %TEMP%\codex-hook-test.txtnotepad.execalc.exeObserved behavior:
What is the expected behavior?
SessionStart command hooks should execute the configured command when a new session starts.
For the examples above:
If the hook configuration is invalid or unsupported, Codex Desktop should display a clear error message instead of silently ignoring the command.
Additional information
Environment:
The hook is marked as Trusted.
The Hooks UI successfully discovers the SessionStart hook and displays it under User Config, including the configured matcher, timeout and status message. This suggests the hook is being parsed correctly, but the command itself is never executed.
I originally discovered this while trying to use a SessionStart hook to trigger the Windows permission prompt for PowerShell before running autonomous tasks. During testing it became clear that no command executes at all, regardless of whether it launches PowerShell, Notepad, Calculator or simply creates a file.