# @jbcode/pi-bash-cwd Pi extension that adds an optional `cwd` argument to the built-in `bash` tool. Absolute paths are used directly, relative paths resolve from the Pi session directory, and omitted paths retain the session directory. The extension validates the directory before starting the command, preventing an ignored or invalid `cwd` from running in Pi's process directory. The override delegates execution and rendering to Pi's built-in Bash implementation. Existing `command` and `timeout` calls remain compatible. ## Install ```bash pi install npm:@jbcode/pi-bash-cwd ``` Restart Pi or run `/reload` after installation. Pi warns that the extension replaces the built-in `bash` tool; that warning is expected. Use this package with Pi 0.84.x. Remove it after moving to a Pi release that honors `ctx.cwd` and can be imported by extensions without undeclared runtime dependencies. ## Verify ```bash bun run --filter '@jbcode/pi-bash-cwd' test ```