[GH-ISSUE #1857] [Issue]: Greeting macro variables do not persist into character fields #901

Closed
opened 2026-10-21 05:23:10 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @cha1latte on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1857

Originally assigned to: @cha1latte on GitHub.

{{setvar}} values created from {{random}} in a character greeting are not available when later prompt sections render character fields such as appearance or personality. This makes randomized-per-chat character details either resolve empty or re-randomize instead of staying stable for that chat.

Expected behavior

A greeting such as:

{{setvar::coat::{{random::red coat::blue coat::green coat::grey coat}}}}

should choose one coat value when the greeting is resolved, persist that value for the chat/prompt context, and allow character fields or prompt sections to read it with:

{{getvar::coat}}

The selected value should remain stable across later messages in that chat.

Actual behavior

{{getvar::coat}} in fields like appearance sends an empty value to the AI, or {{random}}-based values can change again on later messages instead of staying fixed after the greeting.

Steps to reproduce

  1. Create or edit a roleplay character with a greeting/first message that sets a variable from a random macro, for example {{setvar::coat::{{random::red coat::blue coat::green coat::grey coat}}}}.
  2. Put He is wearing {{getvar::coat}} in the character appearance or another character field included in the prompt.
  3. Start a new roleplay chat from that character and generate/respond after the greeting is present.
  4. Inspect the prompt or model behavior for the resolved appearance text.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: Git/source build; exact branch or commit not provided
  • Run mode: not specified
  • OS + version: Linux; version not provided
  • Node + pnpm versions: not provided
  • Rust version, if relevant: not provided
  • Remote Runtime URL configured? not relevant / not specified
  • Provider, model, or integration, if relevant: not provided

Logs, screenshots, or video

No logs or screenshots provided.

Regression notes

Unknown. The report compares the desired behavior to SillyTavern-style {{pick}} behavior, but no last known good Marinara build was provided. This issue is most likely on the old codebase (1.6.1).

Additional context

Original user example used {{setvar::coat{{random::red coat::blue coat::green coat::grey coat}}, which appears to be missing the :: between the variable name and value. However, the larger issue remains valid with corrected syntax: greeting/history macro side effects are not persisted in a way that later character field macro resolution can read consistently.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1857 Originally assigned to: @cha1latte on GitHub. `{{setvar}}` values created from `{{random}}` in a character greeting are not available when later prompt sections render character fields such as appearance or personality. This makes randomized-per-chat character details either resolve empty or re-randomize instead of staying stable for that chat. ## Expected behavior A greeting such as: ```text {{setvar::coat::{{random::red coat::blue coat::green coat::grey coat}}}} ``` should choose one coat value when the greeting is resolved, persist that value for the chat/prompt context, and allow character fields or prompt sections to read it with: ```text {{getvar::coat}} ``` The selected value should remain stable across later messages in that chat. ## Actual behavior `{{getvar::coat}}` in fields like appearance sends an empty value to the AI, or `{{random}}`-based values can change again on later messages instead of staying fixed after the greeting. ## Steps to reproduce 1. Create or edit a roleplay character with a greeting/first message that sets a variable from a random macro, for example `{{setvar::coat::{{random::red coat::blue coat::green coat::grey coat}}}}`. 2. Put `He is wearing {{getvar::coat}}` in the character appearance or another character field included in the prompt. 3. Start a new roleplay chat from that character and generate/respond after the greeting is present. 4. Inspect the prompt or model behavior for the resolved appearance text. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [x] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: Git/source build; exact branch or commit not provided - Run mode: not specified - OS + version: Linux; version not provided - Node + pnpm versions: not provided - Rust version, if relevant: not provided - Remote Runtime URL configured? not relevant / not specified - Provider, model, or integration, if relevant: not provided ## Logs, screenshots, or video No logs or screenshots provided. ## Regression notes Unknown. The report compares the desired behavior to SillyTavern-style `{{pick}}` behavior, but no last known good Marinara build was provided. This issue is most likely on the old codebase (1.6.1). ## Additional context Original user example used `{{setvar::coat{{random::red coat::blue coat::green coat::grey coat}}`, which appears to be missing the `::` between the variable name and value. However, the larger issue remains valid with corrected syntax: greeting/history macro side effects are not persisted in a way that later character field macro resolution can read consistently. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:23:10 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

fixed in #1860

<!-- gh-comment-id:4597063059 --> @cha1latte commented on GitHub (Jun 1, 2026): fixed in #1860
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#901
No description provided.