Skip to content

Codex app-server terminal idle timeout is hardcoded and reports misleading config guidance #85242

Description

@chac4l

Summary

A scheduled agent turn using the Codex app-server runtime can fail at the internal terminal-idle watchdog even when the scheduled job already has a longer run-specific timeout configured. The surfaced error currently tells users to increase agents.defaults.timeoutSeconds, but that setting is not the actual limiting timeout in this failure mode.

Observed

  • OpenClaw version: 2026.5.18.
  • A scheduled agentTurn using codex/gpt-5.5 had timeoutSeconds set above 30 minutes.
  • The run failed after roughly 30 minutes with the internal log message:
    • codex app-server turn idle timed out waiting for terminal event
    • timeoutMs=1800000
  • The user-facing error was:
    • Request timed out before a response was generated. Please try again, or increase agents.defaults.timeoutSeconds in your config.

Expected

  • The Codex app-server terminal-idle watchdog should be configurable or derived from the effective run timeout ceiling.
  • If this watchdog fires, diagnostics should name the actual limiting timeout instead of pointing only to agents.defaults.timeoutSeconds.
  • A run-specific timeout should not be silently superseded by a lower hardcoded internal Codex terminal-idle timeout.

Local mitigation used

A local hotfix made the Codex terminal-idle timeout configurable via an environment variable and increased the affected scheduled job timeout so the outer job budget is higher than the internal idle watchdog.

This issue is for upstreaming the behavior cleanly rather than relying on local patched bundled files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions