Repository navigation
fix: recover GitHub Copilot sessions with invalid tool call ids - #108029
goutamadwant wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 6:20 PM ET / 22:20 UTC. Summary PR surface: Source +66, Tests +104. Total +170 across 7 files. Reproducibility: no. high-confidence repeatable live path is available yet: the linked report contains a concrete GitHub Copilot 400 and the branch encodes that path in focused tests, but the contributor has no disposable provider transcript to run after the fix. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Retain the bounded same-API retry design and merge only after a redacted GitHub Copilot run shows the malformed historical ID rejection followed by a successful sanitized retry without affecting an OpenAI Responses fallback. Do we have a high-confidence way to reproduce the issue? No high-confidence repeatable live path is available yet: the linked report contains a concrete GitHub Copilot 400 and the branch encodes that path in focused tests, but the contributor has no disposable provider transcript to run after the fix. Is this the best way to solve the issue? Yes, provisionally: one forced strict-sanitization retry scoped to the rejecting API is narrower than changing baseline transcript policy or allowing the override to leak into model fallbacks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 867a2296eb2c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +66, Tests +104. Total +170 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (3 earlier review cycles)
|
d35df4d to
3238450
Compare
3238450 to
97c1b40
Compare
66b9b92 to
379a4e3
Compare
32c6dc9 to
13b9fca
Compare
13b9fca to
7341fe7
Compare
|
Closing per ClawSweeper review verdict |
Closes #108002
What Problem This Solves
Fixes an issue where users running Claude through GitHub Copilot could receive the same invalid tool-call ID rejection repeatedly even after OpenClaw announced that tool calls would be sanitized on retry.
Why This Change Was Made
The first explicit tool-call ID format rejection now triggers one bounded retry with strict replay ID sanitization enabled. The retry recognizes dotted, underscored, spaced, and hyphenated provider error forms, overrides weaker planned ID modes, and applies only to the API that rejected the transcript. Repeated errors, unrelated format failures, and later fallback APIs continue through the existing recovery paths without inheriting the forced policy.
User Impact
Malformed historical tool-call IDs can be repaired on the immediate retry instead of wasting multiple provider attempts before falling back to another model. OpenAI Responses transports and unrelated request-format failures retain their existing behavior.
Evidence
messages.17.content.0.tool_use.id: String should match pattern, followed by the same failure after the sanitize-on-retry message.node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/attempt.transcript-policy.test.tspassed: 1 file, 6 tests.pnpm tsgo:core:testpassed for the core test type graph.oxfmt,oxlint, andgit diff --checkvalidation passed for the touched files.Disclosure: AI was used to understand the codebase and review the fix.