fix(agents): filter runtime context from context engines#76251
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection on current main shows Real behavior proof Next step before merge Security Review detailsBest possible solution: Keep the lifecycle-boundary filter and regression coverage, then land after maintainer undraft/review and exact-head checks remain green. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows Is this the best way to solve the issue? Yes. Reusing the existing runtime-context custom-message stripper at the harness lifecycle boundary is the narrow maintainable fix, and the proposed helper preserves the pre-prompt/new-turn boundary by filtering each side separately. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c874c0863ada. |
d06d436 to
4740481
Compare
4740481 to
1eed41b
Compare
Summary
openclaw.runtime-contextcustom messages before harness context-engineassemble,afterTurn, and ingest fallback hooksTests
pnpm test src/agents/harness/context-engine-lifecycle.test.ts -- --reporter=verbosepnpm exec oxfmt --check --threads=1 src/agents/harness/context-engine-lifecycle.ts src/agents/harness/context-engine-lifecycle.test.ts CHANGELOG.mdgit diff --check origin/main...HEADpnpm testbox:run --id tbx_01kqn6fkkfrhnm91n4d38s4h4s -- "OPENCLAW_TESTBOX=1 pnpm check:changed"