pi-think
v0.1.4
Published
Explicit, tool-driven reasoning for Pi.
Maintainers
Readme
pi-think
Explicit, tool-driven reasoning for Pi.
pi-think disables the model provider's native reasoning and gives the agent a private think tool instead. The agent uses that tool to work through intent, assumptions, ambiguity, alternatives, and consequences before it continues.
Why this exists
pi-think is an experimental extension for exploring how explicit reasoning prompts affect coding agents. It is built for experimentation, personal tuning, and fun. It lets you shape what the agent should consider instead of accepting a provider's fixed reasoning pipeline.
There is no proven general performance gain, and the project is not an attempt to distill or reproduce a provider's hidden reasoning. The author's own informal use suggests that explicit reasoning can help some models stay on long-running tasks and follow instructions more consistently. That is anecdotal, not a benchmark or a guarantee.
The useful part is control. You can change the reasoning prompt, tell the agent which concepts to examine, and influence how often it pauses to reason. This creates room to try different prompts, model-specific workflows, structured state, or other experiments.
What it does
- Adds a private
thinkscratchpad to Pi. - Uses Pi's real provider-specific thinking-off controls.
- Can require another reasoning pass after tools return new information (except on OpenAI Codex Responses, where forced post-tool passes can cause unbounded provider streams).
- Renders reasoning as a compact block that can be expanded.
- Refuses to run when a model cannot fully disable native reasoning.
pi-think does not treat minimal or low reasoning as off. If Pi marks a model's off level as unsupported, the extension disables its external reasoning mode and shows a warning.
Install
Install from npm:
pi install npm:pi-thinkOr install from GitHub:
pi install git:github.com/alexshpunt/pi-thinkYou can also try it without installing:
pi -e npm:pi-thinkUse
Run /think to open the settings panel.
onenables thethinktool when Pi's thinking level isoffand the selected model supports a real native-reasoning off mode.offremoves the tool.
Keep Pi's thinking level set to off. The provider then receives its native hard-off setting, while the agent reasons through the extension's think tool.
Custom reasoning prompt
The default reasoning prompt is included in resources/reasoning.md.
To replace it, create:
~/.pi/agent/reasoning.override.mdThe override is loaded when the extension starts. Run /reload after changing it.
Provider support
The extension relies on Pi's model metadata and provider serializers instead of guessing from model names. Pi currently handles hard-off controls such as:
reasoning.effort: "none"thinking: { type: "disabled" }enable_thinking: falsethinkingBudget: 0
Support depends on the selected provider, API dialect, and model. Models that cannot fully disable native reasoning are not supported.
Project direction
The extension may grow as it is used, but there is no promised roadmap. Issues, experiments, and forks are welcome.
Changes can be integrated when they strengthen the original idea: give people a simple, general way to control reasoning in Pi. Features that lock the extension into one model, one workflow, or one strongly opinionated prompting method are better kept as separate experiments or forks.
This follows Pi's philosophy: provide a small, direct mechanism and let users shape it for their own work.
