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

  1. Open a workspace with a sizable thread / accumulated context (~90k+ input tokens).
  2. Stage a non-trivial diff and click Generate commit message.
  3. 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)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗