You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Installer fails to install with "Cannot find name 'DEFAULT_CONTEXT_TOKENS'" in pi-embedded-runner #61567
Running the current install.sh with --install-method git --no-onboarding fails to install while running tsc -p sconfig.plugin-sdk.dts.json with errors:
src/agents/pi-embedded-runner/model.ts:516:11 - error TS2304: Cannot find name 'DEFAULT_CONTEXT_TOKENS'".
src/agents/pi-embedded-runner/model.ts:521:11 - error TS2304: Cannot find name 'DEFAULT_CONTEXT_TOKENS'".
Found 2 errors in the same file, starting at: src/agents/pi-embedded-runner/model.ts:516
ELIFECYCLE Command failed with exit code 1
The reported installer failure was caused by a missing DEFAULT_CONTEXT_TOKENS import in src/agents/pi-embedded-runner/model.ts, and that import is already restored on current main and in released code starting with v2026.4.5.
Fix commit adds the missing import: Public GitHub commit fdc2f421e4816015eb4446b7ac73972826757172 (fix: restore pnpm check type safety, 2026-04-06) includes a one-line patch re-adding import { DEFAULT_CONTEXT_TOKENS } from "../defaults.js"; to src/agents/pi-embedded-runner/model.ts. This matches the issue discussion from Linux2010. (src/agents/pi-embedded-runner/model.ts, fdc2f421e481)
Stable release contains the fix: The public v2026.4.5 release file already contains the restored import and both fallback uses, and the release compare API shows v2026.4.5 is ahead of commit fdc2f421e4816015eb4446b7ac73972826757172. (src/agents/pi-embedded-runner/model.ts:16, fdc2f421e481)
Latest release still contains the fix: The current latest release tag v2026.4.23 still contains the same import and fallback references, so there is no sign of regression on the release line. (src/agents/pi-embedded-runner/model.ts:17, a9797214338b)
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Activity
Linux2010 commentedon Apr 6, 2026
Analysis
I tested the issue on the current
upstream/main(commit 4f1cbcd) and the TypeScript compilation passes successfully:$ npx tsc -p tsconfig.plugin-sdk.dts.json # No errorsThe error mentions line 516 and 521, but in the current codebase,
DEFAULT_CONTEXT_TOKENSis used at lines 599 and 604.Possible causes:
The issue may already be fixed - Several recent commits touched
src/agents/pi-embedded-runner/model.tsandsrc/agents/defaults.ts.Git clone state - The
--install-method git --git-dirapproach may have cloned a stale or corrupted state.Request for more info:
Can you confirm:
git log -1 --format=%H)git statusshow any uncommitted changes?Linux2010 commentedon Apr 6, 2026
✅ Issue Already Fixed
This issue was fixed in commit
fdc2f421e4(2026-04-06 01:02:48 UTC):Root Cause: The import for
DEFAULT_CONTEXT_TOKENSwas accidentally removed:+import { DEFAULT_CONTEXT_TOKENS } from "../defaults.js";Verification: Running
npx tsc -p tsconfig.plugin-sdk.dts.jsonon currentupstream/mainpasses without errors.Resolution
Please pull the latest changes from
main:Then retry the installation.
steipete commentedon Apr 25, 2026
Closing this as implemented after Codex review.
The reported installer failure was caused by a missing
DEFAULT_CONTEXT_TOKENSimport insrc/agents/pi-embedded-runner/model.ts, and that import is already restored on currentmainand in released code starting withv2026.4.5.What I checked:
src/agents/pi-embedded-runner/model.tson currentmainimportsDEFAULT_CONTEXT_TOKENSand uses it for bothcontextWindowandmaxTokensfallbacks. (src/agents/pi-embedded-runner/model.ts:22, 7b5307acfc34)DEFAULT_CONTEXT_TOKENSis defined insrc/agents/defaults.ts, so the reportedTS2304symbol-not-found failure does not match current source. (src/agents/defaults.ts:6, 7b5307acfc34)fdc2f421e4816015eb4446b7ac73972826757172(fix: restore pnpm check type safety, 2026-04-06) includes a one-line patch re-addingimport { DEFAULT_CONTEXT_TOKENS } from "../defaults.js";tosrc/agents/pi-embedded-runner/model.ts. This matches the issue discussion from Linux2010. (src/agents/pi-embedded-runner/model.ts, fdc2f421e481)v2026.4.5release file already contains the restored import and both fallback uses, and the release compare API showsv2026.4.5is ahead of commitfdc2f421e4816015eb4446b7ac73972826757172. (src/agents/pi-embedded-runner/model.ts:16, fdc2f421e481)v2026.4.23still contains the same import and fallback references, so there is no sign of regression on the release line. (src/agents/pi-embedded-runner/model.ts:17, a9797214338b)So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review notes: reviewed against 7b5307acfc34; fix evidence: release v2026.4.5, commit fdc2f421e481.