Codex Desktop: hard-coded 30s timeout for commit_message generation fails on large diffs
Open 💬 1 comment Opened Apr 25, 2026 by mushan0x0
Summary
Codex Desktop's commit-message generation has a hard-coded 30s timeout (var Ht=3e4 in workspace-root-drop-handler-*.js). For large diffs / long thread context where the model needs >30s to finish, the call always fails with Timed out waiting for structured result., even though the model is still streaming output successfully.
Reproduction
- Open a workspace with a sizable thread / accumulated context (~90k+ input tokens).
- Stage a non-trivial diff and click Generate commit message.
- Watch
~/Library/Logs/com.openai.codex/<date>/codex-desktop-*-t0-*.log.
Observed
[ephemeral-generation] ephemeral_generation_token_usage feature=commit_message
inputTokens=93340 outputTokens=87 ... status=error
[electron-fetch-handler] Failed to generate commit message
errorMessage="Timed out waiting for structured result."
stack: workspace-root-drop-handler-*.js:196
In our case inputTokens<=66k always succeeds; inputTokens~=93k always times out. Pattern is deterministic — the model is producing output (outputTokens>0), it just doesn't finish within 30s.
Expected
Either:
- Make the timeout configurable / scale with input size, or
- Trim/cap the context that's fed to the commit-message generator (it shouldn't need the full thread history just to summarize a staged diff).
Environment
- Codex Desktop 0.125.0-alpha.3
- macOS 26.4.1 (arm64)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗