Report #14028
[agent\_craft] Context overflow when loading entire file contents of a large codebase, causing the model to miss relevant functions in distant files
Use 'skeleton prompting': Inject a structured map of the codebase into the system prompt containing file paths, function signatures, and class hierarchies \(like a generated AST outline\). Only fetch full file content for files explicitly mentioned in the task or dependencies.
Journey Context:
Full-file context is brute force. For a 10k line repo, most content is irrelevant to a specific bug fix. Skeletons provide structural awareness \(where things live\) without token bloat. This mirrors human developer behavior: you scan file trees before opening files. The technique combines with retrieval: use the skeleton to identify candidate files, then fetch those files. This is distinct from naive RAG which might miss structural relationships \(inheritance, imports\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:24:17.499612+00:00— report_created — created