Skip to content

[codex] Strengthen IPython bash and edit prompts#98

Draft
samsja wants to merge 8 commits into
mainfrom
codex/bash-edit-prompt
Draft

[codex] Strengthen IPython bash and edit prompts#98
samsja wants to merge 8 commits into
mainfrom
codex/bash-edit-prompt

Conversation

@samsja

@samsja samsja commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Strengthens the IPython prompt for two failure modes seen in the eval probes:

  • makes %%bash usage an explicit first-line contract
  • adds correct/incorrect examples for %%bash placement
  • updates the IPython tool schema with the same %%bash constraint
  • adds an EDIT_SKILL_PROMPT when the edit skill is installed
  • tells the agent to inspect/read with Python, then use await edit(...) for targeted existing-file edits
  • warns not to write native tool-call markup like <tool_call>, <arg_key>, or <arg_value> inside IPython code
  • adds prompt tests for bash guidance and edit-skill prompt gating

This 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 . => passed
  • uv run --frozen ruff format --check --isolated . => 31 files already formatted
  • uv run --frozen pytest tests/test_prompt.py tests/test_git_block.py -q => 63 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant