[GH-ISSUE #2565] [Issue]: YouTube Music DJ emits no result ("No agents ran") after Spotify/YouTube merge #1264

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

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

Originally assigned to: @Romuromylus on GitHub.

Summary

After the Spotify and YouTube DJ agents were merged into the unified Music DJ agent, the Music DJ in YouTube mode no longer plays anything. Triggering it (e.g. "Retry Music DJ" in Game Mode) surfaces the toast "No agents ran. Add tracker agents to this chat or check their connection settings," even though the agent is fully configured.

Expected behavior

With Music DJ set to musicProvider: "youtube" (a YouTube Data API key and a connection assigned), running the agent should return a youtube_control result with a mood-matched search query, and the embedded player should play the resulting track.

Actual behavior

The agent starts but never emits an agent_result, so agentResultCount === 0 and the "No agents ran…" toast fires. No track plays. The agent is being handed the full Spotify tool set (spotify_search, spotify_play, …) despite being in YouTube mode, so it runs as a tool-calling agent instead of the pure-JSON YouTube agent and never produces the youtube_control result.

Steps to reproduce

  1. Configure the Music DJ agent with musicProvider: "youtube", a YouTube Data API key, and a model connection.
  2. Open a Game Mode chat with Music DJ enabled (YouTube).
  3. Trigger "Retry Music DJ" (or let it run on a turn).
  4. Observe the "No agents ran. Add tracker agents…" toast and no playback.

Environment

  • Marinara Engine version: 1.6.1 (staging)
  • Install type: docker
  • OS + version: Linux container
  • Browser or app shell: Chrome (web)

Logs, screenshots, or video

The retry SSE stream shows the agent running with the Spotify tools bound and no result:

agent_start
agent_debug  (tools: ["spotify_get_current_playback","spotify_get_playlists","spotify_get_playlist_tracks","spotify_search","spotify_play","spotify_set_volume"])
done

No agent_result event is emitted, so the client reports agentResultCount === 0.

Additional context

Root cause: two tool-binding paths backfill the full Spotify tool set whenever a "spotify"-type agent has an empty enabledTools list, without checking the music provider:

  • packages/server/src/routes/generate/retry-agents-route.ts (the Spotify tool-binding loop)
  • packages/server/src/services/generation/tool-resolution-runtime.ts (the equivalent main-generate path)

The settings-level resolution in packages/server/src/services/generation/agent-resolution.ts already guards this with a musicProvider !== "youtube" check; these two backfills were missing the same guard. Fix branch fix/music-dj-youtube-no-result; PR to follow.

Template check

Please uncheck (untick) 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 @Romuromylus on GitHub (Jun 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2565 Originally assigned to: @Romuromylus on GitHub. ## Summary After the Spotify and YouTube DJ agents were merged into the unified **Music DJ** agent, the Music DJ in YouTube mode no longer plays anything. Triggering it (e.g. "Retry Music DJ" in Game Mode) surfaces the toast "No agents ran. Add tracker agents to this chat or check their connection settings," even though the agent is fully configured. ## Expected behavior With Music DJ set to `musicProvider: "youtube"` (a YouTube Data API key and a connection assigned), running the agent should return a `youtube_control` result with a mood-matched search query, and the embedded player should play the resulting track. ## Actual behavior The agent starts but never emits an `agent_result`, so `agentResultCount === 0` and the "No agents ran…" toast fires. No track plays. The agent is being handed the full Spotify tool set (`spotify_search`, `spotify_play`, …) despite being in YouTube mode, so it runs as a tool-calling agent instead of the pure-JSON YouTube agent and never produces the `youtube_control` result. ## Steps to reproduce 1. Configure the Music DJ agent with `musicProvider: "youtube"`, a YouTube Data API key, and a model connection. 2. Open a Game Mode chat with Music DJ enabled (YouTube). 3. Trigger "Retry Music DJ" (or let it run on a turn). 4. Observe the "No agents ran. Add tracker agents…" toast and no playback. ## Environment - Marinara Engine version: 1.6.1 (`staging`) - Install type: docker - OS + version: Linux container - Browser or app shell: Chrome (web) ## Logs, screenshots, or video The retry SSE stream shows the agent running with the Spotify tools bound and no result: ``` agent_start agent_debug (tools: ["spotify_get_current_playback","spotify_get_playlists","spotify_get_playlist_tracks","spotify_search","spotify_play","spotify_set_volume"]) done ``` No `agent_result` event is emitted, so the client reports `agentResultCount === 0`. ## Additional context Root cause: two tool-binding paths backfill the full Spotify tool set whenever a `"spotify"`-type agent has an empty `enabledTools` list, without checking the music provider: - `packages/server/src/routes/generate/retry-agents-route.ts` (the Spotify tool-binding loop) - `packages/server/src/services/generation/tool-resolution-runtime.ts` (the equivalent main-generate path) The settings-level resolution in `packages/server/src/services/generation/agent-resolution.ts` already guards this with a `musicProvider !== "youtube"` check; these two backfills were missing the same guard. Fix branch `fix/music-dj-youtube-no-result`; PR to follow. ## Template check Please **uncheck (untick)** 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:30:12 +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#1264
No description provided.