[GH-ISSUE #5721] [Issue]: Professor Mari: plans stay hidden in reasoning on custom providers; edits are generated and confirmed twice #3166

Closed
opened 2026-10-21 06:00:09 +07:00 by bsakaguchi · 0 comments
Owner

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):

  1. Create a custom-provider connection to a local OpenAI-compatible server running a reasoning-capable model (reporter: Unsloth serving gemma-4-26B-A4B-it-GGUF), with reasoning enabled.
  2. Select it as Professor Mari's connection and ask her to help brainstorm a lorebook ("help me brainstorm ideas for a lorebook about X — ask me what you need to know").
  3. Watch the reply reference a plan or questions that are never shown; the live Reasoning strip carries the substance instead.

Where it is: packages/server/src/services/professor-mari/workspace-agent.service.ts:2842-2863 (disableHiddenReasoning in 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: disableHiddenReasoning is 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 JSON say frame 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 say is 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:

When I ask the Professor to revise something based on specific criteria, she makes the changes and immediately attempts to apply them; the system rejects this, however, requiring the user to enter a word approving the update. After this, the professor repeats the same procedure, regenerating the same result and asks to press the button to make changes. In both instances, user confirmation is required. I suggest removing the step where the Professor immediately attempts to update the record, since a window displaying the proposed changes — which must be confirmed — appears anyway before the record is finally updated.

How to reproduce (try it yourself):

  1. Ask Professor Mari to revise an existing record with criteria phrased as a request rather than a command — e.g. "this character's personality reads flat; rework it to be more cynical."
  2. Mari generates the revision and calls the update tool; the server's authorization gate rejects it ("Mutation blocked before execution: …") and Mari asks you to confirm.
  3. Type the approval; Mari regenerates the same revision, calls the tool again, and this time the proposed-changes review window opens — a second confirmation for the same edit.

Where it is: the server-side authorization gate in packages/server/src/services/professor-mari/workspace-agent.service.ts — the authorization verbatim-excerpt requirement on every mutating command and its "Mutation blocked before execution" replies. Introduced by 05a63b61e ("Gate Professor Mari mutations before execution", 2026-08-16) and tightened by the follow-ups (d0609d33e bind approvals to one operation, 9946e7401 scope 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)
[2026-08-29T13:42:41.578Z] Krewetco: Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+b4abada51254
Commit: b4abada51254
Server OS: Windows 10.0.19045 (x64)
Server memory: heap 145.5 / 4288 MiB; RSS 238 MiB
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0
GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3060
Active connection: Unsloth
Connection provider: custom
LLM model: unsloth/gemma-4-26B-A4B-it-GGUF

When creating a LoRA, Marinara proposes a plan or asks questions that remain internal to her reasoning; it is unclear what plan she has devised or what questions she is asking.
[Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543254569188982847]

[2026-08-29T13:42:42.194Z] Professor Mari [bot]: (automated support-bot reply omitted)
[Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543254571772551270]

[2026-08-29T21:41:40.015Z] Kuc0: I don’t get it.
[Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543375106930122872]

[2026-08-29T21:47:31.696Z] Krewetco: This issue is related to the reasoning process. For some reason, when I ask for help brainstorming ideas, 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. This is a problem with the Unsloth provider; for some reason, the "Professor" model doesn't work well with this provider when reasoning is enabled.

[attached image 1: https://cdn.discordapp.com/attachments/1543254569188982847/1543376581005942884/04989a4177aaeec4.png?ex=6a97f0b3&is=6a969f33&hm=7f34bd07465260ae41cbeac4f55a19016fc7d4756a4475c779f103d23741fd69&]
[Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543376581987274802]

The reporter's Problem-B follow-up was relayed by the maintainer from the same support context.

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):** 1. Create a **custom**-provider connection to a local OpenAI-compatible server running a reasoning-capable model (reporter: Unsloth serving `gemma-4-26B-A4B-it-GGUF`), with reasoning enabled. 2. Select it as Professor Mari's connection and ask her to help brainstorm a lorebook ("help me brainstorm ideas for a lorebook about X — ask me what you need to know"). 3. Watch the reply reference a plan or questions that are never shown; the live Reasoning strip carries the substance instead. **Where it is:** `packages/server/src/services/professor-mari/workspace-agent.service.ts:2842-2863` (`disableHiddenReasoning` in 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: `disableHiddenReasoning` is 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 JSON `say` frame 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 `say` is 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: > When I ask the Professor to revise something based on specific criteria, she makes the changes and immediately attempts to apply them; the system rejects this, however, requiring the user to enter a word approving the update. After this, the professor repeats the same procedure, regenerating the same result and asks to press the button to make changes. In both instances, user confirmation is required. I suggest removing the step where the Professor immediately attempts to update the record, since a window displaying the proposed changes — which must be confirmed — appears anyway before the record is finally updated. **How to reproduce (try it yourself):** 1. Ask Professor Mari to revise an existing record with criteria phrased as a request rather than a command — e.g. "this character's personality reads flat; rework it to be more cynical." 2. Mari generates the revision and calls the update tool; the server's authorization gate rejects it ("Mutation blocked before execution: …") and Mari asks you to confirm. 3. Type the approval; Mari **regenerates the same revision**, calls the tool again, and this time the proposed-changes review window opens — a second confirmation for the same edit. **Where it is:** the server-side authorization gate in `packages/server/src/services/professor-mari/workspace-agent.service.ts` — the `authorization` verbatim-excerpt requirement on every mutating command and its "Mutation blocked before execution" replies. Introduced by `05a63b61e` ("Gate Professor Mari mutations before execution", 2026-08-16) and tightened by the follow-ups (`d0609d33e` bind approvals to one operation, `9946e7401` scope 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) <details> <summary>Discord thread transcript (4 messages)</summary> ```text [2026-08-29T13:42:41.578Z] Krewetco: Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+b4abada51254 Commit: b4abada51254 Server OS: Windows 10.0.19045 (x64) Server memory: heap 145.5 / 4288 MiB; RSS 238 MiB Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 Active connection: Unsloth Connection provider: custom LLM model: unsloth/gemma-4-26B-A4B-it-GGUF When creating a LoRA, Marinara proposes a plan or asks questions that remain internal to her reasoning; it is unclear what plan she has devised or what questions she is asking. [Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543254569188982847] [2026-08-29T13:42:42.194Z] Professor Mari [bot]: (automated support-bot reply omitted) [Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543254571772551270] [2026-08-29T21:41:40.015Z] Kuc0: I don’t get it. [Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543375106930122872] [2026-08-29T21:47:31.696Z] Krewetco: This issue is related to the reasoning process. For some reason, when I ask for help brainstorming ideas, 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. This is a problem with the Unsloth provider; for some reason, the "Professor" model doesn't work well with this provider when reasoning is enabled. [attached image 1: https://cdn.discordapp.com/attachments/1543254569188982847/1543376581005942884/04989a4177aaeec4.png?ex=6a97f0b3&is=6a969f33&hm=7f34bd07465260ae41cbeac4f55a19016fc7d4756a4475c779f103d23741fd69&] [Discord message: https://discord.com/channels/1417099416812392641/1543254569188982847/1543376581987274802] ``` </details> The reporter's Problem-B follow-up was relayed by the maintainer from the same support context.
bsakaguchi 2026-10-21 06:00:09 +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#3166
No description provided.