gstack icon indicating copy to clipboard operation
gstack copied to clipboard

Skill routing reads the Claude desktop app's own notes as typed text (`<side-sessions-event>`)

Open stevewandler opened this issue 3 days ago • 2 comments

gstack 1.106.2.0 (#4971) strips <system-reminder> before routing, which fixes most of what we saw in the Claude desktop app's Code tab. One wrapper is still scored as a typed prompt. When a session started from the current one finishes a turn, the app adds a <side-sessions-event>…</side-sessions-event> block to the parent's next user turn. Claude Code fires UserPromptSubmit with it, and the log records kind=typed.

Repro with 1.106.2.0:

gstack-skill-route --explain '<side-sessions-event>The session helper-1 finished a turn. Next step for you: run the checks on its branch, then tell the user the outcome.</side-sessions-event>'

Expected: no route, like <cross-session-message> and <task-notification> (#4423, #4801). Actual: route: /build-check ("run the checks").

The app's real events quote the child's report, so the quoted-block rule usually saves them. Its own text around the quote is still read as the user's request.

Second item: a description in the past tense still routes. A 5,659-character session brief that says "why a helper's load test (65 of 65) passed against the wrong list" routes to /build-check on "make the tests pass" in 1.106.2.0. "test" and "passed" share one clause, but the clause reports a result and asks for nothing. Expected: no route, as for the mention rule (#4802).

Suggested fix: strip a <side-sessions-event>…</side-sessions-event> block before routing, as #4971 does for system wrappers, keeping any text the person typed outside it. Don't classify the whole turn as non-typed, because the person's own words can share the turn.

Evidence: the turns were read from Claude Code's session transcripts. Each was matched to its routing-log line by session id, minute and exact character count. The raw UserPromptSubmit payload itself was not captured.

Found on gstack 1.106.1.0 on macOS, Claude Code in the Claude desktop app, 1 December 2026. The app's notes and helper briefs caused 19 false routes to /build-check or /review in about 70 minutes. 1.106.2.0 clears 18 of them in a replay; the one left is the second item.

stevewandler avatar Dec 01 '26 23:12 stevewandler

Checked

DananjayaNadun avatar Dec 02 '26 04:12 DananjayaNadun

Thanks for the clean repro and transcript replay, @stevewandler. We reproduced both items on current main (a7ae510, v1.106.4.0):

  1. <side-sessions-event>...</side-sessions-event> routes to /build-check (1.00, "run the checks") instead of being stripped before routing like <system-reminder>.
  2. The past-tense descriptive clause "why a helper's load test (65 of 65) passed against the wrong list" routes to /build-check (1.00, "make the tests pass").

Note that skill_routing is now off by default as of v1.106.4.0 (#4991), so default installs won't hit this, but users who opt back in with gstack-config set skill_routing on still will. We're taking this fix (tracked in GSTA-36) to strip <side-sessions-event> blocks while preserving surrounding user text and tighten the past-tense match, and we'll link the PR here once it lands.

capy-ai[bot] avatar Dec 02 '26 16:12 capy-ai[bot]