Repository navigation
feat(core): state the environment once in the prompt and pin it with a golden file - #491
Merged
Merged
Conversation
…a golden file Prompt 27. One Environment section says the workspace root is the user's checkout, commands run as the user with their environment and network, changes apply immediately, whether the run is snapshotted for qq undo, the session's mode, the fixed stops, and what a permission_denied result means. Approval and policy wording leaves the tool phrases and the spawn_agent, read_file, exec, fetch and ask_user descriptions. The nested instruction bullet shrinks to one search. A final-answer bullet asks for the outcome first with path:line citations, and in Auto to take an in-scope next step instead of offering it. crates/qq-core/tests/golden/root_prompt.txt holds the full root prompt; QQ_UPDATE_GOLDENS=1 rewrites it.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Plan section E. The agent prompt moves to version 27.
One Environment section states what tool descriptions used to repeat:
qq undo(session root in a Git checkout);permission_denied:result means.Sub-agents are told they work within their parent's authority and under the parent's snapshot. The absolute path stays out of the prompt (fix(core): keep the system prompt identical across task workspaces #459).
"may require user approval", "approval gate", "declared policy" and "host supplies" are gone. The
spawn_agent,read_file,exec,fetchandask_userdescriptions now say only how to use the tool.execstays consistent with feat(core): let long shell commands yield and follow them with command_status #488 (yield_after_seconds,command_status), including the variant used withoutshell.The nested-instructions bullet shrinks from about 1.3 KB to one sentence.
A final-answer bullet: lead with the outcome, keep it short, cite
path:line. In Auto, take an in-scope next step instead of offering it. Sub-agents keep their own reply shape.crates/qq-core/tests/golden/root_prompt.txtpins the full root prompt.QQ_UPDATE_GOLDENS=1rewrites it, the same variable the TUI goldens use; no new dependency.The session's mode and snapshot flag now feed
PromptPrefixKey, so the compaction summarizer still shares the prompt runs' cache prefix. The schema, descriptor and prompt-version pins are updated, and the historical v14 reconstruction gains a v27 reversal step.docs/design/tools.mdis updated. Indocs/plans/README.md, section E now holds only its acceptance criterion.Verification
the_root_prompt_matches_its_golden,the_environment_states_mode_snapshot_and_stops,a_write_child_defers_to_its_parent_and_its_snapshot,a_run_without_tools_has_no_environment.cargo xtask check: passed on 906c329 (fmt, lint, clippy, all 7 affected packages' tests).approval.rs,sessions/approvals.rsandundo.rsfound four wrong claims in an earlier draft (Full, Ask, write-child mode, write-child snapshot). All four are fixed and tested.Known impact
.gitin the workspace or an ancestor, not bygit rev-parseasundo::discoverdoes. A missinggitbinary, orgit initwhile a plan is cached, can make that line wrong. A failed snapshot is still logged.closing_goal_host_drains_accepted_work_without_admitting_successors,loading_exhaustion_without_work_blocks_after_three_attempts) timed out once under full parallel load. Both pass alone and onorigin/main.