GPT-5 agents now auto-activate strict-agentic execution by default

OpenAI and Codex users running GPT-5 models no longer need to manually configure the strict-agentic execution contract — it activates automatically out of the box, ending the stall-after-planning issue that plagued unconfigured setups.
GPT-5 agents running on OpenAI or Codex now activate the strict-agentic execution contract automatically, without requiring manual configuration. Previously, users had to explicitly set agents.defaults.embeddedPi.executionContract: "strict-agentic" to get the improved completion behavior — a step many never discovered, leaving their agents stuck after planning turns. The contract now fires for any GPT-5 family member: gpt-5, gpt-5.4, gpt-5o, gpt-5-preview, gpt-5-turbo, and date-suffixed variants like gpt-5-2025-03. Model identifiers with provider prefixes (such as ) are handled correctly too. Users who prefer the looser default can still opt out explicitly by setting the contract to "default" in their config.
This PR is the foundation for the broader GPT-5.4 parity program. Without auto-activation, the behavioral fixes in the companion PR (#65257) would never fire for unconfigured users, and the test harness in #65224 would have nothing to validate. The changes live in the agent execution contract layer, with supporting liveness state emissions added to the terminal exit paths.
View Original GitHub Description
Summary
Auto-activates the strict-agentic execution contract for unconfigured GPT-5 openai / openai-codex runs so the behavioral improvements from the parity program work out of the box. Previously users had to manually set agents.defaults.embeddedPi.executionContract: "strict-agentic" — now it just works.
Part of #64227. See the umbrella for how this fits with #65224 (test proof) and #65257 (behavioral fix).
What changed
src/agents/execution-contract.ts
resolveEffectiveExecutionContract()auto-activates strict-agentic when the provider isopenaioropenai-codexand the model matchesgpt-5*. Explicit"default"opt-out is honored.stripProviderPrefix()handles prefixed model IDs (openai/gpt-5.4,openai:gpt-5.4).STRICT_AGENTIC_MODEL_ID_PATTERNcoversgpt-5,gpt-5.4,gpt-5o,gpt-5-preview,gpt-5-turbo, and date-suffixed variants likegpt-5-2025-03.- Explicit
"blocked"liveness state at the strict-agentic blocked exit.
How this PR relates to the others
- #65224 tests the activated contract through the 10-scenario parity pack
- #65257 builds on the activated contract to fix the behavioral gaps (prompt + detection + continuation loop)
- This PR is the foundation — without auto-activation, the other two don't fire for unconfigured GPT-5 users
Review status
- Hardening pass complete on current head.
- Unresolved review-thread count:
0. - Targeted runtime validation remains green on the latest commit.