{"record":{"id":"8a565dae6a4252b1","repo":"NousResearch/hermes-agent","slug":"remote-connection-is-not-ready-yet-try-again-in-a","errorCode":null,"errorMessage":"Remote connection is not ready yet. Try again in a moment.","messagePattern":"Remote connection is not ready yet\\. Try again in a moment\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/electron/connection-apply.ts","lineNumber":51,"sourceCode":"  }\n\n  commit()\n\n  return true\n}\n\nasync function resolveTerminalConnection(getTarget, ensureBackend) {\n  let target = getTarget()\n\n  if (target !== 'pending') {\n    return target\n  }\n\n  await ensureBackend()\n  target = getTarget()\n\n  if (target === 'pending') {\n    throw new Error('Remote connection is not ready yet. Try again in a moment.')\n  }\n\n  return target\n}\n\nexport { applyConnectionChange, commitConnectionFailure, resolveTerminalConnection }\n","sourceCodeStart":33,"sourceCodeEnd":58,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/electron/connection-apply.ts#L33-L58","documentation":"ValueError from _validate_workdir (cron/jobs.py:1425): the workdir resolved to an absolute path, but that path does not exist on the machine where the job store lives. Validation is eager — the failure surfaces at create/update time, not at fire time, so a scheduled job never silently runs in the wrong directory.","triggerScenarios":"create_job/update_job with workdir pointing at a deleted directory, a path that only exists on another machine, or a typo. Note the path is resolve()d first, so symlink targets are also checked for existence.","commonSituations":"Job created on one host whose home layout differs from the gateway host; the project directory was moved or removed after job creation and the job is then edited; remote/SSH backends where the path exists client-side only.","solutions":["Verify the path on the host that runs the cron scheduler (the gateway/backend machine, not necessarily your shell).","Fix typos or recreate the directory: mkdir -p /abs/path.","If the project moved, update the job with the new absolute workdir.","Pass workdir=None to run the job without a pinned directory if the cwd doesn't matter."],"exampleFix":"# before\nupdate_job(\"abc123\", {\"workdir\": \"/home/me/proj\"})  # dir was renamed\n\n# after\nupdate_job(\"abc123\", {\"workdir\": \"/home/me/projects/proj\"})","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef existing_dir(w: str) -> str:\n    p = Path(w).expanduser().resolve()\n    if not p.exists():\n        raise FileNotFoundError(f\"workdir missing on THIS host: {p}\")\n    return str(p)\n\nworkdir = existing_dir(\"/home/me/proj\")  # fails fast with a clear message","typeGuard":null,"tryCatchPattern":"try:\n    create_job(prompt=p, schedule=s, workdir=w)\nexcept ValueError as e:\n    if \"does not exist\" in str(e):\n        Path(w).mkdir(parents=True, exist_ok=True)  # if creation is intended\n        create_job(prompt=p, schedule=s, workdir=w)","preventionTips":["Validate the path on the machine that runs the gateway/scheduler, not your laptop.","After moving a project directory, update every cron job that pins its old workdir."],"tags":["cron","workdir","paths","validation"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}