
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@feniix/pi-code-reasoning
Advanced tools
Code Reasoning extension for pi — reflective problem-solving through sequential thinking with branching and revision support
Code Reasoning extension for pi — reflective problem-solving through sequential thinking with branching and revision support.
Based on the MCP server by Matt Westgate, this native TypeScript extension provides structured thinking tools without external dependencies.
pi install npm:@feniix/pi-code-reasoning
Ephemeral (one-off) use:
pi -e npm:@feniix/pi-code-reasoning
code_reasoningRecord and process a thought with metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
thought | string | yes | Your reasoning content |
thought_number | integer | yes | Position in sequence |
total_thoughts | integer | yes | Estimated total thoughts |
next_thought_needed | boolean | yes | Set FALSE when done |
is_revision | boolean | no | When correcting earlier thought (🔄) |
revises_thought | integer | no | Which thought# you're revising |
branch_from_thought | integer | no | When exploring alternatives (🌿) |
branch_id | string | no | Identifier for the branch |
needs_more_thoughts | boolean | no | If more thoughts needed |
code_reasoning_statusGet current session status: branches and thought count.
code_reasoning_resetReset the session, clearing all thoughts and branches.
{
"thought": "Initial exploration of the problem...",
"thought_number": 1,
"total_thoughts": 5,
"next_thought_needed": true
}
{
"thought": "Exploring alternative approach...",
"thought_number": 3,
"total_thoughts": 7,
"next_thought_needed": true,
"branch_from_thought": 2,
"branch_id": "alternative-algo-x"
}
{
"thought": "Revisiting earlier point: Assumption Y was flawed...",
"thought_number": 4,
"total_thoughts": 6,
"next_thought_needed": true,
"is_revision": true,
"revises_thought": 2
}
pi --code-reasoning-max-bytes=102400 --code-reasoning-max-lines=5000
export CODE_REASONING_MAX_BYTES=102400
export CODE_REASONING_MAX_LINES=5000
Create ~/.pi/agent/extensions/code-reasoning.json:
{
"maxBytes": 51200,
"maxLines": 2000
}
| Flag | Env Variable | Default | Description |
|---|---|---|---|
--code-reasoning-config | CODE_REASONING_CONFIG | — | Custom config file path |
--code-reasoning-max-bytes | CODE_REASONING_MAX_BYTES | 51200 | Max output bytes |
--code-reasoning-max-lines | CODE_REASONING_MAX_LINES | 2000 | Max output lines |
MIT
FAQs
Code Reasoning tools for pi and MCP — reflective sequential thinking with branching and revision support
The npm package @feniix/pi-code-reasoning receives a total of 41 weekly downloads. As such, @feniix/pi-code-reasoning popularity was classified as not popular.
We found that @feniix/pi-code-reasoning demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.