Repository navigation
Description
Summary
A single bad model config entry can take down the whole gateway control plane instead of failing as an isolated terminal model error.
In our case, adding a new model alias/reference for v3d/fable was accepted by config hot reload. The provider later rejected the model with a terminal 4xx-style error (Model not available: fable). After that, the subagent completion/announce path started retrying and self-polling chat.history, driving the Node gateway event loop into starvation. Systemd still considered the gateway process running, but OpenClaw became unresponsive/degraded.
Environment
- OpenClaw package version:
2026.6.5 - Install shape: global npm package under systemd
- Service:
openclaw-gateway.service - Gateway process: Node.js, single service process
- Platform: Linux/systemd
Reproduction Shape
- Add a model entry to a provider config for a model name that the upstream provider/API key does not actually allow, e.g.
v3d/fable. - Expose that same model through agent/default model configuration.
- Let gateway hot-reload the config.
- Trigger a subagent/model smoke request using that model.
Expected Behavior
One of these should happen:
- The config/model update is rejected before it becomes active because the model cannot be resolved or smoke-tested.
- The subagent run fails once with a terminal provider/model error.
- The parent session receives a bounded failure result.
- The gateway remains responsive and
openclaw healthcontinues to work.
Actual Behavior
The provider returned a terminal model error:
LLM request failed: provider rejected the request schema or tool payload
rawError={"error":{"type":"invalid_request_error","message":"Model not available: fable"}}
After that, logs showed the subagent completion announce path failing/retrying, for example:
Subagent completion direct announce failed ... completion agent did not produce a visible reply
Subagent announce give up (retry-limit) ... retries=3
During the retry window the gateway repeatedly issued chat.history control-plane calls and the event loop degraded badly:
- gateway Node main thread around 100% CPU
- event loop utilization effectively saturated
openclaw health/ gateway RPCs hung or reported degraded- systemd still showed
openclaw-gateway.serviceas active/running
Removing the bad v3d/fable references from config and restarting openclaw-gateway.service cleared the issue. After restart, openclaw health returned normal event-loop metrics again.
Why This Seems Like a Runtime Bug
The initial bad edit was a user/config error, but the blast radius looks too large. A terminal model_not_available / invalid_request_error from a provider should not enter an announce/retry path that can saturate the gateway event loop or make unrelated gateway RPCs unresponsive.
A likely fix would be some combination of:
- classify provider
model_not_available/ terminal 4xx errors as non-retryable for subagent completion announce; - cap or circuit-break
chat.historyself-poll/retry behavior; - guarantee the parent session is woken with a bounded failure when subagent announce delivery fails;
- validate/smoke-test newly-added model refs before hot-reload makes them selectable by agents;
- make watchdog/health recovery aware of event-loop starvation, not just process liveness.
Related Issues
This looks related but not identical to existing issues:
- Subagent announce give-up (retry-limit/expiry) does not wake parent waiting on sessions_yield → permanent deadlock #90178 - subagent announce give-up / parent deadlock
- [Bug]: Subagent announce 3x duplicate still reproduces on 2026.6.1 release + Telegram — #89812 only fixes outbound/deliver path, not subagent-announce-delivery #91527 - subagent announce delivery retry/idempotency problems
- [Feature]: Detect and recover from gateway hangs via systemd WatchdogSec #11973 - gateway hang detection/recovery via systemd watchdog
- [Bug]: config accepts plugin/runtime/model edits that leave agent model refs unresolvable #84212 - config accepts model/plugin edits that leave refs unresolved
- Bug: Feishu DM Session Enters Infinite Loop After Subagent Announce Trigger #91307 - announce-triggered loop / event-loop pressure on a different surface
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 10, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 11:07 PM ET / 03:07 UTC.
Summary
Keep open. Current main still does not clearly handle the reported provider wording as a terminal model-not-found path, and the subagent announce cleanup path still contains requester
chat.historyprobing plus retry/give-up behavior; related reports cover adjacent pieces but no merged fix owns this full failure shape.Reproducibility: no. high-confidence live reproduction was run in this read-only review. Source inspection does show that the exact reported provider wording is not handled by the current model-not-found patterns and that announce cleanup can still call
chat.historyduring the retry/give-up path.Ways to help us reproduce this
Next step
Manual review is the right lane because the item is already marked for no new fix PR plus product/live-repro review, and the safe fix crosses provider semantics, subagent delivery, config validation, and gateway availability behavior.
Review details
Best possible solution:
Land a maintainer-approved bounded failure path that classifies terminal model-unavailable provider errors correctly, prevents announce cleanup from amplifying control-plane polling, wakes or blocks the parent completion deterministically, and tracks config hot-reload validation separately if needed.
Do we have a high-confidence way to reproduce the issue?
No high-confidence live reproduction was run in this read-only review. Source inspection does show that the exact reported provider wording is not handled by the current model-not-found patterns and that announce cleanup can still call
chat.historyduring the retry/give-up path.Is this the best way to solve the issue?
Unclear as a single automatic fix. The narrowest maintainable direction likely combines provider error classification with bounded announce delivery semantics, while config hot-reload rejection and watchdog recovery need maintainer product choices.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against a1828110704f.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P1: The report describes a real gateway/session workflow becoming unresponsive after a provider model error, which is an urgent runtime stability issue.impact:session-state: The failure is centered on subagent completion announce state and parent-session wakeup behavior.impact:auth-provider: The trigger is provider/model routing accepting a model reference later rejected by the upstream provider.impact:crash-loop: The observed impact is gateway event-loop starvation and health/RPC unresponsiveness even while the process remains running.Evidence reviewed
What I checked:
Model not available: fablewording on current main. (src/agents/live-model-errors.ts:8, a1828110704f)format, so the reportedinvalid_request_errorpayload still needs explicit model-availability handling or provider classification. (src/agents/embedded-agent-helpers/errors.ts:873, a1828110704f)model_not_availableorModel not availableis not listed as a permanent announce-delivery error. (src/agents/subagent-announce-delivery.ts:371, a1828110704f)chat.historywhen looking for a prior completion mirror; the path is bounded but remains part of the announce cleanup/retry surface reported here. (src/agents/subagent-registry-lifecycle.ts:250, a1828110704f)src/agents/subagent-registry-lifecycle.ts:880, a1828110704f)Model not availablesubagent announce path. (a1828110704f)Likely related people:
src/agents/subagent-registry-lifecycle.ts)src/agents/subagent-announce-delivery.ts)src/agents/live-model-errors.ts,src/agents/subagent-registry-lifecycle.ts)src/agents/live-model-errors.ts,src/agents/embedded-agent-helpers/errors.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.houleixx commentedon Jun 21, 2026
openclaw-barnacle commentedon Jul 6, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 14, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.