openclaw - ✅(Solved) Fix fix(cron): nested lane maxConcurrent defaults to 1, serializing all cron LLM executions [1 pull requests, 3 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#72707Fetched 2026-04-28 06:33:10
View on GitHub
Comments
3
Participants
2
Timeline
7
Reactions
0
Timeline (top)
commented ×3closed ×1cross-referenced ×1mentioned ×1

Fix Action

Fix

Add the missing setCommandLaneConcurrency call for CommandLane.Nested in applyGatewayLaneConcurrency():

setCommandLaneConcurrency(CommandLane.Nested, cfg.cron?.maxConcurrentRuns ?? 1);

PR incoming.

PR fix notes

PR #72708: fix(cron): set nested lane concurrency to match maxConcurrentRuns

Description (problem / solution / changelog)

Fixes #72707

Problem

applyGatewayLaneConcurrency() configures concurrency for Cron, Main, and Subagent lanes but not Nested. Since cron job LLM execution is routed from the cron lane to the nested lane (to avoid deadlocks), the missing configuration means nested defaults to maxConcurrent: 1, serializing all cron LLM executions regardless of cron.maxConcurrentRuns.

Fix

Add setCommandLaneConcurrency(CommandLane.Nested, cfg.cron?.maxConcurrentRuns ?? 1) to applyGatewayLaneConcurrency() so the nested lane respects the user's configured concurrency.

Changes

  • src/gateway/server-lanes.ts: Add nested lane concurrency configuration
  • src/gateway/server-lanes.test.ts: 4 new tests covering nested lane behavior

Testing

All new tests pass. The fix is a single additional setCommandLaneConcurrency call using the same config value that already controls the cron scheduling lane.

Changed files

  • src/gateway/server-lanes.test.ts (added, +68/-0)
  • src/gateway/server-lanes.ts (modified, +1/-0)

Code Example

if (cleaned === CommandLane.Cron) return CommandLane.Nested;

---

lane wait exceeded: lane=nested waitedMs=451520 queueAhead=22
lane wait exceeded: lane=nested waitedMs=1380756 queueAhead=0

---

setCommandLaneConcurrency(CommandLane.Nested, cfg.cron?.maxConcurrentRuns ?? 1);
RAW_BUFFERClick to expand / collapse

Bug

cron.maxConcurrentRuns controls the concurrency of the cron command lane, but cron jobs' actual LLM execution is routed to the nested lane via resolveGlobalLane() in src/agents/pi-embedded-runner/lanes.ts:

if (cleaned === CommandLane.Cron) return CommandLane.Nested;

The nested lane is never configured by applyGatewayLaneConcurrency() in src/gateway/server-lanes.ts, so it defaults to maxConcurrent: 1 (from src/process/command-queue.ts).

This means all cron LLM executions are serialized regardless of maxConcurrentRuns. Setting maxConcurrentRuns: 50 allows 50 cron jobs to be scheduled simultaneously, but only 1 can execute at a time.

Evidence

Gateway diagnostic logs show tasks queuing in the nested lane:

lane wait exceeded: lane=nested waitedMs=451520 queueAhead=22
lane wait exceeded: lane=nested waitedMs=1380756 queueAhead=0

22 tasks queuing, wait times up to 23 minutes.

Expected behavior

The nested lane should respect cron.maxConcurrentRuns so that the configured number of cron jobs can execute LLM calls concurrently.

Fix

Add the missing setCommandLaneConcurrency call for CommandLane.Nested in applyGatewayLaneConcurrency():

setCommandLaneConcurrency(CommandLane.Nested, cfg.cron?.maxConcurrentRuns ?? 1);

PR incoming.

extent analysis

TL;DR

To fix the serialization of cron LLM executions, add a setCommandLaneConcurrency call for CommandLane.Nested in applyGatewayLaneConcurrency() to respect cron.maxConcurrentRuns.

Guidance

  • Identify the applyGatewayLaneConcurrency function in src/gateway/server-lanes.ts and add the missing setCommandLaneConcurrency call for CommandLane.Nested.
  • Verify that the nested lane is properly configured by checking the gateway diagnostic logs for queue wait times and task execution concurrency.
  • Test the fix by setting maxConcurrentRuns to a value greater than 1 and observing the execution of cron jobs to ensure they are running concurrently.
  • Review the code changes to ensure that the setCommandLaneConcurrency call is correctly implemented and does not introduce any unintended side effects.

Example

setCommandLaneConcurrency(CommandLane.Nested, cfg.cron?.maxConcurrentRuns ?? 1);

This code snippet adds the missing setCommandLaneConcurrency call for CommandLane.Nested, allowing the nested lane to respect cron.maxConcurrentRuns and execute cron jobs concurrently.

Notes

The fix assumes that the setCommandLaneConcurrency function is correctly implemented and that the cfg.cron?.maxConcurrentRuns value is properly configured. Additional testing and verification may be necessary to ensure the fix works as expected in all scenarios.

Recommendation

Apply the workaround by adding the setCommandLaneConcurrency call for CommandLane.Nested in applyGatewayLaneConcurrency(), as this will allow cron jobs to execute concurrently and respect the configured maxConcurrentRuns value.

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…

FAQ

Expected behavior

The nested lane should respect cron.maxConcurrentRuns so that the configured number of cron jobs can execute LLM calls concurrently.

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 - ✅(Solved) Fix fix(cron): nested lane maxConcurrent defaults to 1, serializing all cron LLM executions [1 pull requests, 3 comments, 2 participants]