Pi lets you pass a project directory (cwd) to createAgentSession(), to help scope where tools should work.

Tools like read, grep, find and ls efficiently resolve in that project, and the session picks up the projects AGENTS.md and skills.

Here’s the code to try this out

Sep 7, 2026 · 11:53 AM UTC

10
14
377
27,225
RepliesRelevant
Replying to @pidotdev
@pidotdev How’s Astra in PI? Does it fit the philosophy of minimalist harness too?
2
0
1
863
Replying to @pidotdev
@pidotdev Python client when?
0
0
0
370
Replying to @pidotdev
@pidotdev Scoping at createAgentSession rather than per-call is the part I'd keep. I do the same with browser Spaces - a run gets one at the start and it never widens, so afterwards the question of what it could have reached has one answer instead of a timeline.
1
0
1
706
Replying to @pidotdev
0
0
0
95
Replying to @pidotdev
@pidotdev cwd on createagentsession scopes the tools to that project and loads its agents.md and skills.
0
0
0
416
Replying to @pidotdev
@pidotdev the cwd finally gets promoted from config detail to context boundary
0
0
0
120
Replying to @pidotdev
@pidotdev why,我的模型一多就卡死?
0
0
0
316