fix(discovery): researcher must not assume skills preload succeeded - #2374
Conversation
Require confirming the preload-liveness sentinel or Reading the research skill before work, and mandate preload_token in the return payload. Fixes #2338 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 2m 12s —— View job Security Review
This PR only touches plugin documentation/instruction files (an agent-definition prompt, a manifest version bump, and a changelog) — no executable code, workflows, or dependencies. Findings below are limited to the reasoning content of IMPORTANT — Preload-liveness check is self-defeating (tautological): the sentinel is embedded in the always-loaded base prompt it's supposed to gateConfidence: Medium plugins/discovery/agents/researcher.md#L16-L29 The whole point of this PR is to stop the researcher agent from silently assuming The problem: this exact sentinel string is now printed inside This is exactly the failure mode the file itself warns about a few paragraphs later (the existing "Preload liveness" section): "An undisciplined run that still writes an artifact and still reports This is a prompt-engineering/behavioral-reliability issue rather than a classic injection or auth bug, but it's security-relevant because it's the exact bypass this PR sets out to close (issue #2338), and the failure is silent by design — the agent has no way to self-detect it got this wrong. Consider only stating the sentinel format/purpose in the base prompt without printing the literal token value there (keep the literal value solely in No other security issues found. Specifically checked and clear:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 131a3dc91d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude finished @kyle-sexton's task in 3m 9s —— View job Review: fix(discovery): researcher must not assume skills preload succeeded
Scope: Verified independently: the sentinel string Findings1. Ambiguous deferral scope in the new fallback instruction ( 2. New preamble duplicates an existing, unedited section without cross-referencing it (🟡 maintainability/documentation). This PR adds preload-liveness handling at the top of the file (lines 16–30), but the file already had a section doing overlapping work, left untouched by this diff: That section pre-dates this PR (present in the parent commit
Not reviewed (out of lane)Security-relevant aspects (if any) are left to the |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…nce (#3092) Closes #2895 ## Summary A matching `preload_token` no longer proves that `skills:` preload fired. The #2374 disk fallback Reads the same `SKILL.md`, so a recovered agent echoes the same token a preloaded agent would — and the agent body also embedded the token, so it could be echoed without seeing the skill at all. That defect was on `discovery:researcher` (the filed case) and the same pattern on `discovery:intent-tracer`. ## Fix Stop treating the token as preload evidence. It is file-identity only (the discipline body reached the agent by some route) and lives only in the skill file. Provenance is a structured `preload: fired | fallback` field the parent grades. `fallback` is the accepted #2374 recovery, not a discard. A missing or unrecognized `preload:` field is an out-of-date agent definition. Applied to both families that had a disk fallback (`researcher`, `intent-tracer`). `explorer` has no fallback path and is unchanged. A sentinel that cannot be echoed from a disk read would require a harness-injected runtime value that is not in any file. This repo cannot mint that, so the honest fix is to stop inferring preload from the token. ## Verification - `bash plugins/discovery/scripts/contract.test.sh` — all assertions passed, including the #2895 pins on both families (token absent from the agent body; `preload: fired|fallback` required; parent must not infer `fired` from a matching token) - `bash plugins/discovery/agents/tool-honesty.test.sh` — all passed - `bash plugins/discovery/scripts/check-dispatch-artifact.test.sh` — all passed - changelog-parity (`--check`, `--check-bump origin/main`, `--check-preserved`, `--check-order`) — passed - New evals `matching-token-is-file-identity-not-preload-proof` on research and trace-intent ## Related Refs #2338 (preload miss on dispatched `discovery:researcher`). Refs #2374 (disk fallback that made the token unsound as preload evidence). --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Closes #2338
Summary
The researcher agent no longer assumes agent
skills:preload injected the research discipline.Fix
Requires confirming the preload-liveness sentinel or Reading the skill before work, and mandates
preload_tokenin the return payload.Verification
Related
N/A