Boundaries
When you should not trim logs too aggressively before asking AI for help
Shorter prompts are usually better, but not always. Some failures depend on the surrounding context: package version conflicts, transitive dependency problems, environment-specific behavior, serializer chains, or integration boundaries where the wrapper is part of the cause.
The right goal is not maximum compression. The right goal is minimum useful context. If trimming removes the lines that change the diagnosis, the prompt becomes neat but less accurate.
Good reasons to keep more context
- The failure clearly comes from dependency resolution or version skew.
- The bug only appears in CI, Docker, or production-like environments.
- The surrounding library frames identify the actual misconfiguration.
- The error message alone is too generic to distinguish the cause.
Last reviewed: May 25, 2026. Maintained as part of the ContextClean resource library.