Skip to content

[Bug]: Installer fails to install with "Cannot find name 'DEFAULT_CONTEXT_TOKENS'" in pi-embedded-runner #61567

Closed

Description

@contentfree

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

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

Steps to reproduce

  1. Run curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --install-method git --git-dir ~/openclaw --no-onboard --verbose
  2. Fail

Expected behavior

Should install successfully

Actual behavior

Fails with errors mentioned in summary

OpenClaw version

main (reports as 2026.4.5)

Operating system

macOS Taho 26.2

Install method

git

Model

n/a

Provider / routing chain

n/a

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Severity: Blocks Install

Additional information

No response

Activity

  1. added
    bug
    on Apr 6, 2026
  2. added
    regression
    on Apr 6, 2026
  3. Linux2010 commented on Apr 6, 2026

    @Linux2010
    Contributor

    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 errors

    The error mentions line 516 and 521, but in the current codebase, DEFAULT_CONTEXT_TOKENS is used at lines 599 and 604.

    Possible causes:

    1. The issue may already be fixed - Several recent commits touched src/agents/pi-embedded-runner/model.ts and src/agents/defaults.ts.

    2. Git clone state - The --install-method git --git-dir approach may have cloned a stale or corrupted state.

    Request for more info:

    Can you confirm:

    • What commit hash was cloned? (check with git log -1 --format=%H)
    • Does git status show any uncommitted changes?
    • Does a fresh clone reproduce the issue?
  4. Linux2010 commented on Apr 6, 2026

    @Linux2010
    Contributor

    ✅ Issue Already Fixed

    This issue was fixed in commit fdc2f421e4 (2026-04-06 01:02:48 UTC):

    fix: restore pnpm check type safety
    
     src/agents/pi-embedded-runner/model.ts | 1 +
    

    Root Cause: The import for DEFAULT_CONTEXT_TOKENS was accidentally removed:

    +import { DEFAULT_CONTEXT_TOKENS } from "../defaults.js";

    Verification: Running npx tsc -p tsconfig.plugin-sdk.dts.json on current upstream/main passes without errors.

    Resolution

    Please pull the latest changes from main:

    cd ~/openclaw
    git pull origin main

    Then retry the installation.

  5. steipete commented on Apr 25, 2026

    @steipete
    Contributor

    Closing this as implemented after Codex review.

    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.

    What I checked:

    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.

  6. locked as resolved and limited conversation to collaborators on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugregression

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions