openclaw - ✅(Solved) Fix fix(config): tighten Zod min constraints for channelStaleEventThresholdMinutes and channelMaxRestartsPerHour [1 pull requests, 1 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#61389Fetched 2026-04-08 02:59:08
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1renamed ×1

gateway.channelStaleEventThresholdMinutes and gateway.channelMaxRestartsPerHour exist in the Zod schema but have overly-tight or incorrect minimum constraints:

// current upstream
channelStaleEventThresholdMinutes: z.number().int().min(1).optional(),
channelMaxRestartsPerHour: z.number().int().min(1).optional(),

Root Cause

gateway.channelStaleEventThresholdMinutes and gateway.channelMaxRestartsPerHour exist in the Zod schema but have overly-tight or incorrect minimum constraints:

// current upstream
channelStaleEventThresholdMinutes: z.number().int().min(1).optional(),
channelMaxRestartsPerHour: z.number().int().min(1).optional(),

Fix Action

Fixed

PR fix notes

PR #61392: fix(config): tighten min constraints for channelStaleEventThresholdMinutes and channelMaxRestartsPerHour

Description (problem / solution / changelog)

Summary

  • channelMaxRestartsPerHour: min(1)min(0): allows 0 as "no restart limit / disabled". Users who want unlimited restarts currently have no valid value.
  • channelStaleEventThresholdMinutes: min(1)min(5): the default channelHealthCheckMinutes is 5. Allowing values below 5 creates a confusing state where the stale threshold fires before a health check can complete.

Change

- channelStaleEventThresholdMinutes: z.number().int().min(1).optional(),
- channelMaxRestartsPerHour: z.number().int().min(1).optional(),
+ channelStaleEventThresholdMinutes: z.number().int().min(5).optional(),
+ channelMaxRestartsPerHour: z.number().int().min(0).optional(),

src/config/zod-schema.ts only — no logic changes.

Closes #61389


AI-assisted PR — filed via Claude Code on behalf of @Arry8.

Changed files

  • src/config/zod-schema.ts (modified, +2/-2)

Code Example

// current upstream
channelStaleEventThresholdMinutes: z.number().int().min(1).optional(),
channelMaxRestartsPerHour: z.number().int().min(1).optional(),

---

channelStaleEventThresholdMinutes: z.number().int().min(5).optional(),
channelMaxRestartsPerHour: z.number().int().min(0).optional(),
RAW_BUFFERClick to expand / collapse

Context

gateway.channelStaleEventThresholdMinutes and gateway.channelMaxRestartsPerHour exist in the Zod schema but have overly-tight or incorrect minimum constraints:

// current upstream
channelStaleEventThresholdMinutes: z.number().int().min(1).optional(),
channelMaxRestartsPerHour: z.number().int().min(1).optional(),

Problems

  1. channelMaxRestartsPerHour: min(1) — disallows 0, which is a natural value meaning "no restart limit". Users who want unlimited restarts have no valid value to set.

  2. channelStaleEventThresholdMinutes: min(1) — the gateway default health-check interval is 5 minutes (channelHealthCheckMinutes defaults to 5). Allowing values below 5 creates a confusing/useless state where the stale threshold fires before a health check can even complete.

Suggested Fix

channelStaleEventThresholdMinutes: z.number().int().min(5).optional(),
channelMaxRestartsPerHour: z.number().int().min(0).optional(),

Reproduced on fork Arry8/openclaw — fix verified in commit 901098dbc5. AI-assisted issue — filed via Claude Code.

extent analysis

TL;DR

Update the Zod schema to adjust the minimum constraints for gateway.channelStaleEventThresholdMinutes and gateway.channelMaxRestartsPerHour to min(5) and min(0) respectively.

Guidance

  • Review the current Zod schema and identify the lines where channelStaleEventThresholdMinutes and channelMaxRestartsPerHour are defined.
  • Update the min constraint for channelStaleEventThresholdMinutes to 5 to ensure it aligns with the default health-check interval.
  • Update the min constraint for channelMaxRestartsPerHour to 0 to allow for unlimited restarts.
  • Verify the changes by testing the updated schema with various input values.

Example

// updated schema
channelStaleEventThresholdMinutes: z.number().int().min(5).optional(),
channelMaxRestartsPerHour: z.number().int().min(0).optional(),

Notes

The suggested fix assumes that the default health-check interval is indeed 5 minutes and that allowing values below this threshold would create a confusing state.

Recommendation

Apply the workaround by updating the Zod schema as suggested, to ensure that the constraints are reasonable and functional.

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 - ✅(Solved) Fix fix(config): tighten Zod min constraints for channelStaleEventThresholdMinutes and channelMaxRestartsPerHour [1 pull requests, 1 participants]