Repository navigation
fix: clarify bootstrap setup versus prompt injection - #118568
qingminglong wants to merge 5 commits into
Conversation
|
Codex review: found issues before merge. Reviewed August 20, 2026, 2:50 PM ET / 18:50 UTC. ClawSweeper reviewWhat this changesThe PR clarifies bootstrap-file creation versus prompt injection and makes the existing Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep open: the PR addresses a current cross-runtime inconsistency, but it is merge-dirty and exposes an undocumented public SDK resolver; it needs a current-main rebase and maintainer confirmation of the upgrade-visible behavior. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherAgent configuration determines whether OpenClaw loads workspace bootstrap files into prompts. CLI and native harnesses prepare those prompts differently before sending an agent turn to their respective runtimes. flowchart LR
Config[Agent configuration] --> Mode[Context injection mode]
Mode -->|always or continuation| Bootstrap[Load workspace context]
Mode -->|never| Empty[Use empty OpenClaw context]
Bootstrap --> Prompts[CLI and native harness prompts]
Empty --> Prompts
Prompts --> Turn[Agent turn]
Decision needed
Why: The setting is already valid configuration and current main has newer Codex prompt-projection behavior, so the compatibility contract cannot be selected mechanically. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +71, Docs 0, Other +2. Total +96 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main, preserve native SDK-owned document loading while suppressing only OpenClaw-managed context, document the public SDK resolver or keep it bundled-only, and refresh exact-head proof. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: current main accepts Is this the best way to solve the issue? No: the intended behavior is sound, but this stale branch must be integrated with current Codex native-document handling and its new public SDK contract before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 28ec823c3bc7. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
4fa23e3 to
eeb318f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
eeb318f to
b4e65d1
Compare
5a40512 to
96996cc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4c29a29 to
1e20508
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Closes #75184
What Problem This Solves
Fixes an issue where users who set
agents.defaults.skipBootstrap: truecould reasonably expect workspace bootstrap files to stop affecting agent prompts, while the configuration help did not explain that this setting only controls file creation or point to the existing prompt-injection control.Why This Change Was Made
Clarify the existing configuration boundary in schema help and gateway documentation:
skipBootstrapcontrols workspace file creation, whilecontextInjection: "never"controls prompt-time workspace and context-file injection. The configuration shape remains unchanged, and CLI-run preparation now honors the existing prompt-injection control.User Impact
Operators can now choose the correct setting for bootstrap-file creation versus prompt injection without relying on trial and error.
Evidence
Exact-head production-path CLI preparation proof on
1e20508b1822867ed73a77700f5db86ec699d447:node --import tsx --input-type=module -invokedprepareCliRunContextwith the repository test CLI backend and a temporary workspace containingAGENTS.md; the bootstrap resolver was not mocked.Redacted inspectable output:
The
alwayscontrol confirms the real workspace file is discoverable and injected, whileneversuppresses both the file list and its prompt content.Exact-head CLI config-schema proof:
pnpm openclaw config schema --jsonreturned exit 0 and exposedskipBootstrapas file-creation-only pluscontextInjectionvaluesalways,continuation-skip, andnever, including the per-agent override.Supporting checks on the same head: focused regression test passed (
Test Files 1 passed,Tests 1 passed | 104 skipped (105)); targetedoxfmt --checkpassed for 11 changed source files;git diff --checkpassed.Proof boundary: the production-path harness proves CLI preparation with a temporary workspace and repository test backend, and the schema CLI proves the exported configuration contract. It does not claim behavior for external providers, private credentials, or devices.
Exact PR head:
1e20508b1822867ed73a77700f5db86ec699d447.AI-assisted: Codex.