3a263b551b
requestGateway (contrib/wiring) resolved the owning backend from $focusedStoredSessionId — the WINDOW's focused tile — for every RPC it dispatched. A session-scoped RPC names its real target in params.session_id; whenever that session's chat was NOT the focused pane (any background bot chat — the normal Bot Mode case), the RPC was dispatched on whichever backend the focused tile happened to own. A profile bot's prompt.submit then executed on the DEFAULT backend (sessions created in the default store, profile logs empty), or failed with 4001 'session not found' when default didn't hold the session. Root cause isolated by Teknium: submit for a Developer-profile bot ran in root logs/agent.log while profiles/developer/logs sat empty, and completed only when default happened to hold the session — proving the misroute sits downstream of the tile-owner-route lookup, in the routing-key choice itself. requestGateway now routes by the RPC's own target first: params.session_id (a RUNTIME id) is translated to the stored id via the tile map — new storedSessionIdForRuntimeId() in session-states, where tiles already carry both identities — and only session-less RPCs (config reads, list refreshes, cron) fall back to the focused-tile key, which is genuinely window-ambient. Stored-id claims win over runtime bindings in the lookup so a stale tile's dead runtimeId can never hijack a live tile's identity.