fix: align Codex cron bootstrap context#81822
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source-reproducible. Current main omits lightweight cron bootstrap fields on the CLI path and CLI bootstrap preparation, while the bootstrap contract and cron docs say lightweight cron skips workspace bootstrap injection. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow field-threading and Codex project-doc suppression once maintainers accept the cron prompt-policy change and final checks are green. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main omits lightweight cron bootstrap fields on the CLI path and CLI bootstrap preparation, while the bootstrap contract and cron docs say lightweight cron skips workspace bootstrap injection. Is this the best way to solve the issue? Yes for the parameter plumbing and native project-doc suppression; they align Codex and CLI execution with the existing bootstrap contract. The cron prompt removal is plausible but should be approved as a maintainer runtime-policy decision. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 83d7ab0d362f. |
295a129 to
af6a341
Compare
daf6850 to
d6d6738
Compare
pashpashpash
left a comment
There was a problem hiding this comment.
Thanks Josh. I reviewed this from first principles and found no issues. Moving lightweight Codex cron handling into the runtime bootstrap and app-server config path is the right fix, and the embedded, CLI, and app-server coverage looks sufficient to me.
…olution # Conflicts: # CHANGELOG.md # extensions/codex/src/app-server/run-attempt.test.ts # extensions/codex/src/app-server/thread-lifecycle.ts # src/cron/isolated-agent/run-executor.ts
93b460c to
431d947
Compare
* fix: align Codex cron bootstrap context * fix: address Codex cron review comments * fix: suppress Codex project docs for lightweight context * fix: note Codex cron lightweight context
* fix: align Codex cron bootstrap context * fix: address Codex cron review comments * fix: suppress Codex project docs for lightweight context * fix: note Codex cron lightweight context
* fix: align Codex cron bootstrap context * fix: address Codex cron review comments * fix: suppress Codex project docs for lightweight context * fix: note Codex cron lightweight context
What
Align Codex app-server cron bootstrap handling with pi harness cron behavior by forwarding the payload-controlled bootstrap context mode through isolated cron execution, including the CLI path, and by disabling native Codex project-doc injection for lightweight runs.
Why
Codex cron compatibility should come from the same runtime bootstrap policy contract used by pi harness cron runs, not from Codex-specific instructions telling the model which workspace files to avoid. Lightweight Codex cron turns also need to suppress Codex-native AGENTS.md loading so workspace memory files are not pulled in indirectly.
Changes
Testing
pnpm test extensions/codex/src/app-server/thread-lifecycle.test.ts extensions/codex/src/app-server/run-attempt.test.tspnpm test extensions/codex/src/app-server/run-attempt.test.ts src/cron/isolated-agent/run.session-key-isolation.test.tsgit diff --checkpnpm check:changedReal behavior proof
/Users/phaedrus/clawd/AGENTS.md, causing the model to read workspace memory/bootstrap files before running exact-command cron payloads./Users/phaedrus/Projects/clawdbotatdaf6850720against cron379c81df-a568-4646-bd71-eee26ff91f00(Daily jalehman assigned PR review brief) withpayload.lightContext: true.clawdbot, reran the live cron through the gateway, then inspected the live cron config and Codex rollout transcript under/Users/phaedrus/.openclaw/agents/main/agent/codex-home/sessions/2026/05/14/rollout-2026-05-14T07-25-50-019e26e1-2628-7a03-9580-33f7fb01a378.jsonl.baseHasAGENTS=false,baseHasMemoryFiles=false,hasAgentsMessage=false,hasMemoryReads=false, and the only command call wascd /Users/phaedrus/Projects/openclaw && /Users/phaedrus/clawd/scripts/jalehman-assigned-pr-brief.py./Users/phaedrus/clawd/AGENTS.md, did not readSOUL.md,USER.md,PROJECTS.md,MEMORY.md, day logs, or entity summaries, and ran the exact requested brief script directly.rollout-2026-05-14T07-18-10-019e26da-21d0-7de1-80aa-75f463042dbb.jsonlincluded# AGENTS.md instructions for /Users/phaedrus/clawdand model-issued commands readingSOUL.md,USER.md,PROJECTS.md,MEMORY.md, memory files, and entity summaries before the exact cron command.