Skip to content

fix(desktop): send a skill's kickoff into the tab that invoked it - #71891

Merged
OutThisLife merged 1 commit into
mainfrom
bb/slash-tab-target
Jul 26, 2026
Merged

fix(desktop): send a skill's kickoff into the tab that invoked it#71891
OutThisLife merged 1 commit into
mainfrom
bb/slash-tab-target

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Typing /work into a fresh ⌘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 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 to activeSessionIdRef — 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 across src/app; tsc --noEmit, eslint, and prettier clean.

`/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
OutThisLife enabled auto-merge July 26, 2026 10:10
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 26, 2026
@OutThisLife
OutThisLife merged commit 080ee07 into main Jul 26, 2026
33 checks passed
@OutThisLife
OutThisLife deleted the bb/slash-tab-target branch July 26, 2026 10:15
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 2a6368f

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence is publishing...

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants