Repository navigation
fix(native-chat): report missing saved conversations once - #37189
Conversation
…e the missing-conversation row A Claude result settles its own send before the journal sees it, so a failed send with no echo yet lost its owner and its failure row. The result now carries the send it answered. Desktop and phone rows also show the missing saved conversation sentence in the reader's language.
Findings
|
…ssage A root failure result that names a user message answered accepted input, so it keeps its row even when that send's waiter was retired, in doubt or ambiguously written. Only a result with no turn, no started send and no named user message (the pre-init missing-resume capture) is left to the host's final startup row. This replaces the per-frame settlement carry, so the acquisition and sign-in tests return to main. Also ship the new missing-conversation sentence in the runtime English catalog.
…he startup row A Claude failure result with no turn now writes no row only while its own session is still opening (initialize and resume catch-up). Once open succeeds, every failure result is reported as before, whatever send evidence it carries, so per-send ownership checks are removed.
…lure it reports A turnless failure result that names no user input or resumed turn, arriving while its own acquisition is still starting, now fails that acquisition's open (initialize and resume catch-up) with Claude's own diagnostic; only then is its provider row left to the host's final startup row. Results naming input, and every result once open succeeds, keep main's reporting. The missing-conversation classifier is shared by stderr and the result's errors, so the typed refusal ends in one attempt whichever arrives first; other reported startup failures stay retryable through the existing provider-request error.
…lure ended the start A Claude startup failure result was still taken by its acquisition's startup outcome after initialize, a transport fault or an unexpected exit had already failed that start, so its diagnostic was neither shown nor kept in the final failure. The outcome now declines once the open fails by another route or the exit is observed (synchronously, before buffered frames drain), so such a result keeps its row as on main. It still takes a repeated result it already accepted, and a result whose refusal the ending exit already carries; a Stop still owns its start.
… open The startup outcome now records the first cause that ends a start: an accepted startup result, the raced initialize or catch-up rejecting, a transport fault or unexpected exit, or any other open failure. That cause rejects the pending race, open() refuses success after it, and the open rejects with it, so a hidden result is always the open's error and any other result keeps its row.
…ead of an assertion
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9b7e8dfa-0502-4ca9-979b-de666de6f60f
Files selected for processing: 58-
mobile/src/i18n/locales/de.jsonmobile/src/i18n/locales/en.jsonmobile/src/i18n/locales/es.jsonmobile/src/i18n/locales/fr.jsonmobile/src/i18n/locales/ja.jsonmobile/src/i18n/locales/ko.jsonmobile/src/i18n/locales/pt.jsonmobile/src/i18n/locales/ru.jsonmobile/src/i18n/locales/tr.jsonmobile/src/i18n/locales/zh-Hant.jsonmobile/src/i18n/locales/zh.jsonmobile/src/session/agent-session-failure-copy.test.tsmobile/src/session/agent-session-start-failure-copy.tsmobile/src/session/native-chat/transcript/MobileNativeChatMessage.status-notices.test.tsmobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsxsrc/main/claude/__fixtures__/claude-missing-conversation.jsonlsrc/main/claude/claude-journal-translator-contract.tssrc/main/claude/claude-result-journaling.tssrc/main/claude/claude-stream-json-exit-error.test.tssrc/main/claude/claude-stream-json-exit-error.tssrc/main/claude/structured/claude-structured-dispatch-test-support.tssrc/main/claude/structured/claude-structured-session-acquisition.tssrc/main/claude/structured/claude-structured-session-open.tssrc/main/claude/structured/claude-structured-session-publication.tssrc/main/claude/structured/claude-structured-session-startup.test.tssrc/main/claude/structured/claude-structured-session-state.tssrc/main/claude/structured/claude-structured-startup-outcome.tssrc/main/claude/structured/journal/claude-structured-journal-translation.tssrc/main/claude/structured/journal/claude-structured-session-journal-control.tssrc/main/claude/structured/launch/claude-structured-options.test.tssrc/main/codex/codex-structured-session-adapter.test.tssrc/main/codex/codex-structured-thread-open.test.tssrc/main/codex/codex-structured-thread-open.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failure-text.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-provider-errors.test.tssrc/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.tsxsrc/renderer/src/components/native-chat/agent-session-failure-words-text.test.tssrc/renderer/src/components/native-chat/agent-session-failure-words-text.tssrc/renderer/src/components/native-chat/agent-session-start-failure-words-text.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/agent-session/failures/agent-session-failure-copy.tssrc/shared/agent-session/failures/agent-session-failure-words.tssrc/shared/agent-session/failures/agent-session-failure.tssrc/shared/agent-session/failures/agent-session-refusal-details.tssrc/shared/agent-session/failures/agent-session-refusal-reason-words.tssrc/shared/agent-session/requests/structured-agent-session-dispatch-rejection.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
Review loop status: doneThe problem. When a Claude chat's saved conversation was gone (deleted, moved or pruned), sending a message showed Claude's raw "No conversation found with session ID: …" text five times, then another failure row. Orca retried a start that could never succeed, and one start attempt's failure competed with the final startup failure row. What users get now. One row: "Claude couldn't find this chat's saved conversation. Start a new chat to continue.", with Claude's text under Details on desktop and one start attempt. The chat, its history and its saved conversation link are kept. A resumed Codex chat whose conversation is missing gets the same guidance instead of "Codex couldn't start." One accepted wording change: when Claude itself reports a generic startup failure before its process exits, the final row reads "Claude couldn't start. Send your message to try again." instead of "Claude stopped before it finished starting." (the lane coordinator accepted this). What review changed. The first version hid Claude failure rows whenever no turn or send could be found, which also hid real failures in running chats (failed sends before their echo, slash commands, sends left in doubt, older CLIs without receipt ids). Two design-panel rulings settled the rule: a Claude failure result may skip its own row only when it belongs to no turn, names no user message or resumed turn, and the session's own unfinished start takes it as its failure and fails with it, so the single startup row always reports it. Everything after a successful start, and anything after the start already failed another way, shows exactly as on main. Later repairs closed race windows where a hidden result could lose its text. All repairs were rechecked by the continued reviewer and a fresh mechanism reviewer; the round-6 panel ruled the result ready, unanimously. Deferred / not in this PR.
Verified.
For Brennan's reviewMissing Claude conversation, main vs branch: Resumed Codex chat with a missing conversation, main vs branch: Claude startup failure from a bad launch argument (branch): Where judgment matters:
|
Resolve the session-acquisition conflict with #37189: keep this PR's ordered permission handlers and adopt main's childFailed fault handler.





When a Claude chat's saved conversation had been deleted, moved or pruned, opening the chat and sending a message showed Claude's raw "No conversation found with session ID: …" text five times, once per start attempt, followed by another failure row. Orca retried the start even though it could never succeed.
Now the chat shows one failure: "Claude couldn't find this chat's saved conversation. Start a new chat to continue." Claude's own text is under Details on desktop. Orca tries once instead of five times. The saved chat, its earlier messages and its saved conversation link are kept; nothing is deleted. A Codex chat whose saved conversation is missing gets the same guidance ("Codex couldn't find this chat's saved conversation. Start a new chat to continue.") instead of "Codex couldn't start." Desktop and phone show the sentence in the user's language.
How it works: while a Claude session is still starting, a failure Claude reports that belongs to no turn and names no user message or resumed turn becomes the failure of that start, so the existing single startup-failure row reports it once with Claude's words under Details. If that start already failed some other way, or once the session has started, Claude's failures show exactly as before. Claude's "no conversation found" message, whether it arrives in Claude's result or its error output, becomes the existing typed refusal that stops retries after one attempt. Other startup failures still retry up to five times as before. Codex already stopped retrying in this case; it now gives the precise guidance. Codex's existing replacement of a conversation that was never saved is unchanged.
User-visible wording change (accepted by the lane coordinator): when a generic Claude startup failure is reported by Claude itself before its process exits, the final row now reads "Claude couldn't start. Send your message to try again." instead of "Claude stopped before it finished starting. Send your message to try again." The second sentence still appears when Orca observes the process exit first. Retries and Details are unchanged.
Plan: the startup ownership and failure-handling plan received an architectural review and a fresh plan check. The implementation follows the common pattern: turn failures belong to their turn, and a failed startup has one final reporting owner. Broader retry finality is tracked in STA-12982.
Validation: reproduced on the base with recorded real Claude CLI output (five start attempts, six error rows). Tests drive the real Claude adapter, journal and host start loop with the recorded output in every arrival order, plus failures from turns, sends before their echo, slash commands, resumed turns, Stop, and generic retries. In the running app on macOS, with real Claude and Codex: the missing Claude conversation shows one translated row with Details and one attempt (main: six rows, five attempts); a resumed Codex chat with a missing conversation shows the new guidance (main: "Codex couldn't start."); existing Claude and Codex conversations reply normally; a real in-turn Claude failure and a Claude startup failure from a bad launch argument each show one row.
Review path: full.
Intended difference from the common pattern: the final failure explicitly names the agent and gives manual new-chat guidance, as requested. It uses the existing error and Details surfaces and retains the saved conversation identity and history.
Temporary difference: the phone shows the full guidance sentence but has no Details disclosure for Claude's raw text on ordinary failure rows (existing phone behavior); tracked in STA-13393.
Tracked in STA-13134.