Send deterministic tool description and tell the model about the approval mode with each turn.#2694
Send deterministic tool description and tell the model about the approval mode with each turn.#2694aibrahim-oai wants to merge 25 commits into
Conversation
a92a18d to
5ca2285
Compare
There was a problem hiding this comment.
@aibrahim-oai looks like we might need to rebase after #3069 - we can probably wait until the follow-up is done to move to EnvironmentContext, and then land this
cfc194d to
07054b7
Compare
|
@codex review this in detail |
|
Codex Review: Didn't find any major issues. Bravo. About Codex in GitHubYour 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, or 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 fix this CI failure" or "@codex address that feedback". |
| GUIDANCE | ||
| - If unsure whether a command will be blocked, prefer setting `with_escalated_permissions=true` with a clear justification. | ||
| - The effective policy (ReadOnly / WorkspaceWrite{network_access} / DangerFullAccess) is provided separately; the above reference tells you how each policy behaves. | ||
| "#; |
There was a problem hiding this comment.
@aibrahim-oai This does indeed seem clearer, but it is quite different from our existing description, and reverts some of our recent fixes, e.g. - Reading files outside the current working directory (CWD). It also has a different format - why the drastic change?
There was a problem hiding this comment.
I just had to rewrite it to explain the different modes. Feel free to edit it directly.
There was a problem hiding this comment.
Given that much of this is covered in our prompt, I wonder if we want to simplify our tool definition altogether, instead of repeating instructions
0dd3d45 to
41759cd
Compare
1682f3f to
326e7d6
Compare
| ConfigShellToolType::ShellWithRequest { sandbox_policy } => { | ||
| tools.push(create_shell_tool_for_sandbox(sandbox_policy)); | ||
| ConfigShellToolType::ShellWithRequest => { | ||
| tools.push(create_shell_tool_for_sandbox()); |
There was a problem hiding this comment.
@aibrahim-oai can we rename this to create_shell_tool_with_request?
da89c8a to
0d4a25b
Compare
- fmt + clippy: codex-core deterministic shell tool tests, conflict cleanup - patch-tools - fix tests - add tests - add tests - patch-tools - patch-tools - patch-tools - patch-tools - patch-tools - patch-tools - patch-tools - patch-tools - patch-tools - clippy - add tests - clippy - clippy - add tests
Send deterministic tool description -> avoid breaking the cache
Tell the model about the approval mode with each turn -> to keep it aware of its environment.