mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2439] [Issue]: 11-PROV-RUNTIME-claude-subscription-sdk Claude Subscription session omits existing history #1193
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1193
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2439
Originally assigned to: @SpicyMarinara on GitHub.
Summary
11-PROV-RUNTIME-claude-subscription-sdk: Claude Subscription chat-scoped session mode can omit existing Marinara conversation history when starting or resuming a Claude Code CLI session.Linked tracker: #2410.
Expected behavior
Legacy Claude Subscription used the Claude Agent SDK
SessionStoreresume path to inject prior MarinaraChatMessage[]history as synthetic JSONL for each request, then sent the current turn separately. Existing user, assistant, tool, and image-capable history reached the provider as multi-turn context even when the local SDK session was new.Actual behavior
Refactor Claude Subscription shells out to
claude -p. When_marinara.chatIdexists, it sends only the trailing/current prompt with a stable--session-id. It does not synthesize or inject stored prior Marinara history into a fresh CLI session, so a new local Claude Code session can miss the existing Marinara transcript.Steps to reproduce
claude_subscriptionconnection in a chat with existing prior messages._marinara.chatIdand the request is not regeneration or impersonation.claude_subscription_prompt: it selectssession_idandrender_claude_subscription_current_prompt, which returns only the trailing/current prompt.Impact area
Environment
Logs, screenshots, or video
Proof:
SessionStoreentries from prior messages:main:packages/server/src/services/llm/providers/claude-subscription.provider.ts:171,:185,:206,:223;main:packages/server/src/services/llm/providers/claude-subscription/jsonl-entries.ts:294,:399._marinara.chatIdfor Claude Subscription generation:src/engine/generation/start-generation.ts:3263._marinara.chatId, selects a stable session id, and renders only current/trailing prompt:src-tauri/crates/llm/src/lib.rs:2901,:2993,:3378.src-tauri/crates/llm/src/lib.rs:5577.Regression notes
Legacy
mainhad synthetic JSONL session injection through Claude Agent SDKSessionStore. Refactor moved provider execution to Rust/Claude Code CLI and kept the session id but not per-request history injection.Additional context
Acceptance criteria:
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 6, 2026):
Fixed in refactor with commit 90c49729.
Behavior changed:
Verification: