Skip to content

fix(agents): drop partialJson streaming artifacts from session history repair#61151

Closed
drvoss wants to merge 6 commits into
openclaw:mainfrom
drvoss:fix/repair-partial-tool-call-streaming-artifacts
Closed

fix(agents): drop partialJson streaming artifacts from session history repair#61151
drvoss wants to merge 6 commits into
openclaw:mainfrom
drvoss:fix/repair-partial-tool-call-streaming-artifacts

Conversation

@drvoss

@drvoss drvoss commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: session transcript repair was stripping partialJson from every otherwise-complete tool-call block, which could keep interrupted Anthropic artifacts as replayable calls.
  • Why it matters: replaying an interrupted tool call can corrupt paired toolResult repair and preserve bad session state; finalized OpenAI Responses calls still need to survive cleanup, including retained sessions_spawn payloads.
  • What changed: repairToolCallInputs() now drops partialJson blocks unless they match the finalized OpenAI Responses shape, strips redundant partialJson only from those retained OpenAI blocks, and preserves the current sessions_spawn attachment content on the kept block.
  • What did NOT change (scope boundary): missing-field artifacts are still dropped, signed-thinking replay rules are unchanged, and this PR does not add provider-specific transport mutations outside transcript repair.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Memory / storage
  • Auth / tokens
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: interrupted Anthropic tool-call artifacts that still have id, name, arguments: {}, and partialJson should be dropped, while finalized OpenAI Responses tool calls should keep valid arguments, lose partialJson, and preserve retained sessions_spawn attachment content.
  • Real environment tested: local OpenClaw checkout on Windows 11 with Node 22.
  • Exact steps or command run after this patch:
    1. Ran a temporary TypeScript proof script through pnpm exec tsx that imports sanitizeToolCallInputs() from src/agents/session-transcript-repair.ts.
    2. Fed that script one finalized OpenAI-style sessions_spawn block (call_spawn|fc_456) plus one interrupted Anthropic-style block (toolu_123 with arguments: {} and partialJson).
    3. Printed the repaired assistant content from the current PR head.
  • Evidence after fix: terminal output
{
  "droppedAnthropicArtifact": true,
  "assistantContent": [
    {
      "type": "toolCall",
      "id": "call_spawn|fc_456",
      "name": "sessions_spawn",
      "arguments": {
        "attachments": [
          {
            "content": "secret data",
            "name": "a.txt"
          }
        ]
      }
    }
  ],
  "sessionsSpawnAttachmentContent": "secret data"
}
  • Observed result after fix:
    • the interrupted Anthropic artifact was removed
    • the finalized OpenAI-style sessions_spawn block stayed
    • partialJson was removed from the retained block
    • attachment content was preserved
  • What was not tested: a live remote-provider replay round-trip against Anthropic or OpenAI Responses in this environment.
  • Before evidence (optional but encouraged): the previous branch behavior kept the initialized Anthropic shape after deleting partialJson, which is the blocker called out in the ClawSweeper review.

Root Cause (if applicable)

  • Root cause: transcript repair treated any tool call with non-null arguments as complete, then removed partialJson without checking whether the remaining block was a finalized OpenAI Responses call or an interrupted Anthropic artifact.
  • Missing detection / guardrail: there was no regression coverage for the initialized Anthropic id + name + arguments: {} + partialJson shape versus the finalized OpenAI Responses call_id|item_id shape.
  • Contributing context (if known): Anthropic persists partialJson only until content_block_stop, while OpenAI Responses persists finalized function-call blocks with parsed arguments plus partialJson in history.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/agents/session-transcript-repair.test.ts
  • Scenario the test should lock in: finalized OpenAI Responses tool calls with partialJson are kept after stripping that field, initialized Anthropic artifacts with partialJson are dropped, and retained sessions_spawn attachment content is preserved on the kept block.
  • Why this is the smallest reliable guardrail: the bug is isolated to transcript-repair normalization, so direct unit coverage on repairToolCallInputs() proves the exact keep/drop/preserve behavior without needing a full provider replay harness.
  • Existing test that already covers this (if any): this PR now adds the Anthropic interrupted-shape regression to the existing partialJson coverage.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • Transcript repair now drops interrupted Anthropic partialJson artifacts instead of replaying them as valid tool calls, while still preserving finalized OpenAI Responses calls and retained sessions_spawn payloads.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: Windows 11
  • Runtime/container: Node 22 local checkout
  • Model/provider: N/A
  • Integration/channel (if any): transcript repair for agent tool-call history
  • Relevant config (redacted): default local checkout

Steps

  1. Feed transcript repair one finalized OpenAI-style sessions_spawn tool-call block with partialJson and one interrupted Anthropic-style block with arguments: {} plus partialJson.
  2. Run the local proof script through pnpm exec tsx on this branch.
  3. Run node scripts/run-vitest.mjs src/agents/session-transcript-repair.test.ts src/agents/session-transcript-repair.attachments.test.ts --run.

Expected

  • The finalized OpenAI-style tool-call block should stay, lose partialJson, and preserve sessions_spawn attachment content.
  • The interrupted Anthropic artifact should be dropped.

Actual

  • The finalized sessions_spawn block stayed and its attachment content remained secret data.
  • The interrupted Anthropic artifact was dropped.
  • src/agents/session-transcript-repair.test.ts and src/agents/session-transcript-repair.attachments.test.ts passed locally.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: direct local execution of sanitizeToolCallInputs() on the current PR branch with one finalized OpenAI-style partialJson block and one interrupted Anthropic artifact; focused transcript-repair test files.
  • Edge cases checked: sessions_spawn attachment content remains intact after partialJson stripping, and the initialized Anthropic shape is no longer replayed.
  • What you did not verify: a live remote-provider replay round-trip in this environment.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: the new shape check could drop a valid non-OpenAI tool call that still carries partialJson.
    • Mitigation: current source only persists partialJson on Anthropic streaming artifacts and finalized OpenAI Responses blocks; the regression tests pin the keep/drop split and the preserved sessions_spawn payload path.

Made with Copilot | fully reviewed by human | fully tested

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Apr 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb1484a0b8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/session-transcript-repair.ts Outdated
@greptile-apps

greptile-apps Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where streaming partialJson artifacts left on tool call blocks by interrupted provider streams were not detected by repairToolCallInputs. Those malformed blocks were persisted to session history and replayed on every subsequent request, cascading the same provider error indefinitely.

The fix adds a "partialJson" in block check as the first (short-circuit) condition in the drop filter inside repairToolCallInputs (src/agents/session-transcript-repair.ts). Because partialJson is a streaming-only assembly field that is normally removed when content_block_stop arrives, its presence definitively indicates an interrupted stream — the block is correctly dropped regardless of whether arguments/input appear populated. A new test case in src/agents/session-transcript-repair.test.ts covers both scenarios (block with partialJson + filled arguments; block with partialJson + null input), while a clean block without partialJson is preserved.

  • One minor style nit: the new comment at line 254 uses the British spelling "finalised" rather than the project-required American spelling "finalized".

Confidence Score: 4/5

Safe to merge after fixing one minor American-spelling nit in a new code comment.

The fix is targeted and logically correct. The partialJson guard is placed first in the OR chain so it short-circuits before other conditions, ensuring any streaming artifact block is always dropped. The test covers both drop scenarios (block with partialJson + populated arguments, and block with partialJson + null input) while confirming a clean block is preserved. All 26 tests pass. The only issue found is a single British-spelling nit ('finalised' vs 'finalized') in a newly added comment.

src/agents/session-transcript-repair.ts — spelling nit at line 254.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/agents/session-transcript-repair.ts
Line: 254

Comment:
**British spelling in new comment**

"finalised" is British English. Per `CLAUDE.md`, all code, comments, docs, and UI strings must use American spelling — it should be "finalized".

```suggestion
        // was finalized — treat it as an incomplete artifact and drop it.
```

**Context Used:** CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(agents): drop partialJson streaming ..." | Re-trigger Greptile

Comment thread src/agents/session-transcript-repair.ts Outdated
@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from eb1484a to 9e3f482 Compare April 5, 2026 03:03

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e3f482558

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/session-transcript-repair.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c67533d2d8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/session-transcript-repair.ts Outdated
@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from 20d8889 to 63d560e Compare April 7, 2026 07:59
@drvoss

drvoss commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

The new Codex P1 (sessions_spawn redaction bypass via partialJson strip) has been fixed in commit 20d8889368.

Root cause: the previous fix stripped partialJson and immediately pushed to nextContent via continue, bypassing the sessions_spawn sanitizeToolCallBlock path at lines 287-293.

Fix: introduced a workBlock variable. partialJson is stripped upfront and workBlock replaces block for all subsequent processing, including the sessions_spawn redaction path. No early continue is used after stripping.

Added a regression test: a sessions_spawn block with partialJson should have partialJson stripped AND attachment content redacted.

Branch rebased onto latest main (d5ed6d2). All 27 tests pass locally.

@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch 2 times, most recently from fbc27dc to 11e1569 Compare April 8, 2026 01:52
@drvoss

drvoss commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

CI update after latest rebase onto main (6211e3d):

check, build-smoke, build-artifacts, and all checks-fast-* shards now pass. The previous io.audit.ts TS2300 baseline failure is resolved.

Note on Greptile review: Greptile reviewed commit eb1484a0b89 (original implementation). The current code uses a workBlock variable to strip partialJson without bypassing sessions_spawn sanitization. The "finalised" spelling nit is not present in current code.

Remaining failures are baseline:

  • check-additional: lint:extensions:channels and lint:extensions:bundled failures on origin/main.
  • checks-node-test: upstream test suite failure on unrelated PRs as well.

@drvoss

drvoss commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

Requesting Greptile re-review of the current HEAD (11e15691cb).

The Greptile review above was on commit eb1484a0b89, which was the original drop-only implementation. The current code is substantially different:

  • The "finalised" spelling nit mentioned in the review is not present in the current code (verified: no match in session-transcript-repair.ts).
  • The partialJson handling was rewritten to use a workBlock variable rather than an early continue, specifically to ensure sessions_spawn sanitization still runs on retained blocks. The original implementation has been replaced.

Current code summary: blocks missing required fields (id, name, input/arguments) are dropped. Blocks that are complete but carry partialJson have the field stripped into workBlock; workBlock then falls through to the sessions_spawn redaction path. No early continue after stripping.

All 27 tests pass on current HEAD against latest main (6211e3d).

@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from 11e1569 to ce69aba Compare April 9, 2026 05:27
@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from ce69aba to 232f497 Compare April 27, 2026 07:16
@drvoss

drvoss commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current origin/main (090063bd43e) and force-pushed the refreshed head (232f497d68e).

What changed during the refresh:

  • preserved the workBlock flow so complete tool-call blocks keep valid data while dropping only partialJson
  • kept the sessions_spawn redaction path after partialJson stripping
  • cleaned up the rebase residue from the conflict resolution

Validation on the refreshed branch:

  • pnpm test -- src/agents/session-transcript-repair.test.ts
  • pnpm check:changed

@clawsweeper

clawsweeper Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed June 15, 2026, 6:48 AM ET / 10:48 UTC.

Summary
The PR changes session transcript repair to drop interrupted partialJson tool-call artifacts while preserving finalized OpenAI Responses tool calls, with focused regression tests.

PR surface: Source +70, Tests +101. Total +171 across 2 files.

Reproducibility: yes. Source inspection gives a high-confidence path: a signed-thinking assistant turn with a tool-call block containing partialJson enters the provider-owned preservation branch before the PR's new artifact filter can run.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: serialized state: src/agents/session-transcript-repair.test.ts, serialized state: src/agents/session-transcript-repair.ts, unknown-data-model-change: src/agents/session-transcript-repair.test.ts, unknown-data-model-change: src/agents/session-transcript-repair.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix the signed-thinking partialJson bypass and add focused regression coverage.
  • [P2] Rerun the focused transcript repair tests after refreshing the branch.

Risk before merge

  • [P1] Signed-thinking Anthropic replay can still keep an interrupted partialJson tool-call artifact, leaving the session-state repair incomplete for one provider-owned replay path.
  • [P1] The finalized OpenAI Responses heuristic is compatibility-sensitive; maintainers should keep the pipe-id retention tests while fixing the signed-thinking gap.

Maintainer options:

  1. Fix signed-thinking replay before merge (recommended)
    Move the partialJson artifact decision into the signed-thinking replay-safe path or run it before preserving that turn, then add a focused thinking-block regression.
  2. Accept unit-level provider-shape proof after the fix
    Maintainers can accept targeted transcript-repair proof without live provider replay once the signed-thinking case and OpenAI retention tests are both covered.
  3. Pause for live replay proof
    If maintainers want provider-boundary confidence beyond unit tests, wait for a live Anthropic interrupted-stream replay artifact plus an OpenAI Responses replay check.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Fix the signed-thinking `partialJson` bypass in `src/agents/session-transcript-repair.ts`: a provider-owned thinking assistant turn with a tool call carrying non-final `partialJson` must not be preserved unchanged. Add focused regression coverage in `src/agents/session-transcript-repair.test.ts` using `allowProviderOwnedThinkingReplay: true`, and inspect `src/agents/embedded-agent-runner/run/attempt.tool-call-normalization.ts` for the same preserve-before-filter invariant. Preserve finalized OpenAI Responses pipe-id retention and sessions_spawn payload preservation. Run `node scripts/run-vitest.mjs src/agents/session-transcript-repair.test.ts src/agents/session-transcript-repair.attachments.test.ts --run`.

Next step before merge

  • [P2] A narrow automated repair can cover the signed-thinking bypass and add regression coverage without a product decision.

Security
Cleared: No new permissions, dependency, workflow, credential, network, or code-execution surface is introduced by this two-file transcript repair/test diff.

Review findings

  • [P2] Reject partialJson before preserving signed-thinking turns — src/agents/session-transcript-repair.ts:397
Review details

Best possible solution:

Cover partialJson artifact rejection before or inside provider-owned signed-thinking preservation, while keeping finalized OpenAI Responses pipe-id calls and existing sessions_spawn payload preservation intact.

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

Yes. Source inspection gives a high-confidence path: a signed-thinking assistant turn with a tool-call block containing partialJson enters the provider-owned preservation branch before the PR's new artifact filter can run.

Is this the best way to solve the issue?

No. The PR is the right repair area for normal transcript cleanup, but the best fix must extend the same partialJson invariant to signed-thinking replay instead of only handling the later mutable assistant-content loop.

Full review comments:

  • [P2] Reject partialJson before preserving signed-thinking turns — src/agents/session-transcript-repair.ts:397
    The new partialJson filter only runs after the allowProviderOwnedThinkingReplay branch. A signed-thinking assistant turn with a thinking block plus an otherwise valid Anthropic-shaped tool call carrying partialJson can satisfy isReplaySafeThinkingAssistantTurn() and be pushed unchanged, so the interrupted artifact still replays. Include partialJson in the replay-safe predicate or run the keep/drop decision before preserving provider-owned thinking turns.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e7ee1c55b433.

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority bug-fix PR for session transcript repair with limited but real replay impact.
  • merge-risk: 🚨 session-state: The diff changes persisted/replayed assistant tool-call history and still leaves one provider-owned replay path able to preserve bad state.
  • merge-risk: 🚨 message-delivery: Malformed replayed tool-call history can block later assistant turns and prevent responses from being delivered.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body includes after-fix terminal JSON output from a local OpenClaw checkout plus targeted transcript-repair test commands for the normal keep/drop behavior; it does not remove the remaining signed-thinking code finding.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal JSON output from a local OpenClaw checkout plus targeted transcript-repair test commands for the normal keep/drop behavior; it does not remove the remaining signed-thinking code finding.
Evidence reviewed

PR surface:

Source +70, Tests +101. Total +171 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 87 17 +70
Tests 1 101 0 +101
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 188 17 +171

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/agents/session-transcript-repair.test.ts src/agents/session-transcript-repair.attachments.test.ts --run.

What I checked:

  • Root policy read: Root AGENTS.md was read fully and applied; it requires whole-path review, scoped AGENTS.md review, source/history proof, and careful session-state compatibility handling for agent transcript changes. (AGENTS.md:1, e7ee1c55b433)
  • Scoped policy read: src/agents/AGENTS.md was read fully; it emphasizes keeping agent tests focused and using narrow helpers for agent hot paths. (src/agents/AGENTS.md:1, e7ee1c55b433)
  • Current main signed-thinking bypass surface: repairToolCallInputs preserves replay-safe provider-owned thinking turns before the normal per-block repair loop; a partialJson artifact in that branch can be pushed unchanged unless the PR also updates this predicate/path. (src/agents/session-transcript-repair.ts:345, e7ee1c55b433)
  • Current main normal repair lacks partialJson handling: The existing normal repair loop drops blocks missing input, id, or allowed tool name, but has no partialJson check on current main. (src/agents/session-transcript-repair.ts:384, e7ee1c55b433)
  • Anthropic producer contract: Anthropic streaming tool-call blocks carry partialJson while input deltas arrive and delete it on content_block_stop, so leftover partialJson is a real interrupted-stream artifact shape. (src/agents/anthropic-transport-stream.ts:1447, e7ee1c55b433)
  • OpenAI Responses producer contract: OpenAI Responses completed function-call output can create stored toolCall blocks with pipe-separated ids and partialJson, so the PR's retained OpenAI shape distinction is needed. (src/agents/openai-transport-stream.ts:1504, e7ee1c55b433)

Likely related people:

  • steipete: Recent commits on session transcript repair, normalization-core extraction, and OpenAI/Anthropic provider replay surfaces make this person a likely reviewer for the repair boundary. (role: recent area contributor; confidence: high; commits: f84460e62534, 00d8d7ead059, 77d9ac30bb8d; files: src/agents/session-transcript-repair.ts, src/agents/openai-transport-stream.ts, src/agents/anthropic-transport-stream.ts)
  • TurboTheTurtle: Recent merged work touched transcript repair races and signed-thinking legacy tool repair, directly adjacent to the remaining bypass. (role: recent area contributor; confidence: high; commits: 44c65de17a8c, f3e61580bdc1; files: src/agents/session-transcript-repair.ts)
  • martingarramon: Authored the recent sessions_spawn transcript payload preservation change that this PR must not regress while stripping partialJson. (role: adjacent feature contributor; confidence: medium; commits: ef86d8c95c23; files: src/agents/session-transcript-repair.ts)
  • liuhao1024: Recent Anthropic signed-thinking replay work is close to the provider-owned thinking path affected by this PR's remaining gap. (role: adjacent provider contributor; confidence: medium; commits: 2e20dd8dbf82; files: src/agents/anthropic-transport-stream.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@openclaw-barnacle openclaw-barnacle Bot added the proof: supplied External PR includes structured after-fix real behavior proof. label May 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from 232f497 to 991f7e3 Compare May 12, 2026 09:17
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 12, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 12, 2026
drvoss and others added 2 commits May 29, 2026 16:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@drvoss drvoss force-pushed the fix/repair-partial-tool-call-streaming-artifacts branch from cb2c29b to 8130f43 Compare May 29, 2026 07:36
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed size: S proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 29, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 May 29, 2026
@drvoss

drvoss commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed the PR body on current head 8130f43b50719a3c346bb9f6b08cc01f8eca5a76 with fresh proof from sanitizeToolCallInputs() and current targeted test results.

Current proof now matches the branch behavior:

  • interrupted Anthropic partialJson artifacts are dropped
  • finalized OpenAI Responses blocks keep valid arguments and lose partialJson
  • retained sessions_spawn attachment content is preserved on the kept block

@clawsweeper

clawsweeper Bot commented Jun 2, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed proof: supplied External PR includes structured after-fix real behavior proof. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 2, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 14, 2026
@drvoss

drvoss commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #93469.

I reopened the same single-purpose transcript-repair fix from the latest main so it can get a fresh CI run without the stale checks-node-agentic-agents failure that kept this PR blocked.

@drvoss drvoss closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Kimi k2p5 (anthropic-messages): "Unexpected event order: message_start before message_stop" — chat unusable

1 participant