The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): unmask the slash worker's real error behind the dispatch fallback
teknium1c68d889a3558
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsxindex a921f1763fb..1a6271e5623 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx@@ -1173,7 +1173,7 @@ describe('usePromptActions exec fallback error reporting', () => {vi.restoreAllMocks()})- it('surfaces the slash.exec failure when command.dispatch only adds "not a quick/plugin/skill command"', async () => {+ it('surfaces the slash.exec failure when command.dispatch only adds "not a quick/plugin/bundle/skill command"', async () => {const seeds: Record<string, unknown>[] = []const requestGateway = vi.fn(async (method: string) => {@@ -1182,7 +1182,7 @@ describe('usePromptActions exec fallback error reporting', () => {}if (method === 'command.dispatch') {- throw new Error('not a quick/plugin/skill command: debug')+ throw new Error('not a quick/plugin/bundle/skill command: debug')}return {} as never@@ -1206,7 +1206,7 @@ describe('usePromptActions exec fallback error reporting', () => {// the worker timeout is what actually went wrong (#44456).const texts = renderedSeedTexts(seeds)expect(texts.some(text => text.includes('slash worker timed out'))).toBe(true)- expect(texts.some(text => text.includes('not a quick/plugin/skill command'))).toBe(false)+ expect(texts.some(text => text.includes('skill command'))).toBe(false)})it('falls back to slash.exec when an older gateway lacks a dedicated RPC', async () => {diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.tsindex 876ea7d9f30..baee82f366e 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts@@ -428,12 +428,12 @@ export function useSlashCommand(deps: SlashCommandDeps) {await handleDispatch(dispatch)} catch (err) {- // "not a quick/plugin/skill command" just means the fallback had- // nothing to add — the slash.exec failure (worker timeout, crash) is+ // "not a quick/plugin/bundle/skill command" (older gateways: without+ // "bundle/") just means the fallback had nothing to add — the slash.exec failure (worker timeout, crash) is// the real error, so don't bury it under the routing noise.const dispatchMessage = err instanceof Error ? err.message : String(err)- if (slashExecError && /not a quick\/plugin\/skill command/i.test(dispatchMessage)) {+ if (slashExecError && /not a quick\/plugin\/(?:bundle\/)?skill command/i.test(dispatchMessage)) {const original = slashExecError instanceof Error ? slashExecError.message : String(slashExecError)renderSlashOutput(`error: /${name} failed: ${original}`)diff --git a/tui_gateway/server.py b/tui_gateway/server.pyindex 3325bc5edb0..5c331331613 100644--- a/tui_gateway/server.py+++ b/tui_gateway/server.py@@ -245,11 +245,9 @@ class _SlashWorker:# The worker runs the agent → needs provider credentials; tier-1 secrets (gateway/GitHub/# infra) are still stripped. A served profile's worker gets THAT profile's home + secrets and# none of the launch profile's .env / TERMINAL_* residue, exactly what a standalone- # `hermes -p X` would load itself.- # Multiplexing fail-closed: once the gateway serves a second profile home (#115427), the launch- # profile's OWN worker must still pass its home explicitly — otherwise inherit_credentials=True- # with no target (profile_home is None for the launch profile) and no bound scope raises- # UnscopedSecretError. When multiplexing is off the default (no target) is correct and untouched.+ # `hermes -p X` would load itself. The launch profile is a profile too: once the process hosts+ # a second home (multiplex flipped), its worker must name its own home or the fail-closed+ # no-target/no-scope path raises UnscopedSecretError (#115427).env = _prepend_tool_paths(served_profile_child_env(target_home=profile_home or (_hermes_home if is_multiplex_active() else None),inherit_credentials=True))