Skip to content

Show workspace bootstrap context in Codex prompt snapshots#76302

Merged
pashpashpash merged 1 commit intomainfrom
codex/prompt-snapshots-bootstrap-context
May 2, 2026
Merged

Show workspace bootstrap context in Codex prompt snapshots#76302
pashpashpash merged 1 commit intomainfrom
codex/prompt-snapshots-bootstrap-context

Conversation

@pashpashpash
Copy link
Copy Markdown
Contributor

The Codex runtime prompt snapshots now show the model prompt, OpenClaw instructions, user input, and dynamic tools. One missing piece was OpenClaw's workspace bootstrap context: after the recent Codex bootstrap forwarding work, files like SOUL.md, TOOLS.md, and HEARTBEAT.md travel through Codex config.instructions, but the happy-path fixtures did not make that layer visible.

This PR adds dummy workspace bootstrap files to the snapshot generator and renders the resulting config.instructions layer in the reconstructed model-bound prompt. It also records the simulated file paths in snapshot metadata and asserts that the generated Telegram snapshot includes the bootstrap placeholders. AGENTS.md stays documented as native Codex-owned context rather than being duplicated in these fixtures.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels May 2, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 2, 2026

Codex review: needs maintainer review before merge.

Summary
The PR adds simulated SOUL.md, TOOLS.md, and HEARTBEAT.md Codex config.instructions bootstrap context to the happy-path prompt snapshot generator, fixtures, README, and snapshot assertions.

Reproducibility: yes. Current main has a focused Codex app-server test for forwarding non-AGENTS.md bootstrap content through config.instructions, and the PR’s visible change can be reproduced by running the prompt snapshot drift check on the branch.

Next step before merge
No repair lane is needed: the patch looks correct, and the remaining action is normal maintainer review plus CI for an open protected-label PR.

Security
Cleared: The diff only changes test helpers, committed prompt fixtures, fixture documentation, and test assertions; no security-sensitive or supply-chain surface is introduced.

Review details

Best possible solution:

Keep the PR open for normal maintainer review and CI, preserving the narrow snapshot-only representation of the already-shipped Codex bootstrap forwarding contract.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main has a focused Codex app-server test for forwarding non-AGENTS.md bootstrap content through config.instructions, and the PR’s visible change can be reproduced by running the prompt snapshot drift check on the branch.

Is this the best way to solve the issue?

Yes. For this PR’s goal, extending the existing prompt snapshot generator through the Codex test API config parameter is the narrowest maintainable approach and avoids changing runtime behavior.

What I checked:

Likely related people:

  • pashpashpash: Merged adjacent prompt snapshot work in Improve Codex happy path prompt snapshots #76229 and Rename Codex runtime prompt snapshot directory #76274, including the generator, fixture directory, and prompt-layer rendering that this PR extends. (role: recent prompt snapshot maintainer; confidence: high; commits: 9e57b98bb944, bcb2476ae717; files: test/helpers/agents/happy-path-prompt-snapshots.ts, test/scripts/prompt-snapshots.test.ts, test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/README.md)
  • steipete: Implemented the current-main Codex workspace bootstrap forwarding behavior and related docs/tests that the snapshot now reflects. (role: Codex bootstrap forwarding implementer; confidence: high; commits: 9fdc0e703077; files: extensions/codex/src/app-server/run-attempt.ts, extensions/codex/src/app-server/run-attempt.test.ts, docs/plugins/codex-harness.md)

Remaining risk / open question:

  • I did not run pnpm prompt:snapshots:check because this review was required to keep the checkout read-only; CI or maintainer validation should confirm generated fixture drift.
  • The fixture intentionally simulates only SOUL.md, TOOLS.md, and HEARTBEAT.md even though the runtime can forward additional bootstrap files; that looks scoped by the PR body, not a blocking correctness issue.

Codex review notes: model gpt-5.5, reasoning high; reviewed against dd43caa27aa1.

@pashpashpash pashpashpash merged commit ad0e1a0 into main May 2, 2026
80 of 81 checks passed
@pashpashpash pashpashpash deleted the codex/prompt-snapshots-bootstrap-context branch May 2, 2026 23:29
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant