[PR #3933] [MERGED] Log full agent responses in server debug output #6164

Closed
opened 2026-10-23 04:07:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3933
Author: @SpicyMarinara
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/3931-log-failed-agent-responses


📝 Commits (1)

  • 05bbae3 Log full agent responses in debug mode

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 packages/server/src/services/agents/agent-executor.ts (+12 -1)

📄 Description

What changed

  • Mirrors complete raw agent responses to the server terminal when UI debug mode or DEBUG_AGENTS is enabled.
  • Covers initial and retry responses through the shared debug-event boundary, including malformed JSON payloads.
  • Preserves normal logging behavior when debug output is disabled.

Why

The agent executor already sent the full response through the browser debug event, but its server-side logger only emitted a short preview at debug level. With the default log level, a malformed JSON response therefore produced a retry warning without showing the payload that caused it.

This gives users diagnosing local-model formatting failures the same response detail in the server terminal that they already receive in the browser console.

Fixes #3931

Validation performed

  • pnpm check
  • pnpm regression:prompt
  • pnpm --filter @marinara-engine/server exec tsc --noEmit
  • git diff --check

Manual verification

  • Enable UI debug mode and confirm a malformed agent response is printed in full in the server terminal before the JSON retry warning.
  • Confirm successful initial and retry responses remain visible in the browser debug console.

Summary by CodeRabbit

  • Bug Fixes
    • Improved debug logging for agent responses and retries.
    • Debug output now includes response length and full response text when agent debugging is enabled.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3933 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/3931-log-failed-agent-responses` --- ### 📝 Commits (1) - [`05bbae3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/05bbae3a647f1f5e02dedc6c592adc9c9d15da92) Log full agent responses in debug mode ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/agents/agent-executor.ts` (+12 -1) </details> ### 📄 Description ## What changed - Mirrors complete raw agent responses to the server terminal when UI debug mode or `DEBUG_AGENTS` is enabled. - Covers initial and retry responses through the shared debug-event boundary, including malformed JSON payloads. - Preserves normal logging behavior when debug output is disabled. ## Why The agent executor already sent the full response through the browser debug event, but its server-side logger only emitted a short preview at debug level. With the default log level, a malformed JSON response therefore produced a retry warning without showing the payload that caused it. This gives users diagnosing local-model formatting failures the same response detail in the server terminal that they already receive in the browser console. Fixes #3931 ## Validation performed - `pnpm check` - `pnpm regression:prompt` - `pnpm --filter @marinara-engine/server exec tsc --noEmit` - `git diff --check` ## Manual verification - [ ] Enable UI debug mode and confirm a malformed agent response is printed in full in the server terminal before the JSON retry warning. - [ ] Confirm successful initial and retry responses remain visible in the browser debug console. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved debug logging for agent responses and retries. * Debug output now includes response length and full response text when agent debugging is enabled. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:42 +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#6164
No description provided.