pi-test.sh is intended to exercise the TypeScript source tree, but running packages/coding-agent/src/cli.ts directly with node still resolves workspace package imports through package.json exports. For @earendil-works/pi-ai, that means @earendil-works/pi-ai/oauth can load packages/ai/dist/oauth.js instead of packages/ai/src/oauth.ts.
Run the CLI via the workspace tsx binary with the root tsconfig so package path aliases are active. This keeps source-mode testing on packages/*/src and prevents stale dist files from masking source changes such as OAuth login flow updates.