feat(codex): add prompt and compaction hooks (#70313)

* feat(codex): add prompt and compaction hooks

* fix(codex): clean prompt and compaction hook tests
This commit is contained in:
Vincent Koc
2026-04-22 15:56:08 -07:00
committed by GitHub
parent ac8495adaa
commit e8b56a9928
9 changed files with 475 additions and 37 deletions

View File

@@ -17,6 +17,10 @@ discovery, native thread resume, native compaction, and app-server execution.
OpenClaw still owns chat channels, session files, model selection, tools,
approvals, media delivery, and the visible transcript mirror.
Native Codex turns also respect the shared `before_prompt_build`,
`before_compaction`, and `after_compaction` plugin hooks, so prompt shims and
compaction-aware automation can stay aligned with the PI harness.
The harness is off by default. It is selected only when the `codex` plugin is
enabled and the resolved model is a `codex/*` model, or when you explicitly
force `embeddedHarness.runtime: "codex"` or `OPENCLAW_AGENT_RUNTIME=codex`.