Skip to content

Token optimization

The Optimize tab is Sentinel’s toolkit for cutting the token cost of Claude Code. It works three ways, and shows both realized and potential savings for each so you can see what’s already helping and what’s left on the table.

The Optimize dashboard with realized and potential savings

A library of pre-built subagents — most pinned to a cheaper model — that the analyzer recommends installing into ~/.claude/agents/. Routine work like file reads, log parsing, and test-output triage then runs on the cheaper model and returns a digest instead of raw output, so your main context stays small and cheap.

Oversized tool_result payloads quietly fill your context window. Sentinel trims them at one of three levels — Conservative, Moderate, or Aggressive.

The compression panel showing trimmed payloads

Your MCP servers’ tool definitions ride along in every request’s context, which adds up fast. Code-execution mode bridges those servers through a loopback endpoint, so their definitions stop being injected into each request. It’s loopback-only, with a per-server allowlist you control.

Each technique reports:

  • Realized savings — tokens you’ve already avoided spending.
  • Potential savings — what you’d save by adopting the analyzer’s remaining recommendations.