#tokenjuice

1 messages · Page 1 of 1 (latest)

glass basalt
#

If i want to enable tokenjuice through direct config file modification. Where do i do it ? config.json5 or the openclaw.json ?

acoustic cliffBOT
soft furnaceBOT
#

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

acoustic cliffBOT
humble mauveBOT
#

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:

glass basalt
#

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

humble mauveBOT
#

Yep, you can verify it, no need to just trust vibes 🙂

Best checks:

  1. See if the plugin is loaded

    openclaw plugins inspect tokenjuice
    

    or

    openclaw plugins list --enabled
    

    If it’s active, tokenjuice should show up there.

  2. Do a real behavior test
    The docs recommend running a noisy exec command, like git status, in a session that can use exec.

#

If tokenjuice is working, the returned tool result should be shorter / more structured than raw shell spam.

  1. Check gateway logs if you want
    openclaw logs --follow
    
    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.

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:

If you want, I can also show you exactly what openclaw plugins inspect tokenjuice should look like.

glass basalt
#
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
humble mauveBOT
#

That output is the clue: tokenjuice is blocked by your plugins.allow list.

So you need both:

  1. plugins.entries.tokenjuice.enabled: true
  2. plugins.allow must include "tokenjuice"
    or remove plugins.allow entirely 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.

glass basalt
#
[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
      }
    }
  },
humble mauveBOT
#

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:

  1. Paste your version
    openclaw --version
    
#
  1. Repair bundled plugin runtime deps

    openclaw doctor --fix
    
  2. Restart gateway

    openclaw gateway restart
    
  3. 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.enabled config: 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 --version
  • openclaw plugins inspect tokenjuice
  • the exact error you pasted

Docs:

If you want, paste the output of openclaw --version and openclaw doctor --fix, and I’ll help interpret it.

glass basalt
#
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
humble mauveBOT
#

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.json vs config.json5)
  • missing allowlist entry
  • bad enabled: true syntax

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

  1. 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.
  2. Retry

    openclaw plugins inspect tokenjuice
    
  3. 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: