Skip to content

Let Codex agents replace the stock system prompt - #6379

Merged
markstuart-oai merged 1 commit into
v1-alphafrom
feat/v1-codex-system-prompt
Dec 2, 2026
Merged

markstuart-oai merged 1 commit into
v1-alphafrom
feat/v1-codex-system-prompt

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Agent.instructions has been appending guidance to Codex's stock prompt. With the new Agent.base_instructions option, the native engine has been using the supplied text as the base at session open and appending the same guidance.

agent = Agent(
    model=model,
    base_instructions="You are a travel planner.",
    instructions="Use metric units.",
)

Test plan

With the same instructions in each new conversation, the loopback Responses endpoint has been receiving one prompt message with the developer role in input.

base_instructions Prompt text
Omitted or None Stock Codex prompt followed by \n\nUse metric units.
"You are a travel planner." You are a travel planner.\n\nUse metric units.
"" Use metric units.

The default prompt text has been matching the pre-change bytes with and without a suffix. Separate skill and permission messages have been coming through in every case.

On reopening a conversation with a different base, Responses Lite has been retaining the earlier prompt in history and sending an explicit replacement. Start a fresh conversation to keep an earlier prompt out of the request.

Checks

  • Four new request and resume cases, also passing from an installed Linux wheel
  • 45 focused tests, Rust formatting and independent review
  • .agents/skills/code-change-verification/scripts/run.sh through formatting, lint and type checks
  • Installed SDK on GitHub with 303 passes and 12 Redis skips
  • Full local make tests run with 307 passes, 3 PostgreSQL skips and 5 failures. The workspace sandbox has been blocking native commands in those five tests.

All five command tests and all three PostgreSQL tests have been passing on GitHub. The 12 Redis tests have been passing locally.

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners December 2, 2026 21:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T21:15:11.044834Z 4aac216 PR opened
🔒 Security Review ✅ Completed 2026-12-02T21:15:45.170551Z 4aac216 PR opened
ℹ️ About Codex in GitHub

Your 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
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive static review including independent review. No actionable findings. Checked Python-to-native propagation, default versus empty/custom base instructions, prompt provenance, persisted session settings and resume overrides, and preservation of separate permissions and skills context. Hosted CI observed: {"success": 15, "skipped": 2, "in_progress": 5}. No candidate code or local tests were executed.

@markstuart-oai
markstuart-oai merged commit 137d8ad into v1-alpha Dec 2, 2026
24 checks passed
@markstuart-oai
markstuart-oai deleted the feat/v1-codex-system-prompt branch December 2, 2026 21:55
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.

2 participants