#- agents.defaults.contextPruning.mode: Invalid input

1 messages ยท Page 1 of 1 (latest)

jolly lodge
#

how fix

ebon cedarBOT
#

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

split ridgeBOT
# jolly lodge how fix

This error means your agents.defaults.contextPruning.mode config is set to a channel ID instead of a valid pruning mode.

Fix: You likely have a typo or misplaced config. Check your ~/.clawdbot/clawdbot.json for something like:

{
  "agents.defaults.contextPruning": {
    "mode": "1464810660545433744"  โ† This is wrong!
  }
}

Valid mode values are:

  • "balanced" (default)
  • "aggressive"
  • "minimal"
#

Correct it to:

{
  "agents.defaults.contextPruning": {
    "mode": "balanced"
  }
}

Then restart the gateway: clawdbot gateway restart

If you meant to configure a specific channel for pruning (not just a mode), the config key is different โ€” let me know what you're trying to accomplish and I can point you to the right setting! ๐Ÿฆ

jolly lodge
#

"workspace": "/Users/taurus/clawd",
"contextPruning": {
"mode": "balanced"
},

split ridgeBOT
# jolly lodge "workspace": "/Users/taurus/clawd", "contextPruning": { "mode": "b...

That's weird - your config looks correct! The error is pointing to a different channel ID (1464810660545433744) than your message ID.

Quick questions to diagnose:

  1. Is there another contextPruning config somewhere else? Check for:

    • Environment variables: CLAWDBOT_AGENTS_DEFAULTS_CONTEXTPRUNING_MODE
    • A separate agents config block
    • Multiple config files being merged
  2. Can you run this and paste the output?

    clawdbot config.get agents.defaults.contextPruning
    
  3. Also check the full agents.defaults:

#
   clawdbot config.get agents.defaults

The config you pasted looks right, so something else must be feeding that channel ID in. Once you share those outputs, I can pinpoint where it's coming from! ๐Ÿฆ

jolly lodge
#

taurus@jolly lodges-Mac-mini clawd % clawdbot config.get agents.defaults.contextPruning

Invalid config at /Users/taurus/.clawdbot/clawdbot.json:\n- agents.defaults.contextPruning.mode: Invalid input
error: unknown command 'config.get'
(Did you mean configure?)

split ridgeBOT
# jolly lodge taurus<@408322493212786708>s-Mac-mini clawd % clawdbot config.get agents.default...

Ah! Two things:

  1. Your Clawdbot version is old โ€” config.get doesn't exist in older versions. That's why you can't inspect the running config.

  2. Your config has a validation error โ€” the runtime is complaining that mode is invalid input.

Please run:

clawdbot --version

And paste your full agents.defaults section from ~/.clawdbot/clawdbot.json so we can see what's actually in there. The version matters because config keys changed over time. ๐Ÿฆ

jolly lodge
#

"agents": {
"defaults": {
"model": {
"primary": "claude-sonnet-4-5-20250929",
},
"models": {
"anthropic/claude-opus-4-5-20251101": {},
"anthropic/claude-sonnet-4-5-20250929": {},
"minimax/MiniMax-M2.1": {}
},
"workspace": "/Users/taurus/clawd",
"contextPruning": {
"mode": "balanced"
},
"heartbeat": {
"every": "4h"
}
}
},

split ridgeBOT
# jolly lodge "agents": { "defaults": { "model": { "primary": "claude-sonnet...

That config looks correct to me! The problem is likely:

  1. Old Clawdbot version that doesn't understand this config format
  2. Another override somewhere (env var, another config file)

Try this:

clawdbot gateway update
clawdbot gateway restart

If that doesn't help, check for env variables:

env | grep -i claw
env | grep -i context
#

Or try commenting it out entirely:

"contextPruning": {
  // "mode": "balanced"
}

Then restart and see if the error goes away.

If the error persists even with that section removed, the issue is coming from somewhere else entirely. Let me know what version you get and whether the env grep turns up anything! ๐Ÿฆ

jolly lodge
#

ok i think i've fixed it by commenting that out

split ridgeBOT
# jolly lodge ok i think i've fixed it by commenting that out

Glad it's fixed! ๐ŸŽ‰

If you want the context pruning feature back, update Clawdbot and it should work:

clawdbot gateway update
clawdbot gateway restart

Then uncomment the section and it should accept "balanced" properly. The version you were running likely had a bug or different config schema.

Let me know if you hit any other issues! ๐Ÿฆ

jolly lodge
#

i tried to switch my config to use the minimax coding plan, but hwen i do that, it says HTTP 500: api_error: insufficient balance (1008) (request_id: 05c4b697f4189bcdb4e7b1d4cc9207b6)

split ridgeBOT
# jolly lodge i tried to switch my config to use the minimax coding plan, but hwen i do that, ...

That's a MiniMax billing error, not a Clawdbot config issue!

Error 1008 = "Insufficient balance" โ€” you've run out of credits with MiniMax.

To fix:

  1. Check your MiniMax dashboard: https://platform.minimaxi.com/
  2. Add credits/pay-as-you-go balance
  3. Try again

The config you set is correct โ€” it's just that the MiniMax API is rejecting the request because your account doesn't have enough funds.

Once you top up, it should work! ๐Ÿฆ

jolly lodge
#

no issues with my coding plan balance. i am still not sure why it's calling the normal sdk when i have a coding plan key added.

split ridgeBOT
#
  1. Is the coding plan key different from your regular MiniMax key? Some providers require a specific endpoint or key format for plan-based access.

The best place to check is MiniMax's docs or the #models channel (1456704705219661980) โ€” someone there probably knows the exact config format for coding plans! ๐Ÿฆ

winged solar
jolly lodge
winged solar
#

thanks mate

swift bridge
winged solar