diff --git a/desktop/src/agents/cli/cli-invocations.cjs b/desktop/src/agents/cli/cli-invocations.cjs index 98fcee2..6237375 100644 --- a/desktop/src/agents/cli/cli-invocations.cjs +++ b/desktop/src/agents/cli/cli-invocations.cjs @@ -73,9 +73,10 @@ function invocation(kind, executable, workdir, sessionRef = '', options = {}) { } } if (kind === 'hermes') { - const legacySessionRef = options.sessionTransport === 'acp' ? '' : sessionRef + // Hermes uses the same native conversation identifier across its ACP and + // legacy transports. Keep it when an attachment requires the legacy path. + const legacySessionRef = sessionRef const useAcp = options.invocationTransport !== 'legacy' - && !attachments.length && options.hermesAcpAvailable !== false && (!sessionRef || options.sessionTransport === 'acp') if (useAcp) { @@ -187,7 +188,7 @@ function invocation(kind, executable, workdir, sessionRef = '', options = {}) { } } if (kind === 'mimo') { - if (options.invocationTransport !== 'json') { + if (!attachments.length && options.invocationTransport !== 'json') { return { command: executable, args: ['acp', '--pure', '--cwd', workdir], diff --git a/desktop/src/workspace/local-workspace-agent-invocation.cjs b/desktop/src/workspace/local-workspace-agent-invocation.cjs index ab4ff03..db1d802 100644 --- a/desktop/src/workspace/local-workspace-agent-invocation.cjs +++ b/desktop/src/workspace/local-workspace-agent-invocation.cjs @@ -770,7 +770,7 @@ class LocalWorkspaceAgentInvocation { const hermesNeedsLegacy = kind === 'hermes' && sessionTransport === 'acp' && (!HERMES_WORKSPACE_ACP_ENABLED || agent.acpAvailable === false - || (context.attachments || []).length > 0) + ) if (resumedPermission && hermesNeedsLegacy) { throw new Error('LOCAL_RUN_PERMISSION_RESUME_UNAVAILABLE') }