Skip to content

fix(native): prevent duplicate chat replies after tool runs - #115678

Merged
steipete merged 1 commit into
mainfrom
codex/fix-native-transcript-identity-107589
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-native-transcript-identity-107589

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #107589

What Problem This Solves

Fixes an issue where users viewing native iOS or macOS chat would see an old assistant reply duplicated or move below a newer turn when live session events and gateway history replayed the same tool-using assistant message.

Why This Change Was Made

The gateway already provides a durable transcript message identity, but native session-event decoding discarded its envelope identity, and native chat reconciliation and deduplication ignored the persisted transcript identity. Propagate that existing canonical identity onto live messages, reconcile and deduplicate canonical rows by it, and retain it when adopting gateway history. Preserve idempotency-key precedence so optimistic user echoes continue to reconcile correctly.

User Impact

Native chat now preserves one correctly ordered assistant reply per canonical gateway message. Separate assistant turns with identical text remain separate, and existing optimistic send behavior remains unchanged.

Evidence

  • Actual native iPhone simulator baseline: four independent regressions failed before the fix, covering the live gateway message identity, duplicate assistant replay, canonical history reconciliation, and durable identity preservation.
  • Actual native iPhone simulator after the fix: 98 passing native app, gateway transport, deep-link, share, QR handoff, notification, image, render, and sidebar tests; no failures.
  • Actual native iPhone app UI: four passing user flows covering sending a chat prompt, switching chat and overview, agent/sidebar navigation, and opening gateway settings from chat.
  • Extra-high-effort independent structured Codex review: clean, with no accepted or actionable findings.
  • Gateway message envelope and persisted transcript contracts verified directly against gateway source and the Control UI sibling implementation.

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete merged commit 8443292 into main Jul 29, 2026
59 of 61 checks passed
@steipete
steipete deleted the codex/fix-native-transcript-identity-107589 branch July 29, 2026 06:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
…ifecycle-hooks

* origin/main:
  fix(ios): prevent duplicate native chat replies after tool runs (#115678)
  feat(apps): render collapsible details natively (#115641)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][iOS] chat.history reconciliation duplicates and reorders replies after tool runs

1 participant