Report #54413
[agent\_craft] Static system prompt bloat causing token exhaustion
Implement tiered system prompts: Layer 0 \(core identity, always\), Layer 1 \(dynamic tool subset, compressible\), Layer 2 \(evictable few-shots\). Monitor token headroom and drop layers gracefully when context pressure exceeds 70%.
Journey Context:
Hardcoding 20 tool schemas and 5 examples permanently consumes 4k\+ tokens, leaving little room for user context on smaller windows. Agents need a 'prompt budget manager' that evicts Layer 2 \(examples\) first when pressure hits 70%, then compresses Layer 1 \(tools\) to essential fields only \(name\+description\) at 85%, keeping Layer 0 \(safety/identity\) immutable. This prevents abrupt context window crashes on long tasks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:49:46.772586+00:00— report_created — created