@piotr-oles/pi-cwd

Pi Agent extension: remind agent to use relative paths based on current working directory

Packages

Package details

extension

Install @piotr-oles/pi-cwd from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@piotr-oles/pi-cwd
Package
@piotr-oles/pi-cwd
Version
0.2.0
Published
Jun 18, 2026
Downloads
not available
Author
piotr-oles
License
unknown
Types
extension
Size
3.4 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-cwd

Pi Agent extension that reminds you to use relative paths to reduce context usage.

When agent uses absolute paths in read, write, edit, or bash tool calls, extension appends tip to tool response showing current working directory.

Usage

Install via pi config:

pi install npm:@piotr-oles/pi-cwd

Behavior

When agent calls tool with absolute path:

read /Users/john/project/src/file.ts

Tool result gets reminder appended:

Tip: Use relative paths. Current cwd: /Users/john/project

Extension doesn't block tool execution - just reminds agent for next time.

Flags

  • pi-cwd (boolean, default: true) - Enable/disable extension

Example:

pi --pi-cwd false

Detection

  • read/write/edit: Checks path parameter
  • bash: Checks if command includes absolute cwd path.