Skip to content

feat(ai): opt compatible Responses endpoints into stored HTTP continuation - #128633

Merged
Patrick-Erichsen merged 25 commits into
openclaw:mainfrom
hartmark:fix/openai-responses-continuation-store-policy
Sep 15, 2026
Merged

Patrick-Erichsen merged 25 commits into
openclaw:mainfrom
hartmark:fix/openai-responses-continuation-store-policy

Conversation

@hartmark

@hartmark hartmark commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Custom OpenAI Responses endpoints cannot use HTTP continuation even when their backend supports stored responses and previous_response_id. Operators must resend the complete conversation on every turn.

Fixes #123215.

Why This Change Was Made

Adds the explicit per-model compat.supportsResponsesContinuation capability to the existing Responses payload policy, transport eligibility check, configuration schema, and model-catalog normalization. It enables store: true and continuation on verified compatible endpoints without adding another transport path.

The native no-store regression reported during review is repaired: raw native transport requests retain store: false unless explicitly opted in or changed by their caller. The shipped public payload-policy API also preserves strict storeMode: "disable" semantics, including for opted-in models. The raw builder selects a separate transport-default policy; native provider wrappers retain their existing provider-policy behavior. The dedicated Azure and ChatGPT/Codex transports remain excluded from the new opt-in, and compat.supportsStore: false disables it.

The conflict repair preserves current schema-derived model types and regenerates the configuration baselines. The loopback proof no longer forces storage through a test callback.

User Impact

An operator can set models.providers.<provider>.models[].compat.supportsResponsesContinuation: true after verifying that the endpoint supports stored responses and previous_response_id. This deliberately allows that backend to retain the model's requests, including turns that cannot continue. Other custom models stay stateless by default. No existing configuration or native storage default changes.

Custom tool-call IDs that require rewriting can still trigger safe full-history fallback. Recovering continuation savings for those cases is tracked separately in #134425; this PR does not claim to fix that optimization.

Evidence

Final repair head: 07e6ad4d4d234f39cd81ee7bee4123a377eb38e6.

  • Before/after: four native no-store assertions failed before the first repair. Two additional public-API assertions failed on that intermediate candidate because disable enabled storage for opted-in models. The final policy passes all six assertions while preserving opt-in continuation.
  • Focused validation: 545 tests passed on the final policy: 339 transport/policy/catalog/model/wrapper tests and 206 config/Azure/ChatGPT/extraparams sibling tests. All local changed-file gates passed, including production/test types, lint, configuration baselines, boundary/security guards, dead exports and import cycles. Exact-head hosted CI run 35006333394 passed, including the required openclaw/ci-gate.
  • Wire proof: unforced loopback HTTP/SSE tests derive storage from production policy, verify previous_response_id and one-message deltas across two/three turns, and verify unopted models send store: false with complete history.
  • Independent review: the P0–P2 review identified the public disable defect, which was reproduced and repaired. A fresh complete-candidate pass reported only an Azure-host exclusion finding; direct transport/source and Microsoft contract checks showed that exclusion belongs to the dedicated transport, not every compatible Azure endpoint. The docs/comment now name the excluded API/provider identities. No blocking findings remain.
  • Contract checks: direct inspection covered the stable v2026.9.3 public @openclaw/ai/transports export, installed OpenAI SDK request types, and sibling Codex source. Codex's explicit no-store contract remains unchanged.

The contributor recorded an unforced real api.openai.com run on August 31: one live test passed in 10.22 seconds. The inspected live test requires exactly two upstream requests, store: true on both, a one-message continuation delta, omission of the earlier secret, and successful recall. Its file remains unchanged. A fresh maintainer rerun could not authenticate: 1Password authorization timed out and Blacksmith is unauthenticated. Loopback results are not represented as real-service proof, and no success in the contributor's deployment is claimed.

CI prerequisites

The first refreshed head hit six existing main-branch fixture failures. This candidate includes the existing maintainer repairs, with source attribution, instead of weakening production checks:

  • #149301: focus the Codex model-attribution fixture's tool surface and return the actual background-terminal protocol shape. The full original 12-file shard passed in its original order: 87 tests.
  • Repository-identity fixture repairs were initially adopted from #149288. #149294 subsequently landed the canonical repair on main; the final refresh keeps main's exact versions, so these four files are no longer in this PR's diff. The six-suite verification passed: 564 tests, one platform skip. All 48 tests in the two mechanically resolved conflict files also passed after refresh.

Review disposition

ClawSweeper revision 22 reviewed the final head, found no correctness/security findings, judged this the best fix, and accepted the recorded live proof. Its two compatibility/retention notes are addressed through the documented opt-in contract, unchanged existing defaults, and strict public disable semantics.

The latest ClawSweeper review's endpoint-compatibility and retention notes are accepted in the documented per-model opt-in: the operator verifies the backend before enabling it, supportsStore: false still prevents storage, excluded routes stay excluded, and existing defaults/configurations require no migration. The public API's explicit no-store option also remains strict. The real-API proof establishes the API interaction; it does not certify every third-party endpoint.

Earlier repair commands and before/after evidence.

Production delta versus the refreshed main 40e6f12380e306c92c47e96f3d0caa8fe94fb825: +49/-20 (net +29); tests/test support +725/-2 (net +723); docs +3/-1 (net +2); generated +3/-3 (net 0). The production growth carries one explicit capability through the existing policy/schema/catalog contracts.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@hartmark
hartmark marked this pull request as ready for review August 24, 2026 08:52
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S and removed size: XS labels Aug 24, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 15, 2026, 2:30 PM ET / 18:30 UTC (Revision 22).

ClawSweeper review

What this changes

Adds a documented per-model setting that enables stored HTTP conversation continuation on compatible Responses endpoints, with schema, catalog, transport coverage, and a Codex test-fixture repair.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains useful: current main still limits HTTP continuation to native endpoints. The earlier no-store defects are repaired, the recorded live proof covers the opt-in, and no actionable correctness findings remain.

Priority: P2
Reviewed head: 07e6ad4d4d234f39cd81ee7bee4123a377eb38e6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with strong real-service proof and repaired compatibility regressions meets normal good PR quality.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The inspected August 31 terminal evidence exercises the production Responses transport through a forwarding proxy to real OpenAI, proving unforced storage, a trimmed second request, and recall of omitted history; the live-test source is unchanged, with supplemental final-policy regression evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The inspected August 31 terminal evidence exercises the production Responses transport through a forwarding proxy to real OpenAI, proving unforced storage, a trimmed second request, and recall of omitted history; the live-test source is unchanged, with supplemental final-policy regression evidence.
Evidence reviewed 11 items Current main still lacks the requested capability: The fetched main payload policy has no continuation opt-in, and its transport eligibility still requires supportsNativeOpenAIResponsesEndpoint. The merged native implementation in #122194 explicitly deferred custom endpoints.
Latest release preserves the older policy: The v2026.9.4 policy retains provider-policy, disable, and preserve modes without supportsResponsesContinuation; no shipped replacement for the requested custom-endpoint capability was established.
Prior no-store findings are repaired: Explicit disable remains strict; transport-default enables storage only for an eligible explicit opt-in. supportsStore:false and dedicated Azure/ChatGPT API exclusions remain effective. Native provider wrappers retain their separate provider-policy behavior.
Findings None None.
Security None None.

How this fits together

The Responses transport converts conversation history and model settings into provider requests. Its existing continuation owner can replace matching history with a previous response reference and new input, while preserving full-history recovery.

flowchart TD
  A[Conversation and model settings] --> B[Responses payload policy]
  B --> C[Storage and endpoint eligibility]
  C --> D[Session and credential scoped continuation]
  D --> E[Full history or new input plus response reference]
  E --> F[Compatible Responses endpoint]
  F --> G[Assistant reply and next baseline]
  F -->|Missing prior response| E
Loading

Before merge

  • Resolve merge risk (P1) - An explicitly opted-in backend may retain request content and must honor stored-response semantics; the real-service proof covers OpenAI through a forwarding proxy, not every third-party backend.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

Source +29, Tests +723, Docs +2, Generated 0. Total +754 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 7 49 20 +29
Tests 9 725 2 +723
Docs 1 3 1 +2
Config 0 0 0 0
Generated 2 3 3 0
Other 0 0 0 0
Total 19 780 26 +754

Review metrics

Metric Value Why it matters
Configuration contract 1 optional per-model boolean; 0 existing defaults changed The capability is opt-in and requires no migration of existing configurations.
Production versus test growth Production net +29 lines; tests/support net +723 lines Production growth carries one capability through existing policy, schema, and catalog owners; tests cover wire behavior and preserved no-store contracts.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #123215
Summary: This PR implements the custom-endpoint capability request; native continuation and noncanonical tool-ID handling are distinct related work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the documented opt-in contract (recommended)
    Accept endpoint-specific storage compatibility as the operator's explicit choice while preserving unopted defaults and strict disable semantics.

Technical review

Best possible solution:

Keep one continuation owner with explicit endpoint capability, preserved existing defaults, strict no-store controls, and documented operator verification.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature request: current main's native-only eligibility establishes the limitation, and the recorded real-API run demonstrates the proposed capability.

Is this the best way to solve the issue?

Yes. The patch extends the existing policy and continuation owner, preserves shipped no-store behavior, and keeps the separately tracked tool-ID optimization outside this change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d363685cab9f.

Labels

Label justifications:

  • P2: This is a bounded efficiency feature for operators using compatible custom Responses endpoints.
  • merge-risk: 🚨 compatibility: The new public capability relies on each opted-in endpoint correctly implementing stored-response continuation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The inspected August 31 terminal evidence exercises the production Responses transport through a forwarding proxy to real OpenAI, proving unforced storage, a trimmed second request, and recall of omitted history; the live-test source is unchanged, with supplemental final-policy regression evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected August 31 terminal evidence exercises the production Responses transport through a forwarding proxy to real OpenAI, proving unforced storage, a trimmed second request, and recall of omitted history; the live-test source is unchanged, with supplemental final-policy regression evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • hartmark: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-03T22:40:18.236Z sha 9d53ca7 :: blocked before merge. :: none
  • reviewed 2026-09-04T22:58:30.457Z sha d9ef697 :: blocked before merge. :: [P1] [P1] Preserve no-store defaults for unopted native transport callers
  • reviewed 2026-09-05T01:06:33.153Z sha 65aff2c :: blocked before merge. :: [P1] [P1] Preserve no-store defaults for unopted native transport callers
  • reviewed 2026-09-06T21:04:04.891Z sha b51e5c8 :: blocked before merge. :: [P1] [P1] Preserve no-store defaults for unopted native transport callers
  • reviewed 2026-09-09T22:02:23.477Z sha 0dcaf21 :: blocked before merge. :: [P1] [P1] Preserve no-store defaults for unopted native transport callers
  • reviewed 2026-09-10T12:12:49.867Z sha 9532049 :: blocked before merge. :: [P1] [P1] Preserve no-store defaults for unopted native transport callers
  • reviewed 2026-09-15T17:41:03.463Z sha cf6d17b :: blocked before merge. :: none
  • reviewed 2026-09-15T18:07:40.721Z sha 7eeb60a :: blocked before merge. :: none

@hartmark
hartmark force-pushed the fix/openai-responses-continuation-store-policy branch from d223ed0 to 58a052c Compare August 24, 2026 16:23
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L and removed size: S labels Aug 24, 2026
@hartmark hartmark changed the title fix(ai): make store:true actually reachable for HTTP continuation fix(ai): reintroduce compat-endpoint HTTP continuation opt-in and fix store reachability Aug 24, 2026
@hartmark

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 24, 2026
@hartmark
hartmark force-pushed the fix/openai-responses-continuation-store-policy branch from 4901728 to bdf5a55 Compare August 26, 2026 13:34
@hartmark

Copy link
Copy Markdown
Contributor Author

Fixed the P2/security finding (ChatGPT/Codex scope), added the model-resolution test, and updated the PR body with an honest re-check of live proof — see the update section above. Rebased onto latest main, tests green, autoreview clean. Converting to draft along with #128910 and #128848 while the separate continuation-eligibility blocker is under investigation.

@hartmark

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@hartmark
hartmark force-pushed the fix/openai-responses-continuation-store-policy branch from bdf5a55 to c2ce514 Compare August 28, 2026 12:27
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Conflict repair and landing verification

Repair commit: hartmark@a0edaa5
Refreshed head: d9ef6973d6f9a9eff9e4494f12e8abb686be5712. GitHub now reports mergeable. The repair is test-only: reuse current main's requestModel helper argument, port all six custom-endpoint calls to it, and preserve main's reasoning/async test coverage.

Retention decision: the requesting operator explicitly authorized landing after the review explained that the per-model opt-in sends store: true to the configured custom endpoint, including requests that do not later continue, and that the endpoint may retain their content. The subsequent instruction was to fix the conflict and autoland. This records the requested retention tradeoff rather than treating the compatibility flag as an implicit trust signal. No implementation-level security defect was identified.

Proof:

  • On the exact refreshed head, node scripts/run-vitest.mjs with the continuation, loopback SSE, prompt-observer, payload-policy, and catalog-normalization test files: 79 passed.
  • On that same head, node scripts/run-vitest.mjs src/agents/embedded-agent-runner/model.test.ts: 156 passed.
  • On the locally composed candidate, node scripts/run-vitest.mjs openai-responses: 652 passed. All 15 PR files are byte-identical between that candidate and the refreshed head.
  • oxfmt --check for the repaired test and git diff --check: passed.
  • Fresh independent autoreview of the full composed PR at P0-P2: scoped-clean, no actionable findings.

The local loopback test exercised actual HTTP/SSE, not the real OpenAI service. The contributor's earlier real-service proof was not rerun here; no claim of success in the reported production deployment is being made. Exact-head hosted CI remains a required gate before native guarded prepare/merge.

@clawsweeper re-review


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
hartmark and others added 4 commits September 5, 2026 02:56
…sponsesContinuation surface

The compat opt-in this PR adds grew the core config surface from 2420
to 2421, but the generated baseline count/hash files weren't
regenerated to match -- failing config:docs:check (checks-fast-baseline-ratchets
and check-docs both ran it). Ran `pnpm config:docs:gen` per the check's
own instruction; the growth is exactly the one new field this PR adds
(already documented/justified by the PR itself), so no other config
surface moved.
The store value here is this model's own explicitStore policy (native
OpenAI is continuation-eligible by default), unrelated to what this test is
actually about (token clamping and disabling implicit SDK retries) -- and
already has dedicated, deterministic coverage in
openai-responses-payload-policy.test.ts.

Confirmed via repeated full packages/ai suite runs (combined with other
in-flight PRs during a meta-PR rebuild) that this assertion resolves
differently depending on what other test files ran earlier in the same
process -- a real test-isolation leak elsewhere, not something this specific
test should be asserting on in the first place. Removing the incidental
assertion is the fix; the leak's actual source was not pursued further since
it's orthogonal to this test's own contract and doesn't affect production
behavior.
Conflicts: config-baseline generated files (regenerated), the old
monolithic docs/concepts/model-providers.md (main has since split it
into per-page docs; the equivalent addition now lives in
docs/concepts/model-providers/official-provider-plugins.md), and
openai-responses.test.ts's token-clamping test (main's newer version
also asserts on transportParams; kept that shape, dropped the stale
store:false expectation since native OpenAI is now continuation-
eligible by default).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
Only the two generated config-baseline files conflicted this round
(regenerated). The earlier model-providers docs split and
openai-responses.test.ts store-assertion resolutions carried forward
cleanly.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
@hartmark

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main (head 9532049f480). Only mechanical conflict resolution this round: the two generated docs/.generated/config-baseline.* files (regenerated). The earlier merge's substantive resolutions carried forward unchanged — the model-providers docs addition sits in the now-split docs/concepts/model-providers/official-provider-plugins.md, and openai-responses.test.ts's token-clamp test keeps main's dual-transportParams/mock-state shape minus the stale store: false expectation (native OpenAI is continuation-eligible by default on this branch).

mergeable: MERGEABLE. Continuation/catalog/provider/model-resolution test files green locally on this head (250 tests).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Resolved the merge conflicts and pushed cf6d17b4d496b58f5b6ba94514cf8a7714a1ee37. The repair also addresses the native no-store finding in the latest ClawSweeper review.

The root cause was the raw transport's storeMode: "disable" branch promoting storage for every native store-capable model. It now promotes storage only for an explicit compat.supportsResponsesContinuation opt-in. Native provider wrappers retain their existing provider-policy behavior; raw native requests, including sessionless requests, keep store: false. The current schema-derived config types are preserved, and generated config baselines were regenerated.

Before/after proof on the composed candidate:

  • Before the policy repair: the restored provider assertion, native raw requests with and without a session, and the native disable-policy assertion failed with store: true instead of false (4 failures across the two commands below).
  • After: 543 tests passed across transport, loopback HTTP/SSE, policy, catalog normalization, model resolution, config-schema, native provider-wrapper, Azure, and ChatGPT coverage.
  • Removed the loopback test's forced store: true override. It now proves the real policy enables storage and a one-message continuation delta for opted-in custom models, while unopted models send store: false and full history.
  • Fresh autoreview of the complete composed change was scoped-clean at its default P0 threshold. The P1 retention finding was independently verified and repaired; it was not dismissed by priority filtering.

Commands:

node scripts/run-vitest.mjs src/agents/openai-responses-payload-policy.test.ts packages/ai/src/providers/openai-responses.test.ts packages/ai/src/transports/openai-responses-client.continuation.test.ts packages/ai/src/transports/openai-responses-client.continuation-store-policy.integration.test.ts packages/ai/src/transports/openai-responses-prompt-observer.test.ts packages/model-catalog-core/src/model-catalog-normalize.test.ts src/llm/providers/stream-wrappers/openai.test.ts src/agents/embedded-agent-runner/model.test.ts
node scripts/run-vitest.mjs src/agents/embedded-agent-runner-extraparams.test.ts packages/ai/src/providers/azure-openai-responses.test.ts packages/ai/src/providers/openai-chatgpt-responses.test.ts src/config/zod-schema.providers*.test.ts
pnpm config:docs:gen
git diff --check

Contract evidence: OpenAI SDK responses.ts documents previous_response_id as the preceding response reference and store as response retention. I also personally inspected sibling Codex at 6be2a6ca952ac9f70676ce4dd07fda27175aa9dd, codex-rs/core/src/client.rs:1014-1023 (explicit store: false) and codex-rs/codex-api/src/common.rs:302-323 (WebSocket request preserves that store value). Codex/WebSocket continuation does not justify widening HTTP retention defaults.

The operator explicitly requested fixing and landing this named PR. The intended new per-model storage opt-in is retained; that direction does not cover changing unopted native defaults, which this repair restores. Docs now state that opted-in models may retain requests even when a turn cannot continue, and that compat.supportsStore: false, Azure, and ChatGPT exclusions remain effective. This addresses both Rank-up moves with the narrow contract and preserved defaults.

Known proof limits: the contributor's unforced real-OpenAI test was inspected and still asserts exactly two upstream requests, stored turns, the one-message delta, omission of earlier history, and successful recall. I have not rerun it successfully yet: local 1Password authorization timed out and Blacksmith authentication is unavailable. No new real-service or reported production-deployment success is claimed. Custom tool-call IDs that require rewriting can still cause safe full-history fallback; the separate optimization is tracked in #134425.

Current scope versus the pinned main baseline: production +38 lines, tests/test support +696, docs +2, generated +0. Growth implements the explicit capability across the existing policy/schema/catalog contract; no new transport or fallback path was added. Local changed checks and exact-head hosted CI remain in progress; landing will use the guarded native workflow after its gates pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Local validation is complete on cf6d17b4d496b58f5b6ba94514cf8a7714a1ee37: all changed-file gates passed, including production/test typechecks, lint, configuration baselines, boundary guards and import cycles, in addition to the 543 targeted tests and before/after retention reproduction above. The native review artifacts also validate against this exact head. Hosted CI remains in progress.

The earlier re-review command finished as superseded without updating the durable September 10 review. Requesting one fresh review of the finalized implementation and evidence.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Final candidate: 7eeb60a.

The wider review exposed a second retention regression: the shipped public @openclaw/ai/transports policy's storeMode: "disable" was enabling storage for opted-in models. Two assertions reproduced it on the intermediate candidate. The repair preserves strict disable and uses a separate transport-default mode in the raw builder. Both public no-store assertions, the four native-default regressions, and the continuation wire tests now pass. Final policy validation: 545 tests passed.

The prior head's six CI failures were existing fixture defects. This candidate includes the existing maintainer fixes from #149301 and #149288, preserving their attribution. The original 12-file Codex shard passed in its original order (87 tests). The six native PR-tooling suites and full changed-file gates are still completing; exact-head CI has restarted.

Fresh P0–P2 autoreview reported only a proposed Azure-host restriction. I rejected that runtime change after checking the actual owner contracts: the dedicated Azure executor does not enable HTTP continuation and its builder sets store: false; custom openai-responses endpoints use the generic executor. Microsoft documents stored responses and previous_response_id on its compatible Responses endpoint. A hostname restriction would deny a verified explicit capability. The docs and inline comment now state the excluded API/provider identities precisely. No accepted blocking findings remain.

ClawSweeper revision 20's endpoint-compatibility and retention notes are addressed: operator-verified opt-in, explicit retention disclosure, supportsStore: false respected, dedicated no-store transports excluded, and no existing default/configuration migration. The contributor's unforced real-API proof was checked against the unchanged live test. A fresh authenticated rerun remains unavailable; no new real-service success is claimed. The separate noncanonical tool-ID efficiency case stays tracked in #134425.

Production +46/-8 (net +38); tests/support +751/-9 (net +742); docs +3/-1; generated +3/-3, against pinned main ad69391. Growth carries the explicit capability through the existing policy/schema/catalog contracts; the strict public API repair adds no net production lines.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Patrick-Erichsen commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Final head: 07e6ad4.

All local validation is complete:

  • 545 continuation/policy/provider/catalog/schema and sibling tests passed, including the six before/after no-store regression assertions.
  • Original Codex 12-file CI shard: 87 passed in its original execution order.
  • Native PR workflow suites: 564 passed, one platform skip.
  • After the final main-conflict resolution: all 48 tests in the two conflict files passed.
  • All changed-file gates passed: production/test typechecks, core/plugin/tooling lint, configuration baselines, boundary/security guards, dead exports and import cycles.

Main landed the repository-identity repair through #149294 during validation. The refresh retains main's exact fixtures, removing those four files from this PR's diff. The executable continuation code and its tests are unchanged from the head reviewed by ClawSweeper revision 21. The only additional feature-file change shortens a stale comment to distinguish continuation from instructions support.

Revision 21's two before-merge notes are explicitly accepted and addressed: retain the documented endpoint opt-in, require operator verification of backend storage/continuation semantics, disclose retention, preserve existing defaults and strict public disable, and make no existing-config migration necessary. The reviewer found no correctness/security findings and accepted the unchanged recorded real-service proof. No new live-service success is claimed.

Final delta against refreshed main: production +49/-20 (net +29), tests/support +725/-2 (net +723), docs +3/-1, generated +3/-3. The source growth carries one capability through existing owners; obsolete comment text was removed.

Exact-head hosted CI run 35006333394 passed, including required openclaw/ci-gate. ClawSweeper revision 22 also reviewed this final head with no actionable correctness/security findings. Native prepare and merge completed successfully: landed commit cc2639283d95.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Merged via squash.

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

Labels

agents Agent runtime and tooling clawtributor-review Clawtributor pull request awaiting prioritized maintainer review docs Improvements or additions to documentation extensions: codex merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: reintroduce compat.supportsResponsesContinuation opt-in for custom OpenAI-Responses-compatible endpoints

4 participants