[GH-ISSUE #2791] [Issue]: New/Delete conversation intermittently fail silently + per-chat guard/lock leaks wedge a chat (refresh/restart fixes) — useCreateChat no onError, abortControllers + activeGenerations leak #1415

Closed
opened 2026-10-21 05:33:24 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @kolacheee on GitHub (Jun 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2791

Summary

Three user-reported symptoms — (A) the New Conversation button intermittently does nothing, (B) delete conversation intermittently fails (the row reappears), and (C) some users see the engine "wedge" (cannot create convos / open characters / crashes-or-needs-refresh / device heat) — trace to multiple independent faults, not one whole-process crash.

  • A and B are primarily client-side UX gaps: the create mutation has no onError handling at all, and delete rolls back silently with no toast. When the underlying request 5xx's (or the chat is mid-generation server-side), the user gets a silent no-op or a row that vanishes-then-reappears with no feedback. A refresh "fixes" it because the next request succeeds.
  • C ("wedge") is a combination of per-chat lock/guard leaks, NOT a server crash:
    • A client-side in-memory abortControllers guard leak that blocks all future generations for a chat until the page is reloaded (the Map is not persisted — this is the literal mechanism behind "refresh fixes it").
    • A server-side activeGenerations lock leak that returns a permanent 409 generation-already-in-progress for one chat until the backend restarts.
    • The DELETE route never aborts an in-flight generation and can 500 on corrupt metadata, leaving stuck chats undeletable.

The retry/heat is explained by the client retrying useChats up to 10× with backoff on 5xx (use-chats.ts:158-163) plus error-state churn — an aggravating factor, not a root cause.

Correction to earlier investigation: an earlier theory blamed process.exit(1) in index.ts:57 ("a single escaped rejection kills the whole server, so A/B/C share one root cause"). That mechanism is not supported by the code — see "What this is NOT" below. The process.exit handlers are a genuine latent landmine and worth hardening, but they are not the demonstrated cause and fixing them alone will not resolve A/B/C.


Symptom & UX impact

  • A — New Conversation no-op: Clicking + / New Conversation does nothing. No toast, no spinner, no error. The button isn't disabled, so users click repeatedly. A page refresh then lets it work.
  • B — Delete reappears: Deleting a chat optimistically removes the row, then it silently pops back a moment later with no error shown — looks random.
  • C — Wedge: For an affected chat, sending/regenerating is permanently blocked (client skips the generation, or the server returns 409); the chat may also be undeletable. Heavy retry traffic and re-renders cause CPU/battery ("device heat"). Refreshing the page clears the client-side guard (but not the server lock).

Steps to reproduce

A (silent create failure):

  1. Stop the backend (or make POST /chats return 5xx).
  2. Click New Conversation / the + button.
  3. Observe: nothing happens, no toast. Button remains enabled. Restart server + refresh → works.

B (silent delete rollback):

  1. Make DELETE /chats/:id return 5xx (e.g. corrupt metadata so JSON.parse throws — see root cause).
  2. Delete a chat.
  3. Observe: row disappears, then reappears. No error surfaced.

C-client (abortControllers guard leak):

  1. Start a generation in a chat.
  2. Force a synchronous throw inside the finally cleanup body of useGenerate (e.g. a cache-write helper throwing) so execution never reaches the cleanup at use-generate.ts:2341-2342.
  3. Observe: that chat now skips ALL future generations (guard at use-generate.ts:926) until a page reload (the Map at chat.store.ts:219 is wiped on reload).

C-server (activeGenerations 409 leak):

  1. Make connections.getWithKey (or chats.listMessages / createMessage) throw during a send.
  2. Observe: that chat returns 409 "A generation is already in progress for this chat" on every subsequent send until the backend restarts.

Root cause

A — useCreateChat has no onError; call sites pass only onSuccess

packages/client/src/hooks/use-chats.ts:349-372 — useCreateChat() defines only onSuccess. A failed POST /chats rejects with nothing surfaced. All call sites compound it:

  • packages/client/src/components/LAYOUT/ChatSidebar.tsx:526 (handleNewChat) — createChat.mutate(..., { onSuccess }) only.
  • ChatSidebar.tsx:1083-1093 (the + button handleNewChatFromTab→handleNewChat, and again at :1292) — no disabled/pending/error state, so users can double-fire and never see failure.
  • packages/client/src/hooks/use-start-chat-from-character.ts:31 — createChat.mutate(..., { onSuccess }) only. This is also why "opening a character does nothing" — it silently no-ops on any failure; no server crash is required for this symptom.

B — useDeleteChat rolls back silently

use-chats.ts:374-420 — onMutate optimistically removes the row (390-393); onError (398-411) restores context.previous but emits no toast. The user sees a row reappear with no explanation.

C-client — in-memory abortControllers guard never reset on a throwing finally

  • The concurrency guard at use-generate.ts:926 skips a generation if useChatStore.getState().abortControllers.has(params.chatId).
  • The guard is only cleared at use-generate.ts:2342 (setAbortController(params.chatId, null)) and :2341 (clearPerChatState), which sit at the end of the finally block (starts :2202).
  • That finally body awaits refresh helpers before the cleanup: refreshVisibleGameStateAfterGeneration (:2215) and refreshMessagesAuthoritatively (:2311, :2318, :2326). A synchronous throw from any cache-write step in that region skips cleanup → guard stays set.
  • abortControllers is a plain in-memory Map (packages/client/src/stores/chat.store.ts:219), not persisted, so a page reload empties it — which is exactly why "refresh fixes it."
  • Note: the other lock, the module-level activeGenerateLocks Set (use-generate.ts:745), is correctly released in a tight finally at :937, so it is NOT the leak. The leak is specifically the abortControllers Map.

C-server — activeGenerations lock leaked by pre-try setup awaits

packages/server/src/routes/generate.routes.ts:

  • Lock registered at :1242 (activeGenerations.set(input.chatId, ...)).
  • The protective try that guarantees releaseActiveGeneration() begins later (~:1466).
  • Between registration and that try, several awaits run unprotected: chats.listMessages (:1277), chats.createMessage (:1287), connections.getWithKey (:1353 and :1369). The handled early-returns do call releaseActiveGeneration() (e.g. :1342, :1350, :1363, :1372), but a thrown error from any of these awaits is not caught by that path → the lock leaks → permanent 409 for that chat until restart.

C-delete — DELETE route doesn't abort/cleanup and can 500 on bad metadata

packages/server/src/routes/chats.routes.ts:949-970:

  • Never aborts an in-flight generation, never deletes activeGenerations[id], never clears chat activity → a wedged chat (server lock held) stays wedged after a delete attempt.
  • Raw JSON.parse at :953 and :959 with no try/catch → corrupt metadata throws → the route 500s → delete fails (feeds symptom B).

Shared vs distinct

Not one shared root cause. A and B are client UX (missing onError) plus, for the wedge, the client abortControllers guard leak. C is a combination of independent per-chat faults: the server activeGenerations 409 leak and the client abortControllers guard leak. They should be fixed together but are independent bugs.

What this is NOT (corrected from earlier investigation)

  • process.exit(1) on unhandled rejection is not the demonstrated cause. Fastify route-handler throws do not become unhandledRejection: app.ts registers setErrorHandler(errorHandler) which converts any handler throw into a 4xx/5xx HTTP response and never re-throws. So the generate route, agent pipeline, and SSE-write handlers cannot reach index.ts:57 → process.exit(1).
  • The cited server background paths are already guarded (autonomous scheduler poll/evaluateChat/scheduleDelayedGeneration have try/catch/finally; sidecar bootstrap has .catch; child error/exit handlers are internally try/caught), so none produces a floating rejection.
  • use-autonomous-messaging.ts is the client poller and cannot crash the server.
  • Treat index.ts:52-61 as defensive hardening only, not the fix.

Suggested fix

Recommend splitting into two focused PRs (client UX vs server lock/delete) since these are independent faults.

PR 1 — Client UX (fixes A and B, plus the wedge guard leak)

  1. useCreateChat onError toast (use-chats.ts:349):
return useMutation({
  mutationFn: (data) => api.post<Chat>("/chats", data),
  onSuccess: (chat) => { /* unchanged */ },
  onError: (err) => {
    showError(err instanceof ApiError ? err.message : "Couldn't create the conversation. Please try again.");
  },
});

And add an onError to each .mutate(...) call site (ChatSidebar.tsx:526, use-start-chat-from-character.ts:31) so the failure surfaces even with the local callback form.
2. Disable the + button while pending (ChatSidebar.tsx:1083 and :1292): disabled={createChat.isPending} and a busy affordance, to stop silent double-fires.
3. useDeleteChat onError toast (use-chats.ts:398): keep the rollback, add showError("Couldn't delete the conversation. It has been restored.").
4. Harden the useGenerate finally (use-generate.ts:2202): guarantee the guard clears even if the refresh awaits throw. Cheapest fix — run the ownership cleanup in its own try/finally, or move it to the very top of the outer finally:

} finally {
  try {
    // ...existing refresh/notify body...
  } finally {
    useChatStore.getState().clearPerChatState(params.chatId);
    useChatStore.getState().setAbortController(params.chatId, null);
  }
}

(Guard the inner cleanup with the stillOwner check as today so a superseded generation doesn't stomp the active one.)

PR 2 — Server lock + delete (fixes the 409 wedge and undeletable chats)

  1. Release the generate lock on any pre-try throw (generate.routes.ts:1242-1466): either move activeGenerations.set inside the big protective try, or wrap the setup region from :1242 through :1466 so any throw calls releaseActiveGeneration() in a finally/catch. Prefer moving the set into the try so registration and release share one scope.
  2. DELETE route abort + cleanup (chats.routes.ts:949-970): before storage.remove, abort any in-flight generation, delete activeGenerations[id], and clear chat activity. Guard the metadata parse so corrupt JSON can't 500 the delete:
const safeParse = (m: unknown) => {
  if (typeof m !== "string") return m ?? {};
  try { return JSON.parse(m); } catch { return {}; }
};
// ...use safeParse at :953 and :959...
// before remove:
activeGenerations?.get(req.params.id)?.abortController.abort();
activeGenerations?.delete(req.params.id);
clearChatActivity(req.params.id);

Optional — defensive hardening (NOT the cure)

  1. index.ts:57: prefer log-and-continue on unhandledRejection only; keep exit-or-graceful-restart on a true uncaughtException (continuing after a real uncaught exception can leave corrupt state). Pair with a no-floating-promises lint sweep rather than re-wrapping the already-guarded background paths.

Affected files

  • packages/client/src/hooks/use-chats.ts (useCreateChat 349-372; useDeleteChat 374-420; useChats retry 158-163)
  • packages/client/src/hooks/use-generate.ts (guard 926; lock release 937; finally 2202-2342)
  • packages/client/src/stores/chat.store.ts (in-memory abortControllers Map, 219)
  • packages/client/src/components/LAYOUT/ChatSidebar.tsx (create call site 526; + button 1083/1292)
  • packages/client/src/hooks/use-start-chat-from-character.ts (create call site 31)
  • packages/server/src/routes/generate.routes.ts (lock 1242; pre-try awaits 1277/1287/1353/1369; protective try ~1466)
  • packages/server/src/routes/chats.routes.ts (DELETE 949-970; raw JSON.parse 953/959)
  • packages/server/src/index.ts (process.exit handlers 52-61) — optional hardening only

Validation

  • Manually verify in browser: with backend returning 5xx on POST /chats, clicking New Conversation shows an error toast and the + button is disabled while pending.
  • Manually verify: failed DELETE /chats/:id shows a toast and the restored row is explained.
  • Manually verify: a chat with metadata set to invalid JSON can still be deleted (no 500).
  • Manually verify: force a throw in the useGenerate finally refresh path; confirm the chat can still generate afterward without a page reload.
  • Manually verify: make a server setup await (connections.getWithKey) throw; confirm the chat does NOT get stuck on 409 and a subsequent send succeeds.
  • Manually verify: deleting a chat that currently has an in-flight generation aborts it and removes the server activeGenerations entry.
  • Run pnpm check (TypeScript + ESLint) clean.
  • Confirm no console.* added in server code; client toasts use the existing error helper.
  • (If PR 7 adopted) Verify unhandledRejection now logs-and-continues while a true uncaughtException still exits/graceful-restarts.

AI-investigated against released 2.0.0; verify each trace and repro before fixing.

Originally created by @kolacheee on GitHub (Jun 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2791 ## Summary Three user-reported symptoms — (A) the **New Conversation** button intermittently does nothing, (B) **delete conversation** intermittently fails (the row reappears), and (C) some users see the engine **"wedge"** (cannot create convos / open characters / crashes-or-needs-refresh / device heat) — trace to **multiple independent faults**, not one whole-process crash. - **A and B are primarily client-side UX gaps:** the create mutation has no `onError` handling at all, and delete rolls back silently with no toast. When the underlying request 5xx's (or the chat is mid-generation server-side), the user gets a silent no-op or a row that vanishes-then-reappears with no feedback. A refresh "fixes" it because the next request succeeds. - **C ("wedge") is a combination of per-chat lock/guard leaks**, NOT a server crash: - A **client-side in-memory `abortControllers` guard leak** that blocks all future generations for a chat until the page is reloaded (the Map is not persisted — this is the literal mechanism behind "refresh fixes it"). - A **server-side `activeGenerations` lock leak** that returns a permanent `409 generation-already-in-progress` for one chat until the backend restarts. - The **DELETE route never aborts an in-flight generation** and can `500` on corrupt metadata, leaving stuck chats undeletable. The retry/heat is explained by the client retrying `useChats` up to 10× with backoff on 5xx (`use-chats.ts:158-163`) plus error-state churn — an *aggravating* factor, not a root cause. > **Correction to earlier investigation:** an earlier theory blamed `process.exit(1)` in `index.ts:57` ("a single escaped rejection kills the whole server, so A/B/C share one root cause"). That mechanism is **not supported by the code** — see "What this is NOT" below. The `process.exit` handlers are a genuine latent landmine and worth hardening, but they are not the demonstrated cause and fixing them alone will not resolve A/B/C. --- ## Symptom & UX impact - **A — New Conversation no-op:** Clicking **+ / New Conversation** does nothing. No toast, no spinner, no error. The button isn't disabled, so users click repeatedly. A page refresh then lets it work. - **B — Delete reappears:** Deleting a chat optimistically removes the row, then it silently pops back a moment later with no error shown — looks random. - **C — Wedge:** For an affected chat, sending/regenerating is permanently blocked (client skips the generation, or the server returns `409`); the chat may also be undeletable. Heavy retry traffic and re-renders cause CPU/battery ("device heat"). Refreshing the page clears the client-side guard (but not the server lock). ## Steps to reproduce **A (silent create failure):** 1. Stop the backend (or make `POST /chats` return 5xx). 2. Click **New Conversation** / the **+** button. 3. Observe: nothing happens, no toast. Button remains enabled. Restart server + refresh → works. **B (silent delete rollback):** 1. Make `DELETE /chats/:id` return 5xx (e.g. corrupt `metadata` so `JSON.parse` throws — see root cause). 2. Delete a chat. 3. Observe: row disappears, then reappears. No error surfaced. **C-client (abortControllers guard leak):** 1. Start a generation in a chat. 2. Force a synchronous throw inside the `finally` cleanup body of `useGenerate` (e.g. a cache-write helper throwing) so execution never reaches the cleanup at `use-generate.ts:2341-2342`. 3. Observe: that chat now skips ALL future generations (guard at `use-generate.ts:926`) until a **page reload** (the Map at `chat.store.ts:219` is wiped on reload). **C-server (activeGenerations 409 leak):** 1. Make `connections.getWithKey` (or `chats.listMessages` / `createMessage`) **throw** during a send. 2. Observe: that chat returns `409 "A generation is already in progress for this chat"` on every subsequent send until the backend restarts. --- ## Root cause ### A — `useCreateChat` has no `onError`; call sites pass only `onSuccess` `packages/client/src/hooks/use-chats.ts:349-372` — `useCreateChat()` defines only `onSuccess`. A failed `POST /chats` rejects with nothing surfaced. All call sites compound it: - `packages/client/src/components/LAYOUT/ChatSidebar.tsx:526` (`handleNewChat`) — `createChat.mutate(..., { onSuccess })` only. - `ChatSidebar.tsx:1083-1093` (the **+** button `handleNewChatFromTab`→`handleNewChat`, and again at `:1292`) — no `disabled`/pending/error state, so users can double-fire and never see failure. - `packages/client/src/hooks/use-start-chat-from-character.ts:31` — `createChat.mutate(..., { onSuccess })` only. This is also why **"opening a character does nothing"** — it silently no-ops on any failure; **no server crash is required** for this symptom. ### B — `useDeleteChat` rolls back silently `use-chats.ts:374-420` — `onMutate` optimistically removes the row (390-393); `onError` (398-411) restores `context.previous` but emits **no toast**. The user sees a row reappear with no explanation. ### C-client — in-memory `abortControllers` guard never reset on a throwing finally - The concurrency guard at `use-generate.ts:926` skips a generation if `useChatStore.getState().abortControllers.has(params.chatId)`. - The guard is only cleared at `use-generate.ts:2342` (`setAbortController(params.chatId, null)`) and `:2341` (`clearPerChatState`), which sit at the **end** of the `finally` block (starts `:2202`). - That finally body `await`s refresh helpers **before** the cleanup: `refreshVisibleGameStateAfterGeneration` (`:2215`) and `refreshMessagesAuthoritatively` (`:2311`, `:2318`, `:2326`). A synchronous throw from any cache-write step in that region skips cleanup → guard stays set. - `abortControllers` is a plain in-memory `Map` (`packages/client/src/stores/chat.store.ts:219`), **not persisted**, so a page reload empties it — which is exactly why **"refresh fixes it."** - Note: the *other* lock, the module-level `activeGenerateLocks` Set (`use-generate.ts:745`), is correctly released in a tight `finally` at `:937`, so it is NOT the leak. The leak is specifically the `abortControllers` Map. ### C-server — `activeGenerations` lock leaked by pre-`try` setup awaits `packages/server/src/routes/generate.routes.ts`: - Lock registered at `:1242` (`activeGenerations.set(input.chatId, ...)`). - The protective `try` that guarantees `releaseActiveGeneration()` begins later (~`:1466`). - Between registration and that `try`, several **awaits run unprotected**: `chats.listMessages` (`:1277`), `chats.createMessage` (`:1287`), `connections.getWithKey` (`:1353` and `:1369`). The handled early-returns *do* call `releaseActiveGeneration()` (e.g. `:1342`, `:1350`, `:1363`, `:1372`), but a **thrown** error from any of these awaits is **not** caught by that path → the lock leaks → permanent `409` for that chat until restart. ### C-delete — DELETE route doesn't abort/cleanup and can 500 on bad metadata `packages/server/src/routes/chats.routes.ts:949-970`: - Never aborts an in-flight generation, never `delete`s `activeGenerations[id]`, never clears chat activity → a wedged chat (server lock held) stays wedged after a delete attempt. - Raw `JSON.parse` at `:953` and `:959` with no try/catch → corrupt `metadata` throws → the route 500s → delete fails (feeds symptom B). ### Shared vs distinct **Not one shared root cause.** A and B are client UX (missing `onError`) plus, for the wedge, the client `abortControllers` guard leak. C is a *combination* of independent per-chat faults: the server `activeGenerations` 409 leak and the client `abortControllers` guard leak. They should be fixed together but are independent bugs. ### What this is NOT (corrected from earlier investigation) - **`process.exit(1)` on unhandled rejection is not the demonstrated cause.** Fastify route-handler throws do **not** become `unhandledRejection`: `app.ts` registers `setErrorHandler(errorHandler)` which converts any handler throw into a 4xx/5xx HTTP response and never re-throws. So the generate route, agent pipeline, and SSE-write handlers **cannot** reach `index.ts:57` → `process.exit(1)`. - The cited server background paths are **already guarded** (autonomous scheduler `poll`/`evaluateChat`/`scheduleDelayedGeneration` have try/catch/finally; sidecar bootstrap has `.catch`; child `error`/`exit` handlers are internally try/caught), so none produces a floating rejection. - `use-autonomous-messaging.ts` is the **client** poller and cannot crash the server. - Treat `index.ts:52-61` as **defensive hardening only**, not the fix. --- ## Suggested fix Recommend **splitting into two focused PRs** (client UX vs server lock/delete) since these are independent faults. ### PR 1 — Client UX (fixes A and B, plus the wedge guard leak) 1. **`useCreateChat` `onError` toast** (`use-chats.ts:349`): ```ts return useMutation({ mutationFn: (data) => api.post<Chat>("/chats", data), onSuccess: (chat) => { /* unchanged */ }, onError: (err) => { showError(err instanceof ApiError ? err.message : "Couldn't create the conversation. Please try again."); }, }); ``` And add an `onError` to each `.mutate(...)` call site (`ChatSidebar.tsx:526`, `use-start-chat-from-character.ts:31`) so the failure surfaces even with the local callback form. 2. **Disable the + button while pending** (`ChatSidebar.tsx:1083` and `:1292`): `disabled={createChat.isPending}` and a busy affordance, to stop silent double-fires. 3. **`useDeleteChat` `onError` toast** (`use-chats.ts:398`): keep the rollback, add `showError("Couldn't delete the conversation. It has been restored.")`. 4. **Harden the `useGenerate` finally** (`use-generate.ts:2202`): guarantee the guard clears even if the refresh awaits throw. Cheapest fix — run the ownership cleanup in its own try/finally, or move it to the very top of the outer finally: ```ts } finally { try { // ...existing refresh/notify body... } finally { useChatStore.getState().clearPerChatState(params.chatId); useChatStore.getState().setAbortController(params.chatId, null); } } ``` (Guard the inner cleanup with the `stillOwner` check as today so a superseded generation doesn't stomp the active one.) ### PR 2 — Server lock + delete (fixes the 409 wedge and undeletable chats) 5. **Release the generate lock on any pre-`try` throw** (`generate.routes.ts:1242-1466`): either move `activeGenerations.set` *inside* the big protective `try`, or wrap the setup region from `:1242` through `:1466` so any throw calls `releaseActiveGeneration()` in a `finally`/`catch`. Prefer moving the `set` into the try so registration and release share one scope. 6. **DELETE route abort + cleanup** (`chats.routes.ts:949-970`): before `storage.remove`, abort any in-flight generation, `delete activeGenerations[id]`, and clear chat activity. Guard the metadata parse so corrupt JSON can't 500 the delete: ```ts const safeParse = (m: unknown) => { if (typeof m !== "string") return m ?? {}; try { return JSON.parse(m); } catch { return {}; } }; // ...use safeParse at :953 and :959... // before remove: activeGenerations?.get(req.params.id)?.abortController.abort(); activeGenerations?.delete(req.params.id); clearChatActivity(req.params.id); ``` ### Optional — defensive hardening (NOT the cure) 7. `index.ts:57`: prefer **log-and-continue on `unhandledRejection` only**; keep exit-or-graceful-restart on a true `uncaughtException` (continuing after a real uncaught exception can leave corrupt state). Pair with a `no-floating-promises` lint sweep rather than re-wrapping the already-guarded background paths. --- ## Affected files - `packages/client/src/hooks/use-chats.ts` (`useCreateChat` 349-372; `useDeleteChat` 374-420; `useChats` retry 158-163) - `packages/client/src/hooks/use-generate.ts` (guard 926; lock release 937; finally 2202-2342) - `packages/client/src/stores/chat.store.ts` (in-memory `abortControllers` Map, 219) - `packages/client/src/components/LAYOUT/ChatSidebar.tsx` (create call site 526; + button 1083/1292) - `packages/client/src/hooks/use-start-chat-from-character.ts` (create call site 31) - `packages/server/src/routes/generate.routes.ts` (lock 1242; pre-try awaits 1277/1287/1353/1369; protective try ~1466) - `packages/server/src/routes/chats.routes.ts` (DELETE 949-970; raw JSON.parse 953/959) - `packages/server/src/index.ts` (process.exit handlers 52-61) — optional hardening only --- ## Validation - [ ] Manually verify in browser: with backend returning 5xx on `POST /chats`, clicking **New Conversation** shows an error toast and the + button is disabled while pending. - [ ] Manually verify: failed `DELETE /chats/:id` shows a toast and the restored row is explained. - [ ] Manually verify: a chat with `metadata` set to invalid JSON can still be deleted (no 500). - [ ] Manually verify: force a throw in the `useGenerate` finally refresh path; confirm the chat can still generate afterward **without** a page reload. - [ ] Manually verify: make a server setup await (`connections.getWithKey`) throw; confirm the chat does NOT get stuck on `409` and a subsequent send succeeds. - [ ] Manually verify: deleting a chat that currently has an in-flight generation aborts it and removes the server `activeGenerations` entry. - [ ] Run `pnpm check` (TypeScript + ESLint) clean. - [ ] Confirm no `console.*` added in server code; client toasts use the existing error helper. - [ ] (If PR 7 adopted) Verify `unhandledRejection` now logs-and-continues while a true `uncaughtException` still exits/graceful-restarts. --- _AI-investigated against released 2.0.0; verify each trace and repro before fixing._
Author
Owner

@kolacheee commented on GitHub (Jun 22, 2026):

Cross-reference: the separately-reported repeating [memory-recall] Local embeddings are unavailable… log spam from the same "conversation bugs out" report is tracked in #2796 (a distinct, lower-severity fault). It is a correlated symptom, not the cause of the wedge described here.

<!-- gh-comment-id:4771356191 --> @kolacheee commented on GitHub (Jun 22, 2026): Cross-reference: the separately-reported repeating `[memory-recall] Local embeddings are unavailable…` log spam from the same "conversation bugs out" report is tracked in #2796 (a distinct, lower-severity fault). It is a correlated symptom, not the cause of the wedge described here.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 22, 2026):

Addressed, but gonna let the Codex make sure double.

<!-- gh-comment-id:4771681030 --> @SpicyMarinara commented on GitHub (Jun 22, 2026): Addressed, but gonna let the Codex make sure double.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 22, 2026):

Addressed in PR #2790 / commit acab1fba: added create/delete failure feedback, guarded duplicate new-chat submits, released client/server generation locks on setup failures, aborted active generations on delete, and made delete metadata parsing safe.

<!-- gh-comment-id:4772440944 --> @SpicyMarinara commented on GitHub (Jun 22, 2026): Addressed in PR #2790 / commit acab1fba: added create/delete failure feedback, guarded duplicate new-chat submits, released client/server generation locks on setup failures, aborted active generations on delete, and made delete metadata parsing safe.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1415
No description provided.