Skip to content

fix(codex): route workspace memory through tools#87403

Merged
steipete merged 1 commit into
release/2026.5.27from
backport/codex-memory-context-routing-2026.5.27
May 27, 2026
Merged

fix(codex): route workspace memory through tools#87403
steipete merged 1 commit into
release/2026.5.27from
backport/codex-memory-context-routing-2026.5.27

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary:

  • Backports fix(codex): route workspace memory through tools #87383 to release/2026.5.27.
  • Routes configured-workspace Codex MEMORY.md through memory tools with a small pointer when tools are available.
  • Keeps bounded raw MEMORY.md fallback when tools are unavailable or active workspace differs, and preserves extra nested MEMORY.md bootstrap files.

Verification:

  • pnpm install
  • fnm exec --using 24.15.0 -- node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-codex.config.ts --configLoader runner extensions/codex/src/app-server/run-attempt.test.ts -t "MEMORY.md" --reporter=verbose
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/codex/src/app-server/run-attempt.ts extensions/codex/src/app-server/run-attempt.test.ts src/plugin-sdk/agent-harness-runtime.ts
  • fnm exec --using 24.15.0 -- node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-backport.tsbuildinfo
  • fnm exec --using 24.15.0 -- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test-backport.tsbuildinfo
  • pnpm check:docs
  • git diff --check origin/release/2026.5.27...HEAD

Behavior addressed: Native Codex release builds no longer paste configured workspace MEMORY.md into every turn when memory tools can serve it on demand.
Real environment tested: Local release/2026.5.27 checkout on Node 24.15.0.
Exact steps or command run after this patch: Focused MEMORY.md Vitest filter plus touched lint, extension typecheck, extension test typecheck, docs check, and diff whitespace check.
Evidence after fix: MEMORY.md focused tests passed: 7 passed, 239 skipped in run-attempt.test.ts.
Observed result after fix: Root MEMORY.md routes through memory_search/memory_get pointer when available, falls back to bounded context without tools or with a noncanonical workspace, and nested MEMORY.md stays in context.
What was not tested: Full release CI was not run locally; autoreview process hung after 6 minutes and returned empty output.

* fix(codex): route workspace memory through tools

* fix(codex): preserve extra memory bootstrap files

* fix(codex): support memory_get-only context routing

* fix(codex): only tool-route canonical workspace memory

* fix(codex): keep memory fallback for sandbox workspaces

(cherry picked from commit d93524d)
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: L maintainer Maintainer-authored PR labels May 27, 2026
@steipete steipete merged commit 6da4ff2 into release/2026.5.27 May 27, 2026
125 of 131 checks passed
@steipete steipete deleted the backport/codex-memory-context-routing-2026.5.27 branch May 27, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant