Symptom: every assistant message appears twice in the UI, or the assistant repeats the same answer after a tool call.

Cause candidates, in order of likelihood:
1. sendMessage called twice per user action. A double submit (form onSubmit plus button onClick both calling sendMessage) appends the user message twice, and the assistant answers both.
2. The message list rendered with unstable keys. If key falls back to index or a regenerated id, React remounts and you see duplicates.
3. Two useChat instances mounted at once (StrictMode double-mounting in dev, or the component rendered in two places) sharing the same id. Each streams its own copy.

Confirmation:
1. Log sendMessage calls: if it fires twice per submit, wire the button to type="submit" and keep a single handler.
2. Check message ids: two messages with the same id, or ids that change between renders, point at key/regeneration problems.
3. In dev, disable StrictMode temporarily. If duplicates vanish, the double-mount is real; make the effect idempotent rather than shipping without StrictMode.

Fix:
- One send path only. Guard with a status check: if (status !== 'ready') return; before calling sendMessage.
- Render messages by their stable id. Never key by index.
- Use the id option on useChat so resume and persistence target one conversation, not a fresh one per mount.

Verification: send three messages in a row, confirm each assistant reply appears exactly once, then run a tool-call turn and confirm no repeated answer follows the tool result.