#Spend less tokens

1 messages · Page 1 of 1 (latest)

sleek gull
#

My assistant spent 32 million tokens in 2 days.
Is that normal and if not can someone help me find out why it spent that much and how to reduce it?
My assistant answers mainly question and does tasks e.g. setup in notion, daily reminder.
I host on hostinger and use an openai api

crystal wadiBOT
#

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

calm pondBOT
#

32M tokens in 2 days is high for mostly Q&A + reminders. Not impossible if it’s carrying huge context/tool outputs, but worth investigating.

First, please paste:

openclaw --version
openclaw status --all
openclaw status --usage

And in the assistant chat run:

/usage full
/usage cost
/context detail
#

Don’t paste API keys/tokens.

Likely causes:

  • one long session repeatedly re-sending a huge context
  • Notion/browser/tool calls returning large pages/results
  • cron/heartbeat jobs firing too often
  • subagents or retries looping
  • media/screenshots/transcripts
  • OpenAI key being used by something else too

Quick reductions:

  • run /compact in long chats
  • start fresh sessions for unrelated tasks
  • reduce/disable frequent cron/heartbeat jobs
  • trim big tool outputs/workflows
  • use a cheaper/smaller model for reminders/background work; for current model picks, ask in #models
  • put OpenClaw on its own OpenAI project/API key and set usage limits in OpenAI
#

OpenClaw has built-in usage views via /status, /usage full, /usage cost, and openclaw status --usage. (docs.openclaw.ai) OpenAI’s usage dashboard can filter by project/model/API capability, and OpenAI also supports org/project usage limits. (help.openai.com)

sleek gull
calm pondBOT
#

Yep, that explains it: 158.9k input tokens per reply is very large.

At that rate, 32M tokens ≈ ~200 replies/tool loops in 2 days. So the spend is probably not a mystery leak — it’s your one Telegram session carrying a huge context every turn.

What I’d do now:

  1. Run:

    /context detail
    

    This should show what’s filling the 79% context — chat history, tool results, bootstrap file, memory, etc.

  2. Run:

    /compact
    

    That’s the fastest fix for the current chat.