CLI wrapper/system-reminder injections waste tokens and break agent workflows ("token tax on good engineering")

Resolved 💬 2 comments Opened Feb 12, 2026 by 7blacky7 Closed Mar 13, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The CLI injects substantial <system-reminder> blocks into the model context on every turn. For users who
carefully engineer hook-based context injection (deduplicated, scoped, minimal tokens), this wrapper text:

  • Wastes tokens (cost + latency) on every single call
  • Displaces user-curated context in the finite context window
  • Competes with hook-injected instructions, creating conflicting priorities
  • In agent workflows, agents complete their work correctly and persist results, but then **abort/crash as if

they had done nothing** — the main agent wastes even more tokens investigating

The model (Opus 4.6) often recognizes the wrapper text as irrelevant, but still has to read and process it —
costing tokens regardless.

This is effectively a token tax on optimized setups.

Proposed Solution

  1. Context hygiene mode: flag/setting to disable or minimize wrapper/policy text in the model context
  2. Strict channel separation: separate task context (user + hooks) from CLI wrapper text so they don't

compete

  1. Trimming of redundant text: remove boilerplate that repeats every turn (the model doesn't need the same

policy 50 times per session)

  1. Token accounting transparency: show breakdown of tokens from CLI wrapper vs. user input vs. hook

injections

Alternative Solutions

  • Manually compressing my own injections even further to "make room" for CLI wrapper text — but this sacrifices

useful context to accommodate overhead I didn't ask for

  • Adding a "ignore wrapper text" instruction in my hooks — costs extra tokens itself and is unreliable
  • Splitting single-call workflows into multiple calls to reduce per-call context — adds latency and cost, defeats

the purpose of hooks

  • None of these are real solutions, they're workarounds for a platform-side problem

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

  1. I configure hooks to inject ~200-400 tokens of structured context per call (dependency checks, project rules,

agent-scoped facts from a vector DB)

  1. I run a simple task — the CLI adds ~800+ tokens of wrapper/policy text into the same context
  2. My curated context now competes with boilerplate for the model's attention
  3. In agent workflows: subagents complete their tasks and persist results correctly via custom MCP server, but

then abort unexpectedly. The main agent sees the abort, doesn't know work was already done, and spends additional
tokens investigating — compounding the waste

  1. Over a session with multiple agent calls, this overhead accumulates significantly

Additional Context

  • This is not a request to weaken safety policies — just to avoid injecting redundant wrapper text where it

competes with task-critical context

  • The hook system is excellent and exactly the right abstraction — its effectiveness is undermined by the CLI's

own injections

  • Affects MCP-based setups particularly hard because agent subprocesses have tighter context budgets
  • Environment: Claude Code CLI (latest), Opus 4.6, Windows (primary), hook-based injection with vector DB +

validation scripts + custom MCP server/

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗