Toggle Codemode in Pi.

Codemode lets Pi handle several tool steps together instead of one at a time. Type /codemode to switch it on or off at runtime. Requires Pi 0.99.0+. Once this extension is loaded, no restart or settings edits are needed.

$ pi install npm:pi-codemode-toggle

Reference

What is Pi Codemode?

Codemode is Pi's built-in mode in which the model emits a small JavaScript program that calls your tools, rather than issuing one tool call per step. Pi ships it as the builtin:codemode extension; this package gives you runtime control over it.

How to enable codemode in Pi
  1. Use Pi 0.99.0 or newer
  2. Install the extension: pi install npm:pi-codemode-toggle
  3. If Pi is already running, run /reload once after installation
  4. Type /codemode or /codemode on in a session
  5. Type /codemode off to switch it back
  6. The footer indicator reads codemode:on or codemode:off
Commands
Commands accepted by /codemode
Command Effect
/codemodeToggle Codemode on or off
/codemode onEnable Codemode
/codemode offDisable Codemode
/codemode statusReport the current state

Argument completions are provided for on, off, status and toggle.

Troubleshooting

If /codemode is missing, first confirm you are using Pi 0.99.0 or newer. If you installed while Pi was already running, run /reload once. For project-local installs, pi install npm:pi-codemode-toggle -l writes the declaration to the project's .pi/settings.json, which Pi only reads once that folder is trusted. Install without -l to add the package to ~/.pi/agent/settings.json, or grant trust to the directory. Confirm with pi list.

Demo: the /codemode command inside a Pi session

~/git/pi-codemode-toggle (main) 0.8%/1.0M pi-bifrost/auto • medium codemode:off

args: on off status toggle