[PR #1011] [MERGED] Fix Claude subscription empty result fallback #4882

Closed
opened 2026-10-22 04:11:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1011
Author: @cha1latte
Created: 5/19/2026
Status: ✅ Merged
Merged: 5/19/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-992-claude-subscription-docker


📝 Commits (1)

  • 7d518bc Fix Claude subscription result fallback

📊 Changes

3 files changed (+24 additions, -0 deletions)

View changed files

➕ docs/pr-evidence/issue-992/result-fallback-proof.svg (+13 -0)
➕ docs/pr-evidence/issue-992/result-fallback-proof.txt (+3 -0)
📝 packages/server/src/services/llm/providers/claude-subscription.provider.ts (+8 -0)

📄 Description

Linked issue

Closes #992

Why this change

  • Claude Subscription in Docker can report a successful Claude Agent SDK call while Marinara receives no emitted text, causing Send Test Message to show an empty response and RP chat to fail with "The AI returned an empty response."

What changed

  • Added a fallback in the Claude Subscription provider that emits the SDK success result text when no stream delta or assistant block has already emitted text.
  • Kept stream deltas and assistant blocks authoritative so the final SDK result is not duplicated during normal streaming or non-streaming responses.
  • Added scoped PR evidence for the scratch repro under docs/pr-evidence/issue-992/.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex reproduced the broken provider path before the fix with packages\server\node_modules\.bin\tsx.cmd scratch\issue-992-claude-result-repro.ts: a fake Claude Agent SDK yielded a successful result-only response, and Marinara emitted an empty string.
  • After the fix, the same scratch repro passed:
    • result-only success fallback emits Hello from the SDK result field.
    • stream delta remains authoritative and does not duplicate final result text
    • assistant block remains authoritative and does not duplicate final result text
  • Codex ran pnpm check; it passed.
  • Raw proof: https://raw.githubusercontent.com/cha1latte/Marinara-Engine/7d518bc85f102068dcd302436fec3364274493ff/docs/pr-evidence/issue-992/result-fallback-proof.txt
  • Manual verification still needed before marking ready: run the original Docker + claude login flow from #992 with a real Claude subscription session, because Codex does not have the reporter's Docker OAuth environment or Claude subscription credentials.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No user-facing docs or release metadata changed. The only docs/ files added are PR evidence artifacts.

UI evidence (if applicable)

Not a UI change. Command-harness proof:

Issue 992 Claude Subscription result fallback proof


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1011 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/19/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-992-claude-subscription-docker` --- ### 📝 Commits (1) - [`7d518bc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7d518bc85f102068dcd302436fec3364274493ff) Fix Claude subscription result fallback ### 📊 Changes **3 files changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-992/result-fallback-proof.svg` (+13 -0) ➕ `docs/pr-evidence/issue-992/result-fallback-proof.txt` (+3 -0) 📝 `packages/server/src/services/llm/providers/claude-subscription.provider.ts` (+8 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #992 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Claude Subscription in Docker can report a successful Claude Agent SDK call while Marinara receives no emitted text, causing Send Test Message to show an empty response and RP chat to fail with "The AI returned an empty response." ## What changed <!-- List the key changes in this PR --> - Added a fallback in the Claude Subscription provider that emits the SDK success `result` text when no stream delta or assistant block has already emitted text. - Kept stream deltas and assistant blocks authoritative so the final SDK `result` is not duplicated during normal streaming or non-streaming responses. - Added scoped PR evidence for the scratch repro under `docs/pr-evidence/issue-992/`. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex reproduced the broken provider path before the fix with `packages\server\node_modules\.bin\tsx.cmd scratch\issue-992-claude-result-repro.ts`: a fake Claude Agent SDK yielded a successful result-only response, and Marinara emitted an empty string. - After the fix, the same scratch repro passed: - result-only success fallback emits `Hello from the SDK result field.` - stream delta remains authoritative and does not duplicate final result text - assistant block remains authoritative and does not duplicate final result text - Codex ran `pnpm check`; it passed. - Raw proof: https://raw.githubusercontent.com/cha1latte/Marinara-Engine/7d518bc85f102068dcd302436fec3364274493ff/docs/pr-evidence/issue-992/result-fallback-proof.txt - Manual verification still needed before marking ready: run the original Docker + `claude login` flow from #992 with a real Claude subscription session, because Codex does not have the reporter's Docker OAuth environment or Claude subscription credentials. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No user-facing docs or release metadata changed. The only `docs/` files added are PR evidence artifacts. ## UI evidence (if applicable) Not a UI change. Command-harness proof: ![Issue 992 Claude Subscription result fallback proof](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/7d518bc85f102068dcd302436fec3364274493ff/docs/pr-evidence/issue-992/result-fallback-proof.svg) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:25 +07:00
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#4882
No description provided.