openclaw - 💡(How to fix) Fix [Bug]: openclaw tui crashes with Maximum call stack size exceeded during schema compilation [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#62430Fetched 2026-04-08 03:04:22
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
1
Timeline (top)
commented ×2labeled ×2

openclaw tui crashes immediately on startup with RangeError: Maximum call stack size exceeded during JSON schema compilation

Error Message

Error trace from openclaw tui:

Failed to read config at C:\Users\liuqy.openclaw\openclaw.json RangeError: Maximum call stack size exceeded at writeOrBuffer (node:internal/streams/writable:567:21) at _write (node:internal/streams/writable:499:10) at Writable.write (node:internal/streams/writable:508:10) at console.error (node:internal/console/constructor:444:26) at writeConsoleLine Error compiling schema, function code: [enormous generated validator function] 17:49:28+08:00 [plugins] minimax failed to load: RangeError: Maximum call stack size exceeded 17:49:33+08:00 [plugins] google failed to load: RangeError: Maximum call stack size exceeded

Full log attached: 新建 文本文档 (2).txt (on desktop)

Note: openclaw plugins list --verbose runs successfully with no errors.

Root Cause

openclaw tui crashes immediately on startup with RangeError: Maximum call stack size exceeded during JSON schema compilation

Fix Action

Fix / Workaround

Affected: Users attempting to run openclaw tui on this system Severity: High (completely blocks TUI, though openclaw web works as workaround) Frequency: Always/reproducible Consequence: Cannot use the terminal UI; must use browser-based web UI instead

Code Example

Error trace from `openclaw tui`:

Failed to read config at C:\Users\liuqy\.openclaw\openclaw.json RangeError: Maximum call stack size exceeded
    at writeOrBuffer (node:internal/streams/writable:567:21)
    at _write (node:internal/streams/writable:499:10)
    at Writable.write (node:internal/streams/writable:508:10)
    at console.error (node:internal/console/constructor:444:26)
    at writeConsoleLine
Error compiling schema, function code: [enormous generated validator function]
17:49:28+08:00 [plugins] minimax failed to load: RangeError: Maximum call stack size exceeded
17:49:33+08:00 [plugins] google failed to load: RangeError: Maximum call stack size exceeded


Full log attached: 新建 文本文档 (2).txt (on desktop)

Note: `openclaw plugins list --verbose` runs successfully with no errors.
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

openclaw tui crashes immediately on startup with RangeError: Maximum call stack size exceeded during JSON schema compilation

Steps to reproduce

  1. Run openclaw tui on Windows 11
  2. Observe immediate crash with "Maximum call stack size exceeded" error in the console
  3. The TUI never starts and no connection is established

Expected behavior

TUI starts normally and connects to the gateway, displaying the chat interface ready for user input.

Actual behavior

TUI crashes immediately with "RangeError: Maximum call stack size exceeded" during config/schema compilation. Error originates from ajv JSON Schema validator compiling a deeply nested schema. The error log shows the generated validator function code is extremely large, causing V8 stack overflow. Notably, openclaw plugins list --verbose runs successfully (53/94 plugins loaded), and openclaw web works fine.

OpenClaw version

2026.4.5 (3e72c03)

Operating system

Windows 11 23H2 (Build 22631)

Install method

npm global

Model

minimax/MiniMax-M2.7

Provider / routing chain

openclaw -> minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Error trace from `openclaw tui`:

Failed to read config at C:\Users\liuqy\.openclaw\openclaw.json RangeError: Maximum call stack size exceeded
    at writeOrBuffer (node:internal/streams/writable:567:21)
    at _write (node:internal/streams/writable:499:10)
    at Writable.write (node:internal/streams/writable:508:10)
    at console.error (node:internal/console/constructor:444:26)
    at writeConsoleLine
Error compiling schema, function code: [enormous generated validator function]
17:49:28+08:00 [plugins] minimax failed to load: RangeError: Maximum call stack size exceeded
17:49:33+08:00 [plugins] google failed to load: RangeError: Maximum call stack size exceeded


Full log attached: 新建 文本文档 (2).txt (on desktop)

Note: `openclaw plugins list --verbose` runs successfully with no errors.

Impact and severity

Affected: Users attempting to run openclaw tui on this system Severity: High (completely blocks TUI, though openclaw web works as workaround) Frequency: Always/reproducible Consequence: Cannot use the terminal UI; must use browser-based web UI instead

Additional information

The error occurs specifically during TUI startup, likely in the ajv JSON Schema validator compilation phase. The generated validator function is extremely large and causes V8 stack overflow. Node.js version: v24.14.1. This is likely an ajv schema compilation bug triggered by a deeply nested or extremely complex schema structure in one of the plugins or main config.

extent analysis

TL;DR

The issue can likely be fixed by updating or modifying the JSON schema to reduce its complexity and prevent the V8 stack overflow during compilation.

Guidance

  • Investigate the openclaw.json config file and plugins for deeply nested or complex schema structures that may be causing the issue.
  • Run openclaw plugins list --verbose to identify which plugins are loaded successfully and which ones are failing, and focus on the failing plugins' schema definitions.
  • Consider simplifying or refactoring the schema to reduce its complexity and prevent the V8 stack overflow.
  • As a temporary workaround, use the openclaw web command instead of openclaw tui to access the chat interface.

Example

No specific code example can be provided without more information about the schema structure, but reducing nested objects and arrays in the schema definition may help alleviate the issue.

Notes

The issue is specific to the openclaw tui command and does not affect openclaw web, suggesting that the problem lies in the TUI's schema compilation process. The openclaw plugins list --verbose command running successfully indicates that the issue is not with the plugins themselves, but rather with the schema compilation.

Recommendation

Apply a workaround by using openclaw web until the schema can be modified or updated to prevent the V8 stack overflow. This will allow users to access the chat interface while the issue is being resolved.

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

TUI starts normally and connects to the gateway, displaying the chat interface ready for user input.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING