Skip to content

Cron agent turn can perform side effects then time out before final artifact delivery #85526

Description

@chac4l

Summary

A scheduled Codex app-server agent turn can successfully perform the requested side effect, then stall before emitting the final assistant artifact. OpenClaw marks the cron run as failed and sends a timeout alert even though the external artifact exists.

This is distinct from a pure pre-side-effect timeout: the scheduler currently has no reconciliation step that can detect the already-created artifact and convert the run into a successful or partially successful result.

Observed

  • OpenClaw version: 2026.5.18.
  • Runtime: Codex app-server via a scheduled agentTurn.
  • The job created and pushed the expected GitHub pull request.
  • Later, the turn hit terminal idle timeout and surfaced:
    • Request timed out before a response was generated. Please try again, or increase agents.defaults.timeoutSeconds in your config.
  • Internal diagnostic for the timed-out turn showed the last activity was a completed reasoning item, followed by no terminal event until the watchdog fired.
  • The cron state became failed and triggered a failure alert, even though a fresh GitHub query showed the expected PR artifact existed.

Expected

For scheduled jobs with explicit completion artifacts, OpenClaw should support one or both of:

  • A post-timeout reconciliation hook/check that can inspect declared artifacts and emit a verified partial/success state when the side effect exists.
  • More specific timeout diagnostics that distinguish no side effect performed from side effect performed but final assistant message was not captured.

At minimum, the user-facing timeout guidance should not imply that increasing only agents.defaults.timeoutSeconds is the correct fix when the failure is an app-server terminal-idle stall after side effects.

Local mitigation used

The affected cron prompt was tightened to:

  • Preflight-check for an existing matching PR and exit without creating duplicates.
  • Finish immediately after verifying the PR exists instead of waiting for CI/review/secondary systems.
  • Use a lower reasoning setting for this small-refactor creator job.

A separate review/merge cron was then run to reconcile the existing PR.

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-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions