openclaw - ✅(Solved) Fix agents: add strict-agentic execution contract and revise update_plan semantics [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#64228Fetched 2026-04-11 06:15:53
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×2closed ×1

Add an opt-in embedded Pi execution contract that keeps GPT-5-style runs acting through plan-only turns, and revise update_plan so it behaves like a structured progress tool instead of a chatty completion surface.

PR 1 is intentionally GPT-5-first: it only activates the strict-agentic contract for embedded Pi openai and openai-codex GPT-5-family runs.

Root Cause

Add an opt-in embedded Pi execution contract that keeps GPT-5-style runs acting through plan-only turns, and revise update_plan so it behaves like a structured progress tool instead of a chatty completion surface.

PR 1 is intentionally GPT-5-first: it only activates the strict-agentic contract for embedded Pi openai and openai-codex GPT-5-family runs.

Fix Action

Fixed

PR fix notes

PR #64241: agents: add strict-agentic execution contract and revise update_plan semantics

Description (problem / solution / changelog)

Summary

This is PR 1 of the GPT-5.4 / Codex agentic runtime parity program tracked in #64227 and scoped by #64228.

It adds an opt-in strict-agentic execution contract for embedded Pi agents and revises update_plan so it behaves like structured progress state instead of user-visible filler. The runtime now stops treating plan-only turns as acceptable completion in strict-agentic mode and fails closed with an explicit blocked response after the retry cap.

PR 1 is intentionally GPT-5-first: in this slice, strict-agentic only activates for embedded Pi openai and openai-codex GPT-5-family runs. Unsupported providers/models keep default behavior unless tools.experimental.planTool is explicitly enabled.

What changed

  • add agents.defaults.embeddedPi.executionContract plus per-agent override support
  • resolve strict-agentic behavior through explicit-agent-aware lookup so no-session-key / hook / cron-style flows use the right agent config
  • remove default OpenAI/Codex auto-enable for update_plan
  • auto-enable update_plan only for explicit tools.experimental.planTool or supported strict-agentic GPT-5 runs
  • make update_plan non-chatty and tolerant of extra step fields
  • honor planTool: false even when strict-agentic is configured
  • treat update_plan as non-progress in plan-only retry logic
  • detect both prose plans and structured bullet plans before retrying or failing closed
  • give supported strict-agentic runs two plan-only retries before returning an explicit blocked state
  • keep the slice embedded-Pi-only rather than broadening into a provider-agnostic execution-contract framework

Why

GPT-5.4 / Codex currently stalls too easily after planning or recap-style turns. This slice makes that behavior opt-in fixable at the runtime-contract level without changing the default execution mode for every agent.

Non-goals

  • does not supersede #62989
  • does not implement #38780
  • does not address harness/plugin scope from #63452
  • embedded-Pi-only slice

Builds on prior groundwork

  • #38736
  • #37558
  • #55535
  • #57166
  • #58299

Validation

Focused checks run:

  • CI=1 pnpm vitest run src/agents/openclaw-tools.update-plan.test.ts
  • CI=1 pnpm vitest run src/agents/tools/update-plan-tool.test.ts
  • CI=1 pnpm vitest run src/agents/pi-embedded-runner/run.incomplete-turn.test.ts
  • CI=1 pnpm vitest run src/config/zod-schema.agent-defaults.test.ts
  • CI=1 pnpm vitest run src/agents/system-prompt.test.ts
  • CI=1 pnpm vitest run src/agents/tool-catalog.test.ts
  • CI=1 pnpm vitest run src/agents/openclaw-tools.sessions.test.ts
  • CI=1 pnpm vitest run src/agents/openclaw-tools.nodes-workspace-guard.test.ts
  • CI=1 pnpm vitest run src/agents/pi-embedded-runner/system-prompt.test.ts
  • CI=1 pnpm vitest run extensions/openai/transport-policy.test.ts
  • CI=1 pnpm vitest run src/plugin-sdk/provider-tools.test.ts

Linked issues

  • Closes #64228
  • Refs #64227
  • Refs #62854
  • Refs #47213
  • Refs #62989

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/.generated/config-baseline.sha256 (modified, +3/-3)
  • docs/.generated/plugin-sdk-api-baseline.sha256 (modified, +2/-2)
  • docs/gateway/configuration-reference.md (modified, +2/-2)
  • src/agents/agent-scope.ts (modified, +37/-0)
  • src/agents/openclaw-tools.registration.ts (modified, +16/-12)
  • src/agents/openclaw-tools.ts (modified, +12/-3)
  • src/agents/openclaw-tools.update-plan.test.ts (modified, +165/-11)
  • src/agents/pi-embedded-runner/run.incomplete-turn.test.ts (modified, +118/-0)
  • src/agents/pi-embedded-runner/run.ts (modified, +54/-3)
  • src/agents/pi-embedded-runner/run/incomplete-turn.ts (modified, +39/-3)
  • src/agents/pi-tools.ts (modified, +1/-0)
  • src/agents/tools/update-plan-tool.test.ts (modified, +26/-1)
  • src/agents/tools/update-plan-tool.ts (modified, +12/-7)
  • src/config/schema.base.generated.ts (modified, +56/-2)
  • src/config/schema.help.ts (modified, +7/-1)
  • src/config/schema.labels.ts (modified, +3/-0)
  • src/config/types.agent-defaults.ts (modified, +7/-0)
  • src/config/types.agents.ts (modified, +6/-1)
  • src/config/types.tools.ts (modified, +2/-2)
  • src/config/zod-schema.agent-defaults.test.ts (modified, +9/-0)
  • src/config/zod-schema.agent-defaults.ts (modified, +1/-0)
  • src/config/zod-schema.agent-runtime.ts (modified, +6/-0)
RAW_BUFFERClick to expand / collapse

Parent: #64227 Refs #62854 Refs #47213

Summary

Add an opt-in embedded Pi execution contract that keeps GPT-5-style runs acting through plan-only turns, and revise update_plan so it behaves like a structured progress tool instead of a chatty completion surface.

PR 1 is intentionally GPT-5-first: it only activates the strict-agentic contract for embedded Pi openai and openai-codex GPT-5-family runs.

Scope

  • add agents.defaults.embeddedPi.executionContract: default | strict-agentic
  • add matching per-agent override
  • stop default OpenAI/Codex auto-enable of update_plan
  • auto-enable update_plan only for explicit tools.experimental.planTool or supported strict-agentic GPT-5 runs
  • make update_plan non-chatty and tolerant of extra step fields
  • treat update_plan as non-progress in strict-agentic retry logic
  • resolve strict-agentic behavior through explicit-agent-aware lookup so no-session-key contexts use the right agent config
  • retry plan-only / filler-only GPT-5 turns under strict-agentic
  • surface an explicit blocked state after retry cap

Non-goals

  • does not supersede #62989
  • does not implement #38780
  • does not address harness/plugin scope from #63452
  • embedded-Pi-only slice

Acceptance

  • config schema accepts executionContract
  • update_plan gating semantics match the contract and precedence rules
  • update_plan emits no filler text and tolerates extra step fields
  • strict-agentic only auto-enables on supported OpenAI/OpenAI Codex GPT-5-family runs unless planTool is explicitly set
  • explicit agentId / no-session-key flows resolve the correct contract
  • strict-agentic retries plan-only turns and fail-closes after the retry cap

extent analysis

TL;DR

To address the issue, update the update_plan function to behave as a structured progress tool and implement the strict-agentic execution contract for embedded Pi GPT-5-family runs.

Guidance

  • Review the agents.defaults.embeddedPi.executionContract configuration to ensure it is set to strict-agentic for GPT-5-family runs.
  • Verify that update_plan is auto-enabled only for explicit tools.experimental.planTool or supported strict-agentic GPT-5 runs.
  • Check the retry logic for plan-only turns under strict-agentic to ensure it surfaces an explicit blocked state after the retry cap.
  • Test the update_plan function to ensure it emits no filler text and tolerates extra step fields.

Example

No explicit code example is provided, as the issue lacks specific implementation details.

Notes

The solution may require additional changes to the configuration schema and the agent override logic to fully implement the strict-agentic execution contract.

Recommendation

Apply the workaround by updating the update_plan function and implementing the strict-agentic execution contract, as this will allow for the desired behavior of plan-only turns and structured progress tooling.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix agents: add strict-agentic execution contract and revise update_plan semantics [1 pull requests, 1 participants]