[GH-ISSUE #1561] [Issue]: Prompt Reviewer can return invalid JSON on GPT 5.5 #801

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

Originally created by @Promansis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1561

Originally assigned to: @cha1latte on GitHub.

Summary

The Prompt Reviewer agent can return non-valid JSON on GPT 5.5, while the same workflow reportedly works on Opus 4.7.

Parent smoke test: #1485

Expected behavior

Prompt Reviewer should either receive sufficiently strict structured-output instructions for supported providers/models, or the runtime should surface a clear parse failure that lets the user understand the reviewer failed without derailing the broader generation flow.

Actual behavior

Manual testing reported that Prompt Reviewer returns invalid JSON on GPT 5.5. Opus 4.7 reportedly returns valid JSON for the same reviewer.

Steps to reproduce

  1. Configure an agent-capable connection using GPT 5.5.
  2. Enable/run Prompt Reviewer.
  3. Trigger generation so Prompt Reviewer analyzes the assembled prompt.
  4. Observe that the reviewer response is not valid JSON.
  5. Compare with Opus 4.7, where the same report says it works.

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: refactor branch, reported during manual Catalog Editors sweep on 2026-05-29
  • Run mode: not specified
  • OS + version: not specified
  • Node + pnpm versions: not specified
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not specified
  • Provider, model, or integration, if relevant: GPT 5.5 fails, Opus 4.7 works

Logs, screenshots, or video

Manual report: "AI prompt reviewer returns non valid json on gpt 5.5, works on Opus 4.7"

Source areas inspected:

  • src/engine/contracts/constants/agent-prompts.ts defines the Prompt Reviewer JSON shape in prose.
  • src/engine/agents-runtime/executor/agent-executor.ts parses JSON agent responses through extractJson/JSON.parse.

Regression notes

Unknown.

Additional context

Checked upstream issues and PRs for Prompt Reviewer, invalid JSON, GPT 5.5, Opus, and structured agent output overlap. PR #1416 fixed a broader malformed structured-agent-output path, but no existing issue was found for this model-specific Prompt Reviewer failure.

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 @Promansis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1561 Originally assigned to: @cha1latte on GitHub. ## Summary The Prompt Reviewer agent can return non-valid JSON on GPT 5.5, while the same workflow reportedly works on Opus 4.7. Parent smoke test: #1485 ## Expected behavior Prompt Reviewer should either receive sufficiently strict structured-output instructions for supported providers/models, or the runtime should surface a clear parse failure that lets the user understand the reviewer failed without derailing the broader generation flow. ## Actual behavior Manual testing reported that Prompt Reviewer returns invalid JSON on GPT 5.5. Opus 4.7 reportedly returns valid JSON for the same reviewer. ## Steps to reproduce 1. Configure an agent-capable connection using GPT 5.5. 2. Enable/run Prompt Reviewer. 3. Trigger generation so Prompt Reviewer analyzes the assembled prompt. 4. Observe that the reviewer response is not valid JSON. 5. Compare with Opus 4.7, where the same report says it works. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] 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: refactor branch, reported during manual Catalog Editors sweep on 2026-05-29 - Run mode: not specified - OS + version: not specified - Node + pnpm versions: not specified - Rust version, if relevant: not relevant - Remote Runtime URL configured? not specified - Provider, model, or integration, if relevant: GPT 5.5 fails, Opus 4.7 works ## Logs, screenshots, or video Manual report: "AI prompt reviewer returns non valid json on gpt 5.5, works on Opus 4.7" Source areas inspected: - `src/engine/contracts/constants/agent-prompts.ts` defines the Prompt Reviewer JSON shape in prose. - `src/engine/agents-runtime/executor/agent-executor.ts` parses JSON agent responses through `extractJson`/`JSON.parse`. ## Regression notes Unknown. ## Additional context Checked upstream issues and PRs for Prompt Reviewer, invalid JSON, GPT 5.5, Opus, and structured agent output overlap. PR #1416 fixed a broader malformed structured-agent-output path, but no existing issue was found for this model-specific Prompt Reviewer failure. ## 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:21:19 +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#801
No description provided.