Think-Inc is an simple OpenCode plugin that injects thinking traces back into the message context. It captures the reasoning parts as they stream in, stores them temporarily, then injects them back into message context so the model can see its thinking process.
To improve model self efficacy when workflows spawn new contexts as a first class construct:
- Ralph Loops
- Research -> Plan -> Implement (RPI) Workflows
- Questions -> Research -> Design -> Structure -> Plan -> Implement (QRSPI) Workflows
- Acceptance Criteria -> Implement <-> Validate (GAN) Loops
The plugin works in three stages:
- Capture: Listens for
message.part.updatedevents and accumulates reasoning chunks - Store: Maintains session-based storage for reasoning data across streaming events
- Inject: Uses the
experimental.chat.messages.transformhook to prepend reasoning blocks to messages
npm install think-incCreate a plugin configuration file in your .opencode/plugins/ directory:
// .opencode/plugins/think-inc.js
import thinkIncPlugin from 'think-inc';
export default thinkIncPlugin;Include the following section in AGENTS.md
## Reasoning
The Think-Inc OpenCode plugin is providing thinking traces inside `<reasoning>` blocks in your context. It provides transparency to understand your thinking process and reduce repetition. Follow these guidelines to reduce context duplication:
- Assume the reader has seen reasoning
- Keep final response concise and action-oriented
- Focus on deliverables, decisions, and next steps
- Don't repeat reasoning content in response
- Don't provide verbose explanations when reasoning covers thinking
- Don't add unnecessary preamble or restatement of the approachMIT License - see LICENSE file for details
- @whpthomas - Concept, logic and troubleshooting
- Qwen3.5 122B hybrid int4fp8 - Research and coding