Skip to content

Feature: noOutputTimeoutMs for API provider responses (stuck streaming connections) #28617

Description

@kinnoautomations-dot

Problem

When using openai-codex/gpt-5.2-codex as a subagent model, ~10% of runs get stuck: the tool call completes and returns a result, but the subsequent API call to the provider never returns. No error, no timeout — the connection just hangs indefinitely.

Current Behavior

  • timeoutSeconds (agent-level) is the only timeout that eventually kills these stuck runs
  • But it's a blunt instrument: it also limits successful long-running tasks
  • noOutputTimeoutMs exists for CLI tools (exec watchdog) but not for API provider streaming responses

Proposed Fix

Add noOutputTimeoutMs config for API provider connections:

  • If no data (tokens/chunks) arrives from the provider within X ms, abort and retry
  • Could be configured per-provider or globally
  • Suggested default: 120000ms (2 min)

Data

  • 21 Codex subagent runs today, 2 stuck (10% failure rate)
  • Both stuck runs: last tool result returned successfully, then next API call hung
  • No error in logs, no stream error, just silence
  • Only killed by service restart

Environment

  • OpenClaw v2026.2.26
  • Provider: openai-codex/gpt-5.2-codex
  • thinking=xhigh

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions