fix(coding-agent): add follow-up docs, changelog, and precedence tests closes #2429

This commit is contained in:
Mario Zechner
2026-03-26 00:28:30 +01:00
parent 76f6f8cb8b
commit 7e94d36a44
3 changed files with 164 additions and 1 deletions

View File

@@ -293,10 +293,11 @@ Fired by the `pi` CLI during startup session resolution, before the initial sess
This event is:
- CLI-only. It is not emitted in SDK mode.
- Startup-only. It is not emitted for later interactive `/new` or `/resume` actions.
- Bypassed when `--session-dir` is provided.
- Lower priority than `--session-dir` and `sessionDir` in `settings.json`.
- Special-cased to receive no `ctx` argument.
If multiple extensions return `sessionDir`, the last one wins.
Combined precedence is: `--session-dir` CLI flag, then `sessionDir` in settings, then extension `session_directory` hooks.
```typescript
pi.on("session_directory", async (event) => {