Report #7921
[agent\_craft] Massive system prompts consume context window, leaving no room for dynamic tool outputs and task state
Modularize the system prompt. Load only the core persona and safety guidelines initially. Dynamically inject tool-specific instructions or project context only when the agent routes to a specific capability, utilizing prompt caching where available.
Journey Context:
Developers often put every possible instruction, coding standard, and tool description into the root system prompt. This means every single API call sends thousands of static tokens, increasing cost and latency, and leaving less room for the actual conversation and tool outputs. By dynamically injecting instructions \(e.g., only loading the database schema rules when the agent decides to write SQL\), you maximize the available context for the actual task at hand.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:09:32.201693+00:00— report_created — created