#tokenjuice
1 messages · Page 1 of 1 (latest)
Use ~/.openclaw/openclaw.json, not config.json5.
OpenClaw’s config file is named openclaw.json, but it uses JSON5 syntax, so this is valid:
{
plugins: {
entries: {
tokenjuice: {
enabled: true,
},
},
},
}
If the gateway is running, it usually reloads automatically. If not, do:
openclaw gateway restart
Docs:
but how do i know it is already working ? Are there log inside the gateway i can see ? Or it will just work and i should just believe so
Yep, you can verify it, no need to just trust vibes 🙂
Best checks:
-
See if the plugin is loaded
openclaw plugins inspect tokenjuiceor
openclaw plugins list --enabledIf it’s active, tokenjuice should show up there.
-
Do a real behavior test
The docs recommend running a noisyexeccommand, likegit status, in a session that can useexec.
If tokenjuice is working, the returned tool result should be shorter / more structured than raw shell spam.
- Check gateway logs if you want
After enabling it or restarting, you can watch for plugin/config reload activity. Logs are useful, but the functional test above is the real proof.openclaw logs --follow
Small gotcha: current docs say tokenjuice currently applies to Pi embedded runs. So if you enable it somewhere else and see no difference, that may be why.
Docs:
- https://docs.openclaw.ai/tools/tokenjuice
- https://docs.openclaw.ai/tools/plugin
- https://docs.openclaw.ai/gateway/troubleshooting
If you want, I can also show you exactly what openclaw plugins inspect tokenjuice should look like.
tokenjuice
Compacts exec and bash tool results with tokenjuice reducers.
Status: disabled
Format: openclaw
Source: /app/dist/extensions/tokenjuice/index.js
Origin: bundled
Version: 2026.4.22
Shape: non-capability
Capability mode: none
Legacy before_agent_start: no
Error: not in allowlist
That output is the clue: tokenjuice is blocked by your plugins.allow list.
So you need both:
plugins.entries.tokenjuice.enabled: trueplugins.allowmust include"tokenjuice"
or removeplugins.allowentirely if you do not want an allowlist
Example:
{
plugins: {
allow: ["browser", "tokenjuice"], // keep your other entries too
entries: {
tokenjuice: {
enabled: true,
},
},
},
}
Then save and let the gateway reload, or run:
openclaw gateway restart
How to verify:
openclaw plugins inspect tokenjuice
You want the not in allowlist error to be gone.
If you also want runtime proof:
openclaw logs --follow
and do a noisy exec test. But one important gotcha: the current docs say tokenjuice currently applies to Pi embedded runs, so on other setups it may load correctly but still not visibly change output.
Docs:
If you want, paste your current plugins block and I’ll tell you the exact edit.
[plugins] tokenjuice failed to load from /app/dist/extensions/tokenjuice/index.js: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
tokenjuice
Compacts exec and bash tool results with tokenjuice reducers.
Status: error
Failure phase: load
Failed at: 2026-04-24T07:29:40.898Z
Format: openclaw
Source: /app/dist/extensions/tokenjuice/index.js
Origin: bundled
Version: 2026.4.22
Shape: non-capability
Capability mode: none
Legacy before_agent_start: no
Diagnostics:
ERROR: failed to load plugin: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
Error: Error: Cannot find module '../rules/tests/bun-test.json'
openclaw.json:
"tokenjuice": {
enabled: true
},
config.json5
"plugins": {
"allow": [
"ollama",
"openclaw-mem0",
"slack",
"tokenjuice"
],
"load": {
"paths": [
"/opt/openclaw-baseline/extensions",
"/home/node/.openclaw/extensions"
]
},
"slots": {
"memory": "openclaw-mem0"
},
"entries": {
"openclaw-mem0": {
"enabled": true,
"config": {
"mode": "open-source",
"autoRecall": true,
"autoCapture": true,
"userId": "test-deploy",
"oss": {
"embedder": {
}
}
}
},
"tokenjuice": {
"enabled": true
}
}
},
Nice, this means config is mostly correct now. OpenClaw is trying to load tokenjuice, but the plugin is failing at runtime.
The important part is this:
Cannot find module '../rules/tests/bun-test.json'
So this is not an allowlist problem anymore and not really an openclaw.json syntax problem. It looks like a bundled plugin runtime-deps/package staging issue.
What I’d do next:
- Paste your version
openclaw --version
-
Repair bundled plugin runtime deps
openclaw doctor --fix -
Restart gateway
openclaw gateway restart -
Check again
openclaw plugins inspect tokenjuice
A useful detail: I checked the published tokenjuice package, and dist/rules/tests/bun-test.json does exist there, so the problem is likely with how that build staged the bundled dependency, not with your config.
So the short version is:
openclaw.json: correct place for OpenClaw runtime config- your
tokenjuice.enabledconfig: looks fine - current blocker: likely bug / broken staged dependency in this build
If doctor --fix + restart still gives the same error, I’d treat it as a bug and ask you to file a GitHub issue with:
openclaw --versionopenclaw plugins inspect tokenjuice- the exact error you pasted
Docs:
- https://docs.openclaw.ai/gateway/doctor
- https://docs.openclaw.ai/tools/plugin
- https://docs.openclaw.ai/tools/tokenjuice
If you want, paste the output of openclaw --version and openclaw doctor --fix, and I’ll help interpret it.
openclaw --version
OpenClaw 2026.4.22
└ Doctor complete.
openclaw plugins inspect tokenjuice
[plugins] openclaw-mem0: registered (mode: open-source, user: test-deploy, autoRecall: true, autoCapture: true, skills: false)
[plugins] tokenjuice failed to load from /app/dist/extensions/tokenjuice/index.js: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
[doc-store] initialized (collection=test-deploy-docs, model=qwen3-embedding:4b, dims=2560, chunk=500/50)
[plugins] openclaw-mem0: registered (mode: open-source, user: test-deploy, autoRecall: true, autoCapture: true, skills: false)
[plugins] tokenjuice failed to load from /app/dist/extensions/tokenjuice/index.js: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
tokenjuice
Compacts exec and bash tool results with tokenjuice reducers.
Status: error
Failure phase: load
Failed at: 2026-04-24T07:37:13.887Z
Format: openclaw
Source: /app/dist/extensions/tokenjuice/index.js
Origin: bundled
Version: 2026.4.22
Shape: non-capability
Capability mode: none
Legacy before_agent_start: no
Diagnostics:
ERROR: failed to load plugin: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
Error: Error: Cannot find module '../rules/tests/bun-test.json'
Require stack:
- /app/dist/extensions/tokenjuice/node_modules/tokenjuice/dist/core/builtin-rules.generated.js
Yep, this pretty much confirms it: your config is fine, the bundled plugin is broken in that build.
This is the key bit:
Status: error
Failure phase: load
Cannot find module '../rules/tests/bun-test.json'
So at this point it is not:
- wrong file (
openclaw.jsonvsconfig.json5) - missing allowlist entry
- bad
enabled: truesyntax
It looks like a 2026.4.22 bundled-plugin runtime-deps packaging/staging bug for tokenjuice. I checked current source and there are bundled plugin staging fixes landed after 2026.4.22 that look related.
What I’d do
-
Update to a newer build/image
- If this is Docker, update the container image and recreate it.
- If this is a normal install, update OpenClaw normally.
-
Retry
openclaw plugins inspect tokenjuice -
Temporary workaround
If you just want things clean for now, disable tokenjuice again.
Bottom line
You’re not missing a config knob here, this smells like a real bug in that release.
If updating still fails on the newest build, please file a GitHub issue and include exactly what you pasted: