openclaw - 💡(How to fix) Fix [Feature]: Add configurable Gateway CLI timeout and session isolation [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70631Fetched 2026-04-24 05:55:25
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×2

Gateway-level timeout configuration for CLI agent calls to prevent main session contention issues.

Root Cause

  • CLI calls with independent --session-id still timeout
  • Default --timeout 600s vs actual ~30s RPC timeout mismatch
  • Root cause: Gateway RPC + main session queue contention
  • No gateway.timeout.cli in current openclaw.json schema

Fix Action

Fix / Workaround

DimensionAssessment
SeverityMedium — blocks automated workflows
FrequencyDaily during high-load
Consequence~+20 min/day manual workarounds
Backward compatibilityFully compatible (opt-in)

Code Example

{
  "gateway": {
    "timeout": {
      "cli": 300
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Gateway-level timeout configuration for CLI agent calls to prevent main session contention issues.

Problem

When the OpenClaw main agent session is under heavy load, incoming Gateway CLI calls queue up and timeout. Key symptoms:

  1. Main session contention — All CLI calls must pass through the main session event loop
  2. No configurable timeout — Gateway offers no gateway.timeout.cli parameter
  3. Early timeout despite nominal 600s — RPC layer has ~30s timeout, not user-configurable
  4. Cross-agent collaboration blocked — Impacts HCTO↔OCTO bidirectional collaboration

Proposed Solution

Option 1 — Add gateway.timeout.cli Configuration

{
  "gateway": {
    "timeout": {
      "cli": 300
    }
  }
}

Option 2 — Session Isolation for CLI Calls

Allow independent session pool for CLI calls, bypassing main session queue.

Option 3 — --session-id Failover Mechanism

Auto-redirect to fallback session when main is busy.

Recommended: Option 1 short term, Option 3 medium term, Option 2 long term.

Impact

DimensionAssessment
SeverityMedium — blocks automated workflows
FrequencyDaily during high-load
Consequence~+20 min/day manual workarounds
Backward compatibilityFully compatible (opt-in)

Evidence

  • CLI calls with independent --session-id still timeout
  • Default --timeout 600s vs actual ~30s RPC timeout mismatch
  • Root cause: Gateway RPC + main session queue contention
  • No gateway.timeout.cli in current openclaw.json schema

References

  • OpenClaw Gateway Configuration: openclaw.json schema
  • CLI flag: --timeout (currently only affects local client)
  • Related: HCTO ↔ OCTO bidirectional collaboration (internal)

extent analysis

TL;DR

Implementing a configurable gateway-level timeout for CLI agent calls, such as adding a gateway.timeout.cli parameter, is likely to mitigate the main session contention issues.

Guidance

  • Review the proposed solution options, focusing on adding a gateway.timeout.cli configuration to increase the timeout value beyond the current ~30s RPC layer timeout.
  • Consider the trade-offs between the proposed options: Option 1 for a short-term fix, Option 3 for a medium-term solution, and Option 2 for a long-term architectural change.
  • Evaluate the impact of each option on backward compatibility, severity, frequency, and consequence of the issue, as outlined in the impact assessment table.
  • Verify the effectiveness of any chosen solution by monitoring the behavior of CLI calls under heavy load and checking for improvements in timeout issues and session contention.

Example

{
  "gateway": {
    "timeout": {
      "cli": 300
    }
  }
}

This example illustrates how to add a gateway.timeout.cli parameter to the openclaw.json schema, as proposed in Option 1.

Notes

The choice of solution depends on the specific requirements and constraints of the system, including the need for backward compatibility and the severity of the issue. It's essential to carefully evaluate each option and consider potential side effects before implementing a fix.

Recommendation

Apply Option 1 (add gateway.timeout.cli configuration) as a short-term workaround to quickly address the issue, given its simplicity and compatibility with the current system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Add configurable Gateway CLI timeout and session isolation [2 comments, 2 participants]