[GH-ISSUE #5539] Local sidecar cannot be the default connection for agents, and there is no bulk agent connection assignment #3078

Closed
opened 2026-10-21 05:59:25 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolacheee on GitHub (Aug 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5539

Originally assigned to: @kolacheee on GitHub.

From the same user report as #5537: the user wanted all their agents on the local sidecar. To do that they had to open every agent one by one and set its connection manually, because the app offers no other way — and along the way they concluded (reasonably, but wrongly) that a bulk option had been removed.

Two gaps combine here.

1. The defaults section cannot express "agents default to the local sidecar"

The Connections panel's defaults section ("default for Agents") builds its picker exclusively from stored connection rows and flags one row's defaultForAgents. The local sidecar is not a row: it is a client-side pseudo-connection fabricated on the fly (createLocalSidecarConnectionOption in packages/client/src/lib/connection-filters.ts, id __local_sidecar__ from packages/shared/src/constants/defaults.ts:10), and its option type has no defaultForAgents field at all. The defaults UI never calls appendLocalSidecarConnectionOption, so the sidecar simply never appears there — with the model downloaded or not.

Server-side resolution matches: an agent with no explicit connection resolves per-agent connectionId → the defaultForAgents DB row → the chat's connection. The sidecar can only ever enter through the per-agent explicit id, so "agents default to the sidecar" is currently inexpressible in the data model, not just missing from the UI.

The only workaround is setting the chat's connection to Local Model so agents inherit it — which also routes the roleplay itself through the deliberately small default model that the UI's own copy warns is not meant for roleplay. Not a real answer.

2. There is no bulk connection assignment for agents

The single bulk control that exists is "Use local model for all tracker agents" (ConnectionsPanel.tsx:607-626) — tracker-category only, and currently buried (#5538). Agent count is catalog-driven and grows with every installed package; the Agents panel has no bulk connection control at all. So moving a full agent roster between backends — in either direction — means editing every agent by hand today. That is exactly the round trip the reporting user performed, twice.

Try it yourself

  1. Download the built-in local model.
  2. Connections panel → defaults section → "default for Agents": the local sidecar is not in the list.
  3. Look for any control that assigns a connection to all (non-tracker) agents at once: there is none.

Suggested directions

  • Make the sidecar a first-class citizen of default resolution: either accept the __local_sidecar__ sentinel in the defaultForAgents slot (resolution already knows how to route the per-agent version of it), or synthesize a virtual row for the defaults picker that persists the sentinel.
  • Add a bulk "set connection for all agents / all agents in category" action to the Agents panel, generalizing what handleAssignTrackersToLocal already does for trackers.

Either half alone would have saved the reporting user the manual round trip; together they make backend experiments (exactly what the sidecar invites) cheap instead of punishing.

Originally created by @kolacheee on GitHub (Aug 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5539 Originally assigned to: @kolacheee on GitHub. From the same user report as #5537: the user wanted all their agents on the local sidecar. To do that they had to open **every agent one by one** and set its connection manually, because the app offers no other way — and along the way they concluded (reasonably, but wrongly) that a bulk option had been removed. Two gaps combine here. ## 1. The defaults section cannot express "agents default to the local sidecar" The Connections panel's defaults section ("default for Agents") builds its picker exclusively from **stored connection rows** and flags one row's `defaultForAgents`. The local sidecar is not a row: it is a client-side pseudo-connection fabricated on the fly (`createLocalSidecarConnectionOption` in `packages/client/src/lib/connection-filters.ts`, id `__local_sidecar__` from `packages/shared/src/constants/defaults.ts:10`), and its option type has no `defaultForAgents` field at all. The defaults UI never calls `appendLocalSidecarConnectionOption`, so the sidecar simply never appears there — with the model downloaded or not. Server-side resolution matches: an agent with no explicit connection resolves per-agent `connectionId` → the `defaultForAgents` DB row → the chat's connection. The sidecar can only ever enter through the per-agent explicit id, so "agents default to the sidecar" is currently **inexpressible in the data model**, not just missing from the UI. The only workaround is setting the *chat's* connection to Local Model so agents inherit it — which also routes the roleplay itself through the deliberately small default model that the UI's own copy warns is not meant for roleplay. Not a real answer. ## 2. There is no bulk connection assignment for agents The single bulk control that exists is "Use local model for all tracker agents" (`ConnectionsPanel.tsx:607-626`) — tracker-category only, and currently buried (#5538). Agent count is catalog-driven and grows with every installed package; the Agents panel has no bulk connection control at all. So moving a full agent roster between backends — in either direction — means editing every agent by hand today. That is exactly the round trip the reporting user performed, twice. ## Try it yourself 1. Download the built-in local model. 2. Connections panel → defaults section → "default for Agents": the local sidecar is not in the list. 3. Look for any control that assigns a connection to all (non-tracker) agents at once: there is none. ## Suggested directions - Make the sidecar a first-class citizen of default resolution: either accept the `__local_sidecar__` sentinel in the `defaultForAgents` slot (resolution already knows how to route the per-agent version of it), or synthesize a virtual row for the defaults picker that persists the sentinel. - Add a bulk "set connection for all agents / all agents in category" action to the Agents panel, generalizing what `handleAssignTrackersToLocal` already does for trackers. Either half alone would have saved the reporting user the manual round trip; together they make backend experiments (exactly what the sidecar invites) cheap instead of punishing.
Author
Owner

@kolacheee commented on GitHub (Aug 25, 2026):

Implementation starting — owner: @kolacheee. Draft PR will follow shortly on a staging-targeted branch.

<!-- gh-comment-id:5413731003 --> @kolacheee commented on GitHub (Aug 25, 2026): Implementation starting — owner: @kolacheee. Draft PR will follow shortly on a `staging`-targeted branch.
Author
Owner

@kolacheee commented on GitHub (Aug 25, 2026):

Implemented in draft PR #5542 (top of the stack #5540 → #5541 → #5542). Owner: @kolacheee.

<!-- gh-comment-id:5414145016 --> @kolacheee commented on GitHub (Aug 25, 2026): Implemented in draft PR #5542 (top of the stack #5540 → #5541 → #5542). Owner: @kolacheee.
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#3078
No description provided.