#OpenClaw's web UI (Control UI) frequently truncates messages over ~4,000 characters

1 messages · Page 1 of 1 (latest)

peak hare
#

any idea how to increase this value i have this message in openclaw ui ...(truncated)...

dense loomBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

noble templeBOT
#

Yep — for the Control UI/chat history truncation, the setting is:

openclaw config set gateway.webchat.chatHistoryMaxChars 50000 --strict-json
openclaw config validate
openclaw gateway restart

You can pick a different value; schema currently caps it at 500000. The relevant docs are here: https://docs.openclaw.ai/web/webchat

Small note: the default in current source is 8000 chars per text field, and the UI also has separate very-large render guards. If you’re seeing truncation around ~4000 after raising this, please share openclaw --version and a screenshot/text of the exact truncation message so we can tell whether it’s WebChat history vs a channel/streaming limit.

peak hare
#

@noble temple my favorite bot ❤️

noble templeBOT
#

aww 🦞❤️ happy to help — especially when the UI is being a tiny gremlin.

peak hare
#

after i do your update the config is ok but check out ... again Let me know if that sounds like a reasonable path forward, or if you have any other questions.

Best
...(truncated)...

noble templeBOT
#

Yep, that exact ...(truncated)... still looks like the Gateway chat.history text cap, not the UI markdown renderer.

A couple likely gotchas:

  1. The Gateway has to be restarted after the config change:
openclaw gateway restart

Then hard-refresh the Control UI.

  1. Make sure the running gateway is reading the same config file you edited:
openclaw --version
openclaw config get gateway.webchat.chatHistoryMaxChars --json
openclaw gateway status
openclaw status --all
#
  1. If this was an already-generated message, try asking a new long-response prompt after the restart. Some paths can store already-projected/truncated text, so changing the history cap may not resurrect text that was saved truncated earlier.

For reference: gateway.webchat.chatHistoryMaxChars can go up to 500000, but there are still separate hard safety caps for oversized individual history payloads. Docs: https://docs.openclaw.ai/web/webchat

If you paste the output of those four commands, I can tell whether this is “config not loaded/restart needed” vs “another cap is hitting.”

peak hare
#

i need to do /new or /reset to be effective ?

noble templeBOT
#

Not strictly for the config to become active — the important part is restarting the gateway + refreshing the UI.

But for the message you’re already looking at: yes, use /new or /reset and generate a fresh reply. If that old response was already saved/projected as truncated, increasing chatHistoryMaxChars can’t recover the missing text retroactively.

So the clean test is:

openclaw config get gateway.webchat.chatHistoryMaxChars --json
openclaw gateway restart

Then hard-refresh Control UI, send /new (or /reset), and ask for a new long answer. If the new answer still truncates, then we’re hitting a different cap.

peak hare
#

$ node ~/Bureau/openclaw/openclaw.mjs config get gateway.webchat.chatHistoryMaxChars --json
50000
frank_macmini@macmini:~$

noble templeBOT
# peak hare $ node ~/Bureau/openclaw/openclaw.mjs config get gateway.webchat.chatHistoryMaxC...

That confirms the config file has gateway.webchat.chatHistoryMaxChars = 50000, but it doesn’t prove the running Gateway has picked it up yet.

Two useful next checks:

  1. Please run:
node ~/Bureau/openclaw/openclaw.mjs --version
  1. Restart the Gateway, then reload Control UI and test the same long message again. chatHistoryMaxChars is the right setting for chat.history truncation, per docs: https://docs.openclaw.ai/web/webchat

If it still cuts around ~4k after restart, that points to a different limit path than chat.history — likely live rendering/streaming or message chunking rather than history loading. In that case, the version number matters a lot so we can check whether you’re hitting a known/fixed bug.

peak hare
#

OpenClaw 2026.5.6 (71a6260)

noble templeBOT
# peak hare OpenClaw 2026.5.6 (71a6260)

Thanks. 2026.5.6 is old enough that I’d try updating before chasing config further. Between v2026.5.6 and v2026.5.12 there were several Control UI / WebChat history changes, including incremental chat deltas and session history handling.

Since your config already shows gateway.webchat.chatHistoryMaxChars: 50000, the practical next step is:

cd ~/Bureau/openclaw
pnpm install
pnpm build
node ./openclaw.mjs gateway restart

Or however you normally restart that source checkout’s Gateway after pulling/updating. Then hard-refresh Control UI and retry the same >4k message.

Docs for the setting: https://docs.openclaw.ai/web/webchat

If it still truncates on current stable (2026.5.12 or newer), please file it as a bug with:

  • your OpenClaw version
noble templeBOT
peak hare
#

I followed your commands and there's clearly a problem... here's the /status 🦞 OpenClaw 2026.5.6 (71a6260)
⏱️ Uptime: gateway 1m 6s · system 6d 4h frank_macmini@macmini:~/Bureau/openclaw$ pnpm install
Scope: all 125 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +8 -202 frank_macmini@macmini:~/Bureau/openclaw$ pnpm build

openclaw@2026.5.6 build /home/frank_macmini/Bureau/openclaw
node scripts/build-all.mjs

[build-all] canvas:a2ui:bundle

noble templeBOT
noble templeBOT
peak hare
#

frank_macmini@macmini:~/Bureau/openclaw$ pnpm install
Scope: all 125 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +8 -202
++++------------------------------------------------------------------------------------------------------------------
Progress: resolved 0, reused 210, downloaded 0, added 8, done
node_modules/@whiskeysockets/baileys: Running preinstall script, done in 98ms
. preinstall$ node scripts/preinstall-package-manager-warning.mjs
└─ Done in 49ms
. postinstall$ node scripts/postinstall-bundled-plugins.mjs
└─ Done in 540ms
. prepare$ command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.h…
└─ Done in 13ms
Done in 10.4s using pnpm v10.33.2
frank_macmini@macmini:~/Bureau/openclaw$ pnpm build

openclaw@2026.5.6 build /home/frank_macmini/Bureau/openclaw
node scripts/build-all.mjs

[build-all] canvas:a2ui:bundle

openclaw@2026.5.6 canvas:a2ui:bundle /home/frank_macmini/Bureau/openclaw
node scripts/bundle-a2ui.mjs

[build-all] runtime-postbuild-stamp
[build-all] build:plugin-sdk:dts (cached)
[build-all] write-plugin-sdk-entry-dts
[build-all] check-plugin-sdk-exports
OK: All 4 required plugin-sdk exports verified.
[build-all] canvas-a2ui-copy (cached)
[build-all] copy-hook-metadata
[copy-hook-metadata] Copied 5 hook metadata files.
[build-all] copy-export-html-templates (cached)
[build-all] write-build-info
[build-all] write-cli-startup-metadata
[build-all] write-cli-compat
frank_macmini@macmini:~/Bureau/openclaw$ node ./openclaw.mjs gateway restart

🦞 OpenClaw 2026.5.6 (71a6260) — Alexa, but with taste.

Restarted systemd service: openclaw-gateway.service
frank_macmini@macmini:~/Bureau/openclaw$ node ./openclaw.mjs --version
OpenClaw 2026.5.6 (71a6260)
frank_macmini@macmini:~/Bureau/openclaw$

noble templeBOT
# peak hare frank_macmini@macmini:~/Bureau/openclaw$ pnpm install Scope: all 125 workspace p...

That output shows the checkout is still exactly 2026.5.6; it doesn’t include the git update commands, so nothing has moved yet.

Please run these from ~/Bureau/openclaw and paste the output before doing another build:

git status --short
git branch --show-current
git remote -v
git describe --tags --always --dirty
git fetch --tags origin
git pull --ff-only

The likely cases are:

  • you’re on an old branch/tag/detached commit
  • git pull --ff-only is failing because of local changes
  • origin points somewhere other than the current OpenClaw repo
noble templeBOT
peak hare
#

frank_macmini@macmini:~/Bureau/openclaw$ node ./openclaw.mjs --version
OpenClaw 2026.5.6 (71a6260)
frank_macmini@macmini:~/Bureau/openclaw$ git status --short
frank_macmini@macmini:~/Bureau/openclaw$ git branch --show-current
main
frank_macmini@macmini:~/Bureau/openclaw$ git remote -v
origin https://github.com/openclaw/openclaw.git (fetch)
origin https://github.com/openclaw/openclaw.git (push)
frank_macmini@macmini:~/Bureau/openclaw$ git describe --tags --always --dirty
v2026.4.19-beta.2-9408-g71a6260034
frank_macmini@macmini:~/Bureau/openclaw$ git fetch --tags origin
Depuis https://github.com/openclaw/openclaw
! [rejeté] v2026.5.12-beta.1 -> v2026.5.12-beta.1 (écraserait l'étiquette existante)
! [rejeté] v2026.5.7-beta.1 -> v2026.5.7-beta.1 (écraserait l'étiquette existante)
frank_macmini@macmini:~/Bureau/openclaw$ git pull --ff-only
Mise Ă  jour 71a6260034..eb4e20ca1d
erreur : Impossible de créer '/home/frank_macmini/Bureau/openclaw/.git/index.lock' : Le fichier existe.

Il semble qu'un autre processus git est déjà lancé dans ce dépôt,
par exemple un éditeur ouvert par 'git commit'. Veuillez vous assurer
que tous les processus sont terminés et réessayez. Si l'échec persiste,
un processus git peut avoir planté :
supprimez le fichier manuellement pour poursuivre.
frank_macmini@macmini:~/Bureau/openclaw$

noble templeBOT
# peak hare frank_macmini@macmini:~/Bureau/openclaw$ node ./openclaw.mjs --version OpenClaw ...

Good, we found the actual blocker. Your repo is clean and on main; git pull wanted to update 71a6260034..eb4e20ca1d, but Git stopped because .git/index.lock already exists.

First make sure no git process is actually running:

ps aux | grep '[g]it'

If that shows nothing active for this repo, remove the stale lock and retry:

rm .git/index.lock
git pull --ff-only
pnpm install
pnpm build
node ./openclaw.mjs gateway restart
noble templeBOT
peak hare
#

frank_macmini@macmini:~/Bureau/openclaw$ pnpm install
Scope: all 127 workspace projects
? The modules directories will be removed and reinstalled from scratch. Proceed? (Y/n) ‣ true

noble templeBOT
peak hare
#

frank_macmini@macmini:~/Bureau/openclaw$ pnpm build
$ node scripts/build-all.mjs
[build-all] plugins:assets:build
$ node scripts/bundled-plugin-assets.mjs --phase build
[canvas] build: node scripts/bundle-a2ui.mjs
<DIR>/a2ui.bundle.js chunk │ size: 394.21 kB

âś” rolldown v1.0.0 Finished in 235.42 ms
[build-all] tsdown
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 38s

noble templeBOT
# peak hare frank_macmini@macmini:~/Bureau/openclaw$ pnpm build $ node scripts/build-all.mjs...

That line is a heartbeat from the build wrapper, not necessarily an error. It means tsdown is still running but hasn’t printed anything recently.

I’d let it run a few more minutes if CPU is active. In another terminal you can check:

ps -p 1197292 -o pid,etime,%cpu,%mem,command

If %CPU is non-zero, leave it alone. If it’s been at 0.0 for several minutes, stop the build with Ctrl-C and retry with a longer/noisier timeout:

OPENCLAW_TSDOWN_TIMEOUT_MS=900000 pnpm build

Also: you’re past the earlier issue now. Once this build finishes, node ./openclaw.mjs --version should be the real check.

peak hare
#

Is it normal that it's using up all my RAM and CPU? It's never taken this long... frank_macmini@macmini:~/Bureau/openclaw$ pnpm build
$ node scripts/build-all.mjs
[build-all] plugins:assets:build
$ node scripts/bundled-plugin-assets.mjs --phase build
[canvas] build: node scripts/bundle-a2ui.mjs
<DIR>/a2ui.bundle.js chunk │ size: 394.21 kB

âś” rolldown v1.0.0 Finished in 235.42 ms
[build-all] tsdown
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 38s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 31s
[tsdown-build] still running pid=1197292; no output for 57s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s
[tsdown-build] still running pid=1197292; no output for 30s

noble templeBOT
# peak hare Is it normal that it's using up all my RAM and CPU? It's never taken this long.....

No, “all RAM and CPU for many minutes” is not normal. A short CPU spike during tsdown is normal; sustained memory pressure is not. I’d stop it with Ctrl-C rather than let the machine grind.

Then run this so we can see what commit you landed on:

git rev-parse --short HEAD
node ./openclaw.mjs --version

For a retry, use verbose output so it doesn’t sit silently:

OPENCLAW_BUILD_VERBOSE=1 OPENCLAW_TSDOWN_TIMEOUT_MS=900000 pnpm build

If it starts eating RAM again, stop it and paste the last ~30 lines. At that point this is likely a build regression or dependency/tooling issue on that machine, and it’s worth filing with the build output here: https://github.com/openclaw/openclaw/issues

noble templeBOT
peak hare
#

dont work.. again take out of all the ram and cpu

noble templeBOT
# peak hare dont work.. again take out of all the ram and cpu

Stop it. Ctrl-C is the right move now. If it keeps running after Ctrl-C, kill that build process:

kill 1197292

Given it repeatedly consumes all RAM/CPU in tsdown, don’t keep retrying source builds on main. That’s not useful troubleshooting anymore.

Two sane recovery paths:

  1. Go back to a released install path and get your gateway usable again:
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw gateway install --force
openclaw gateway restart
openclaw --version
noble templeBOT
# peak hare dont work.. again take out of all the ram and cpu

Docs: https://docs.openclaw.ai/start/getting-started

  1. If you specifically need the source checkout, file the build hang as a bug with the tsdown output, your Node version, RAM size, and OS. Issue tracker: https://github.com/openclaw/openclaw/issues

For the original >4k Control UI truncation bug: once you’re on a released/current version and not stuck building main, retest it. If it still truncates with gateway.webchat.chatHistoryMaxChars = 50000, file that separately.

peak hare
#

node ~/Bureau/openclaw/openclaw.mjs update work ?

noble templeBOT
# peak hare node ~/Bureau/openclaw/openclaw.mjs update work ?

Maybe, but not that exact command from the source checkout.

node ~/Bureau/openclaw/openclaw.mjs update will run the updater from the same checkout that is currently failing during tsdown, so it may hit the same RAM/CPU build problem.

Use the installed/global CLI path instead, or reinstall stable:

openclaw update --channel stable

If that still routes through the broken source checkout, use the installer recovery path:

curl -fsSL https://openclaw.ai/install.sh | bash
openclaw gateway install --force
openclaw gateway restart
noble templeBOT
peak hare
#

frank_macmini@macmini:~/Bureau/openclaw$ openclaw --version
-bash: openclaw : commande introuvable
frank_macmini@macmini:~/Bureau/openclaw$ openclaw --version
-bash: openclaw : commande introuvable
frank_macmini@macmini:~/Bureau/openclaw$ node ~/Bureau/openclaw/openclaw.mjs gateway status
file:///home/frank_macmini/Bureau/openclaw/openclaw.mjs:398
throw new Error(await buildMissingEntryErrorMessage());
^

Error: openclaw: missing dist/entry.(m)js (build output).
This install looks like an unbuilt source tree or GitHub source archive.
Build locally with pnpm install && pnpm build, or install a built package instead.
For pinned GitHub installs, use npm install -g github:openclaw/openclaw#<ref> instead of a raw /archive/<ref>.tar.gz URL.
For releases, use npm install -g openclaw@latest.
at file:///home/frank_macmini/Bureau/openclaw/openclaw.mjs:398:13

Node.js v22.22.2
frank_macmini@macmini:~/Bureau/openclaw$

noble templeBOT
# peak hare frank_macmini@macmini:~/Bureau/openclaw$ openclaw --version -bash: openclaw : co...

Right, that explains the current state:

  • openclaw is not installed globally / not on PATH
  • node ~/Bureau/openclaw/openclaw.mjs ... now fails because the interrupted source build removed/replaced dist/ and never finished rebuilding it

Don’t run pnpm build again for now. Recover with a built install instead:

curl -fsSL https://openclaw.ai/install.sh | bash

Then open a fresh shell, or reload PATH:

source ~/.bashrc
command -v openclaw
noble templeBOT
peak hare
#

I don't want to lose all my agents and my work in OpenClaw before the update error...

noble templeBOT
# peak hare I don't want to lose all my agents and my work in OpenClaw before the update err...

Good instinct. Don’t do anything else until you back up the state directory.

Your agents/config/workspace are normally under ~/.openclaw, not inside ~/Bureau/openclaw. Reinstalling the OpenClaw package should not delete that, but take a backup first:

cd ~
tar -czf openclaw-backup-$(date +%Y%m%d-%H%M%S).tgz .openclaw
ls -lh openclaw-backup-*.tgz | tail -1

That backup should include your agents, sessions, config, workspace/memory, auth profiles, etc.

After the backup exists, the safer recovery is to install a built OpenClaw package. Do not delete ~/.openclaw, and do not delete ~/Bureau/openclaw yet. The source checkout can stay broken while we get the installed CLI working again.

#

Good, you’re back on a built release now: 2026.5.12.

Next step: hard-refresh Control UI and retest the original >4k message issue with your existing setting:

openclaw config get gateway.webchat.chatHistoryMaxChars --json

If it’s still 50000 and Control UI still truncates, then this is worth filing as a bug against 2026.5.12: https://github.com/openclaw/openclaw/issues

Also, avoid pasting full /status publicly when possible — it can include account/auth details. Nothing catastrophic here, just worth being careful.

peak hare
#

frank_macmini@macmini:~$ openclaw config get gateway.webchat.chatHistoryMaxChars --json
50000
frank_macmini@macmini:~$

noble templeBOT
# peak hare frank_macmini@macmini:~$ openclaw config get gateway.webchat.chatHistoryMaxChars...

Great, the setting survived the reinstall.

Now test the actual behavior on 2026.5.12:

  1. Hard-refresh Control UI (Ctrl+Shift+R / Cmd+Shift+R).
  2. Send or reload a message over 4k chars.
  3. Note whether truncation happens:
    • while the assistant is streaming live, or
    • only after reload/history loads, or
    • in both places.

If it still truncates despite 50000, file the issue with those details plus the version 2026.5.12 (f066dd2): https://github.com/openclaw/openclaw/issues

That distinction matters because gateway.webchat.chatHistoryMaxChars applies to chat.history; live streaming may be going through a different limit.

peak hare
#

now work 5473 chars work