mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5721] [Issue]: Professor Mari: plans stay hidden in reasoning on custom providers; edits are generated and confirmed twice #3166
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#3166
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 @SpicyMarinara on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5721
Originally assigned to: @kolacheee on GitHub.
Summary
Two Professor Mari problems reported by the same user (Discord thread below, diagnostics in the transcript: Engine 2.4.4+b4abada51254, custom Unsloth connection,
unsloth/gemma-4-26B-A4B-it-GGUF, Firefox on Windows):A. With a custom provider and reasoning enabled, Mari's brainstorming plans and questions stay inside the model's hidden reasoning — the visible reply says she has made a plan or has questions, but the plan and questions themselves never appear.
B. When asked to revise a record, Mari does the same work twice and demands two separate confirmations before anything is applied.
Problem A — plans and questions stay hidden in reasoning (custom provider, reasoning enabled)
What the user sees: ask Mari for help brainstorming a lorebook. The visible reply says she has created a plan, or a list of questions for you to answer — but neither the plan nor the questions are anywhere in the reply. They exist only in the model's internal reasoning (screenshot in the transcript). In the reporter's words: "the model writes that it has created a plan or a list of questions for me to answer to build a lorebook, but all of this remains within the internal reasoning — it isn't clear what exactly it has come up with."
How to reproduce (try it yourself):
gemma-4-26B-A4B-it-GGUF), with reasoning enabled.Where it is:
packages/server/src/services/professor-mari/workspace-agent.service.ts:2842-2863(disableHiddenReasoningin the workspace chat options).What's happening: Mari already knows hidden reasoning is hazardous to her JSON command protocol — the code disables it (
reasoningEffort: "none") with the comment "Hidden reasoning can consume the whole response before local OpenAI-compatible servers emit the JSON frame." But the disable deliberately excludes custom providers:disableHiddenReasoningis only true for sidecar or non-custom connections. So on exactly the reporter's setup, reasoning stays on, the model does its substantive work (the plan, the questions) in the hidden channel, and the visible JSONsayframe only alludes to it. The reasoning text streams to the thinking indicator but is not part of the durable reply.Suggested fix (verify before building): extend the hidden-reasoning disable to custom providers — presumably it was excluded because some custom endpoints reject reasoning-control parameters, so make it best-effort (send the reasoning-off parameter; a per-connection override for endpoints that choke on it). Independently worth considering: when a reply's
sayis thin while the reasoning stream carried substantial content, surface that content (or at least a hint) instead of silently dropping the model's actual work.Problem B — the same edit is generated twice and confirmed twice
What the user sees, verbatim:
How to reproduce (try it yourself):
Where it is: the server-side authorization gate in
packages/server/src/services/professor-mari/workspace-agent.service.ts— theauthorizationverbatim-excerpt requirement on every mutating command and its "Mutation blocked before execution" replies. Introduced by05a63b61e("Gate Professor Mari mutations before execution", 2026-08-16) and tightened by the follow-ups (d0609d33ebind approvals to one operation,9946e7401scope vague mutation confirmations,18864dcc2,4561521a1,cba32c6ba/ #5530).What's happening: every mutating command must quote a verbatim excerpt of the user's own message that explicitly asks for that change; intent-implying phrasings ("rework it to be more cynical") don't qualify, so Mari's first, correct attempt is discarded along with its generated content. The eventual apply then passes through the client-side review window — the second confirmation. Two generations and two confirmations for one edit, with the first generation's tokens wasted.
Fix direction (maintainer decision): #4838 already keyed the read-only guardrail on intent, not grammar — that was the right stopping point. The stricter gate added after it was an overcorrection driven by complaints from users who didn't realize their own words ("there is a problem with this character, present your proposal") implied a change request. With the memory system shipped (#4851), the blanket gate is unnecessary: revert Mari's post-#4838 behavior tightening so an intent-authorized edit lands directly in the existing proposed-changes review window — one generation, one confirmation, with the review window as the safety net (which also matches the reporter's suggestion). Users who genuinely want Mari less forward can pin a memory saying so.
Additionally, Mari should gauge this herself: if a user twice asks her to "propose changes", she stages tool edits, and they react with annoyance both times, she should proactively save a memory that for this user "propose changes" means describing the changes in chat rather than staging edits — and behave accordingly from then on.
Longer-term, the per-user policy question is #5725 (Permissions Mode selector), which replaces a one-size-fits-all posture entirely.
Both problems investigated with AI assistance against the current staging tree; Problem A's mechanism is read from code and matches the report exactly but has not been reproduced against a live Unsloth endpoint — verify during the fix. Related: #4813, #4838, #4851, #5530, #5725.
Provenance
Discord thread: Professor Mari — https://discord.com/channels/1417099416812392641/1543254569188982847
Requested by: kolache (k0lache, Discord ID 220320261780668416)
Discord thread transcript (4 messages)
The reporter's Problem-B follow-up was relayed by the maintainer from the same support context.