This report compares the context management strategies of the Opencode agent and the Pi agent, based on trace analysis from the TODO app experiment on 2026-04-22 using the Kimi 2.5 model.
Opencode employs a highly structured, verbose, and comprehensive system prompt. It explicitly defines:
- Tool Use Protocol: Detailed instructions on how to use tools, the importance of parallel tool calls, and the expected behaviors after tool results (e.g., "If you anticipate making multiple non-interfering tool calls, you are HIGHLY RECOMMENDED to make them in parallel to significantly improve efficiency.").
- Coding Guidelines: Rigid rules for coding from scratch, bug fixes, features, and refactoring (e.g., "Make MINIMAL changes to achieve the goal. This is very important to your performance.").