openclaw - 💡(How to fix) Fix build: codex run-attempt imports resolveAgentDir, but plugin-sdk/agent-harness-runtime never re-exported it (regression in 35da7d2c99) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78064Fetched 2026-05-06 06:17:15
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

pnpm build:docker (and any consumer of pnpm build) fails on main with a missing-export error from the codex extension. The break was introduced in 35da7d2c99 ("refactor: remove legacy agent dir resolver").

[MISSING_EXPORT] Error: "resolveAgentDir" is not exported by "src/plugin-sdk/agent-harness-runtime.ts".
    ╭─[ extensions/codex/src/app-server/run-attempt.ts:19:3 ]
 19 │   resolveAgentDir,
    │   ───────┬───────
    │          ╰───────── Missing export

Error Message

[MISSING_EXPORT] Error: "resolveAgentDir" is not exported by "src/plugin-sdk/agent-harness-runtime.ts". ╭─[ extensions/codex/src/app-server/run-attempt.ts:19:3 ] │ 19 │ resolveAgentDir, │ ───────┬─────── │ ╰───────── Missing export

Root Cause

In 35da7d2c99, extensions/codex/src/app-server/run-attempt.ts:19 was changed to import resolveAgentDir from openclaw/plugin-sdk/agent-harness-runtime (replacing the deprecated resolveOpenClawAgentDir), but the matching re-export was never added to src/plugin-sdk/agent-harness-runtime.ts. The barrel still only re-exports resolveOpenClawAgentDir from ./agent-dir-compat.js (line 89). The function exists at src/agents/agent-scope-config.ts:179 — just not surfaced through the SDK barrel that the codex extension imports from.

run-attempt.ts uses it at two call sites: line 388 and line 1480.

Fix Action

Workaround

Pin to v2026.5.4 (last release tag before the break) and redeploy.

Code Example

[MISSING_EXPORT] Error: "resolveAgentDir" is not exported by "src/plugin-sdk/agent-harness-runtime.ts".
    ╭─[ extensions/codex/src/app-server/run-attempt.ts:19:3 ]
 19 │   resolveAgentDir,
    │   ───────┬───────
    │          ╰───────── Missing export

---

export { resolveAgentDir } from "../agents/agent-scope-config.js";
RAW_BUFFERClick to expand / collapse

Summary

pnpm build:docker (and any consumer of pnpm build) fails on main with a missing-export error from the codex extension. The break was introduced in 35da7d2c99 ("refactor: remove legacy agent dir resolver").

[MISSING_EXPORT] Error: "resolveAgentDir" is not exported by "src/plugin-sdk/agent-harness-runtime.ts".
    ╭─[ extensions/codex/src/app-server/run-attempt.ts:19:3 ]
 19 │   resolveAgentDir,
    │   ───────┬───────
    │          ╰───────── Missing export

Root cause

In 35da7d2c99, extensions/codex/src/app-server/run-attempt.ts:19 was changed to import resolveAgentDir from openclaw/plugin-sdk/agent-harness-runtime (replacing the deprecated resolveOpenClawAgentDir), but the matching re-export was never added to src/plugin-sdk/agent-harness-runtime.ts. The barrel still only re-exports resolveOpenClawAgentDir from ./agent-dir-compat.js (line 89). The function exists at src/agents/agent-scope-config.ts:179 — just not surfaced through the SDK barrel that the codex extension imports from.

run-attempt.ts uses it at two call sites: line 388 and line 1480.

Reproduction

Clean clone of main, then fly deploy against the upstream Dockerfile (or pnpm build:docker directly) fails at the rolldown bundling step with the error above. This blocks the docs/install/fly.md install path completely.

Suggested fix

Add the re-export to src/plugin-sdk/agent-harness-runtime.ts:

export { resolveAgentDir } from "../agents/agent-scope-config.js";

This is additive and matches the codex import site without reverting the refactor.

Workaround

Pin to v2026.5.4 (last release tag before the break) and redeploy.

extent analysis

TL;DR

Add a re-export for resolveAgentDir in src/plugin-sdk/agent-harness-runtime.ts to fix the missing-export error.

Guidance

  • Verify the error by checking the import statement in extensions/codex/src/app-server/run-attempt.ts and the export statements in src/plugin-sdk/agent-harness-runtime.ts.
  • Add the suggested re-export to src/plugin-sdk/agent-harness-runtime.ts: export { resolveAgentDir } from "../agents/agent-scope-config.js";.
  • As an alternative, consider pinning to v2026.5.4 and redeploying as a temporary workaround.
  • Review the changes introduced in 35da7d2c99 to ensure the refactor is correct and the new import is necessary.

Example

The re-export can be added as follows:

export { resolveAgentDir } from "../agents/agent-scope-config.js";

This line should be added to src/plugin-sdk/agent-harness-runtime.ts.

Notes

The suggested fix is additive and does not revert the refactor, making it a safe change. However, it's essential to review the changes and ensure the new import is correct.

Recommendation

Apply the workaround by pinning to v2026.5.4 if a quick fix is needed, but consider adding the re-export as a more permanent solution to resolve the missing-export error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix build: codex run-attempt imports resolveAgentDir, but plugin-sdk/agent-harness-runtime never re-exported it (regression in 35da7d2c99) [1 comments, 2 participants]