Skip to content

fix(pi): keep appended prompts out of path resolution#1651

Draft
NathanFlurry wants to merge 1 commit into
mainfrom
1650
Draft

fix(pi): keep appended prompts out of path resolution#1651
NathanFlurry wants to merge 1 commit into
mainfrom
1650

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Fixes #1650.

What changed

  • Route Pi adapter appended system prompt text through appendSystemPromptOverride when extensions require DefaultResourceLoader.
  • Add a regression test proving long prompt text is not passed to Pi's path-probing appendSystemPrompt option.
  • Update the Pi extensions E2E to explicitly project the built Pi package before createSession("pi").

Why

When any Pi extension was present, the adapter switched from MinimalResourceLoader to Pi's DefaultResourceLoader. Passing the OS/tool instructions as appendSystemPrompt caused Pi to check whether that long text existed as a filesystem path, triggering File name too long during session/new.

Validation

  • pnpm --filter @agentos-software/pi check-types
  • pnpm --filter @agentos-software/pi test
  • AGENTOS_E2E_FULL=1 pnpm --dir packages/core exec vitest run tests/pi-extensions.test.ts --reporter=verbose
  • pnpm exec biome check registry/agent/pi/src/adapter.ts registry/agent/pi/tests/adapter.test.mjs packages/core/tests/pi-extensions.test.ts
  • node scripts/verify-fixed-versions.mjs

@railway-app

railway-app Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚅 Deployed to the agentos-pr-1651 environment in agentos

Service Status Web Updated (UTC)
agentos 😴 Sleeping (View Logs) Web Jul 7, 2026 at 9:20 pm

🚅 Environment agentos-pr-1651 in rivet-frontend has no services deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session/new crashes ("File name too long") when any pi extension is present — OS instructions passed as a filesystem path

1 participant