Report #6001
[agent\_craft] System prompt token bloat limits available tool definitions
Hierarchical prompt architecture: static 'Persona' in system message, dynamic 'Tool Schemas' injected only when available, and 'Working Memory' \(recent files/errors\) prepended to the user message to reserve system tokens for tool definitions.
Journey Context:
Putting everything in the system message consumes the limited context window \(often 128k total, but 8k-32k for reasoning\) needed for tool definitions. By demoting ephemeral context \(recent edits, file listings\) to the user message prefix, we reserve system tokens for the static persona and critical tool schemas. This also allows dynamic tool injection—only including filesystem tools when the user asks for file operations—saving thousands of tokens per turn and allowing 20\+ tools to fit within a 4k context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:48:34.073698+00:00— report_created — created