Repository navigation
fix(core): keep the system prompt identical across task workspaces - #459
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
a1b8447 to
4791c47
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
The first line of the system prompt named the absolute workspace root. Under Auto on Linux, each run executes in its own
task-workspaces/<run_id>directory, so every new run in a session sent a different system prompt. The system prompt is the head of every provider's cached prefix (Anthropic, Bedrock, OpenAI, xAI), so each run re-paid its tools, instructions and whole history as uncached input. Tools already reject absolute paths, so the model gained nothing from the path.The header now reads "You are QQ, a coding agent operating in a workspace." The unused
workspaceparameter is removed from the prompt builders. The prompt version moves to 23; the earlier descriptor goldens pin prompt 22 explicitly.First PR in a stack of prompt-cache fixes (next: budget-final notice as a message, then a session cache key for OpenAI Responses and xAI).
Verification
plan::tests::the_system_prompt_is_identical_across_workspace_locationsfailed before the fix and passes after. It compiles the same plan at two directories and requires byte-identical prompts.qq run --approval autoruns in one session, in two different task directories.…/task-workspaces/93b59ec7…vs request 1…/task-workspaces/f86f41c9…. Only the instructions differed.system_prompt_hash5fde0b3c…at prompt version 23.cargo xtask checkpasses. Two lines inxtask/src/legacy-sleeps.txtmoved by one line because of the edits inlib.rs; no new sleeps.Known effects
The prompt hash changes for every route, so the first request after upgrading is a one-time cache miss.