#Claude-cli context usage over 5 times then pi runtime.
1 messages · Page 1 of 1 (latest)
That usually means the Claude CLI backend is being asked to carry a much larger conversation history than the “runtime” number makes obvious.
A few common causes:
- Long Discord threads keep accumulating session history; each turn may resend a lot of prior context.
- Tool output / file reads / browser results can be huge compared with normal chat text.
- Compaction may not have happened yet, or it may keep a large recent tail.
- Claude CLI/subscription usage limits are separate from OpenClaw’s local runtime/status accounting, so the numbers won’t always line up 1:1.
Ways to improve it:
- Start a clean session when changing topics:
/new - Compact before long work:
/compact - Keep big project state in files and ask the agent to read only what it needs.
- Avoid pasting big logs directly; attach/save them and point the bot at the relevant section.
- Use sub-agents for long/parallel tasks so the main thread stays smaller.
- If you hit Anthropic 429/long-context errors, either wait for the Claude CLI window to reset, use an eligible API-key/extra-usage path, or set a fallback model.
For diagnosing your exact case, first check your version:
openclaw --version
Then run:
openclaw status --usage
openclaw status --all
If you paste the version + the relevant redacted status/error line, we can tell whether this is normal long-thread context growth, compaction not kicking in, or Claude CLI quota/long-context billing behavior.
Docs: https://docs.openclaw.ai/concepts/compaction and https://docs.openclaw.ai/help/faq
how to switch to pi harness?
To force the built-in PI harness, set the embedded harness runtime to pi, then start a fresh session:
openclaw config set agents.defaults.embeddedHarness.runtime pi
openclaw config set agents.defaults.embeddedHarness.fallback pi
openclaw config validate
Then in the chat/session you want to switch:
/new
or /reset if you specifically want to clear the current session binding.
Important bit: harness choice is pinned per session after the first embedded run, so changing config won’t flip an already-running Codex/native harness thread mid-conversation. Use /status after the new turn; PI shows as Runner: pi (embedded).