[codex] Strengthen IPython bash and edit prompts#98
Draft
samsja wants to merge 8 commits into
Draft
Conversation
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.
Summary
Strengthens the IPython prompt for two failure modes seen in the eval probes:
%%bashusage an explicit first-line contract%%bashplacement%%bashconstraintEDIT_SKILL_PROMPTwhen theeditskill is installedawait edit(...)for targeted existing-file edits<tool_call>,<arg_key>, or<arg_value>inside IPythoncodeThis is prompt-only. The runtime guard experiment was removed, so the PR does not block malformed markup in code at execution time.
Context
The small prompt probes showed that raw tool-call markup disappeared after the stronger prompt wording, and the model used
await edit(...)in most rollouts. The remaining failures were mostly IPython cell syntax issues, especially bare shell commands in Python cells instead of%%bash. This PR keeps the change prompt-only so it can be ablated separately from tool-side fixes.Validation
uv run --frozen ruff check --isolated .=> passeduv run --frozen ruff format --check --isolated .=>31 files already formatteduv run --frozen pytest tests/test_prompt.py tests/test_git_block.py -q=>63 passed