Skip to content

Transcript cleanup failure toast hides the underlying error reason #40408

Closed

Description

@MayankXDev13

What happened

When voice dictation transcript cleanup fails (for example, after switching the cleanup model to an OpenCode or Antigravity model), the warning toast only says "Transcript cleanup failed" / "The original transcript was added." and gives no indication of why cleanup failed. Users cannot tell whether the issue is a misconfigured/unsupported cleanup model, provider auth/rate limit, or a server error without inspecting server.trace.ndjson.

Diagnosis

The failure reason is discarded at two layers (verified on commit 0dc32b5c, matching 0.1.12-nightly.20261121.5038 on main):

  1. Server (apps/server/src/speech/http.ts:231-237): The environment.voice.postProcess handler (POST /api/voice/post-process) catches every SpeechOperationError (which wraps TextGenerationError and its user-safe detail, such as invalid structured output, rejected credentials, rate limits, or unsupported provider setup) and converts it into a generic HTTP 500 EnvironmentInternalError ("The environment failed to answer this request (internal_error)."). The underlying cause is only written to server.trace.ndjson.
  2. Client (apps/web/src/speech/voiceInputSession.ts:223-228): Even though VoiceInputController passes the caught error to this.dependencies.onPostProcessingError?.(error) (packages/client-runtime/src/voice-input/controller.ts:660), VoiceInputSession ignores the error parameter and always renders a hardcoded warning toast:
    • title: "Transcript cleanup failed"
    • description: "The original transcript was added."

Steps to reproduce

  1. In Settings → Voice → Cleanup, enable transcript cleanup and select a cleanup model that fails (e.g., an OpenCode or Antigravity model affected by Transcript cleanup fails with invalid structured output when the cleanup model does not enforce the schema #32049, or a provider with invalid credentials).
  2. Dictate into the composer and stop recording.
  3. Observe the warning toast: it only shows "Transcript cleanup failed" and "The original transcript was added." with no failure reason, while the actual TextGenerationError detail is only present in server.trace.ndjson.

Version

0.1.12-nightly.20261121.5038 (triage CLI: 0.1.11)

Environment

Linux x64 (7.0.0-34-generic), Node v26.13.1, T3 Code Nightly desktop app (Electron 44.10.1) against local server

Evidence

# Server span logs the specific TextGenerationError detail, then returns generic HTTP 500 internal_error:
environment.voice.postProcess -> Failure
  cause: SpeechOperationError (operation: "post-processing")
    -> TextGenerationError (operation: "generateTranscriptionPostProcessing", detail: "OpenCode returned invalid structured output.")
    -> SchemaError: Expected a valid JSON string
  HTTP response: 500 EnvironmentInternalError: The environment failed to answer this request (internal_error).

# Client receives only EnvironmentInternalError and VoiceInputSession ignores the error parameter in onPostProcessingError:
Toast shown: "Transcript cleanup failed" / "The original transcript was added."

Related issues

#32049 tracks the underlying OpenCode/Antigravity structured-output failure during transcript cleanup. This issue is specifically about surfacing the failure reason from POST /api/voice/post-process through onPostProcessingError to the user-facing toast so any cleanup failure (auth, rate limit, provider unavailability, schema mismatch, etc.) is diagnosable from the UI.

Fix applied or workaround

None in the UI; the underlying failure reason currently has to be inspected in server.trace.ndjson.

Filed by

Gemini 4 Neon (High) via Antigravity (t3 triage)

Activity

  1. added
    via-triage
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions