fix(desktop): send a skill's kickoff into the tab that invoked it - #71891
Merged
Conversation
`/work` typed into a fresh Cmd+T tab loaded the skill in that tab and printed "⚡ loading skill: work" there, then fired the skill's kickoff prompt as a user message into whatever conversation was on screen. The dispatcher resolves its target once, through resolveTargetSessionId, and every other consumer of that answer already honors it: the output writer binds to the target's stored id, and the busy gate reads the target's own state. The send did not — `submitPromptText(message)` passed no target at all, so submit fell back to `activeSessionIdRef`, which names the foreground chat. #71805 fixed the two sibling leaks in this same function; this is the third and the one that actually moved the user's prompt. Forward the resolved pair instead. Every target the dispatcher serves — a tile, a background queue drain, a session this very call created — was hitting the same fallback, so the fix covers the class rather than the tab case that surfaced it.
OutThisLife
enabled auto-merge
July 26, 2026 10:10
Contributor
૮ >ﻌ< ა ci reviewran on 2a6368f ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence is publishing... |
19 tasks
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…target fix(desktop): send a skill's kickoff into the tab that invoked it
33hodl
pushed a commit
to 33hodl/hermes-agent
that referenced
this pull request
Aug 12, 2026
…target fix(desktop): send a skill's kickoff into the tab that invoked it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Typing
/workinto a fresh ⌘T tab loaded the skill in that tab and printed⚡ loading skill: workthere — then fired the skill's kickoff prompt as a user message into whatever conversation was on screen. The tab sat empty while the primary chat got hijacked mid-conversation.The dispatcher resolves its target once, through
resolveTargetSessionId, and every other consumer of that answer already honors it: the output writer binds to the target's stored id, and the busy gate reads the target's own published state. The send did not.submitPromptText(message)passed no target at all, so submit fell back toactiveSessionIdRef— which names the foreground chat, not the session the command was resolved against.#71805 fixed the two sibling leaks in this same function (the busy gate and the output binding). This is the third, and the one that actually moved the user's prompt: the tab correctly showed the skill loading, so the surface looked right while the payload went elsewhere.
Forwarding the resolved
{ sessionId, storedSessionId }pair fixes the whole class, not just the tab case that surfaced it — a tile, a background queue drain, and a session created by the slash call itself were all landing on the same fallback.Verification
The new test reverses on the parent commit with
session_id: "foreground-runtime"where"tab-runtime"is expected — the exact symptom, not a restatement of the implementation. 941 tests pass acrosssrc/app;tsc --noEmit, eslint, and prettier clean.