{"record":{"id":"c91c115723551b56","repo":"NousResearch/hermes-agent","slug":"ssh-remote-mode-is-selected-but-no-host-is-configu","errorCode":null,"errorMessage":"SSH remote mode is selected but no host is configured.","messagePattern":"SSH remote mode is selected but no host is configured\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/electron/main.ts","lineNumber":7581,"sourceCode":"  const rawEnvToken = process.env.HERMES_DESKTOP_REMOTE_TOKEN\n\n  if (rawEnvUrl) {\n    if (!rawEnvToken) {\n      throw new Error(\n        'HERMES_DESKTOP_REMOTE_URL is set but HERMES_DESKTOP_REMOTE_TOKEN is not. ' +\n          'Both must be provided to connect to a remote Hermes backend.'\n      )\n    }\n\n    return buildRemoteConnection(rawEnvUrl, 'token', rawEnvToken, 'env')\n  }\n\n  // 3. Global remote.\n  if (config.mode === 'ssh') {\n    const ssh = normalizeSshConfig({ mode: 'ssh', ...(config.remote || {}) })\n\n    if (!ssh) {\n      throw new Error('SSH remote mode is selected but no host is configured.')\n    }\n\n    const reuseToken = decryptDesktopSecret(config.remote?.token)\n\n    return bootstrapSshConnection(null, ssh, reuseToken, 'settings')\n  }\n\n  // Cloud resolves through the existing URL/OAuth path.\n  if (!modeIsRemoteLike(config.mode)) {\n    return null\n  }\n\n  const authMode = normAuthMode(config.remote?.authMode)\n  const token = authMode === 'oauth' ? null : decryptDesktopSecret(config.remote?.token)\n\n  return buildRemoteConnection(\n    config.remote?.url,\n    authMode,","sourceCodeStart":7563,"sourceCodeEnd":7599,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/electron/main.ts#L7563-L7599","documentation":"Thrown while resolving the desktop app's backend connection when the saved connection config has mode 'ssh' but normalizeSshConfig() cannot produce a usable SSH config — in practice because no host was set. It is a startup-time configuration validation error from the Electron main process connection resolver, not a network failure. The app refuses to guess a host, so boot stops until the SSH settings are completed or the mode is changed.","triggerScenarios":"Desktop connection settings (or the underlying config file) specify mode: 'ssh' with an empty/missing remote.host, or remote is absent entirely; the resolver reaches the 'if (config.mode === \\'ssh\\')' branch and normalizeSshConfig({mode:'ssh', ...config.remote}) returns null.","commonSituations":"User switches the connection mode dropdown to SSH in settings but saves before entering a host; a config migration or hand-edited config file drops the remote block; a profile reset leaves mode='ssh' with stale empty remote settings.","solutions":["Open the desktop app's connection settings and enter the SSH host (and user/port if needed) for the SSH remote, then reconnect","If SSH was never intended, switch the connection mode back to 'local' or 'remote URL' and save","Inspect the saved desktop connection config for the profile and fix the mode/remote.host mismatch by hand","Verify normalizeSshConfig's required fields (host) against what the settings UI persists before filing a bug"],"exampleFix":"// before (saved config)\n{ \"mode\": \"ssh\", \"remote\": { \"user\": \"me\" } }\n\n// after\n{ \"mode\": \"ssh\", \"remote\": { \"host\": \"box.example.com\", \"user\": \"me\", \"port\": 22 } }","handlingStrategy":"validation","validationCode":"// Before starting SSH connection resolution\nconst cfg = readDesktopConnectionConfig()\nif (cfg.mode === 'ssh' && !(cfg.remote?.host ?? '').trim()) {\n  throw new Error('Complete SSH settings (host) before connecting in SSH mode')\n}","typeGuard":"function hasUsableSshRemote(cfg: { mode?: string; remote?: { host?: string } | null }): boolean {\n  return cfg.mode === 'ssh' && typeof cfg.remote?.host === 'string' && cfg.remote.host.trim().length > 0\n}","tryCatchPattern":"catch (e) { if (e instanceof Error && e.message.includes('SSH remote mode')) { promptUserForSshHost() } else { throw e } }","preventionTips":["Disable the connect/save action in the settings UI until SSH host is non-empty when mode is ssh","Never hand-edit mode to 'ssh' without also writing remote.host","Show the effective SSH config summary before connecting so an empty host is visible"],"tags":["ssh","configuration","desktop","startup","validation"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}