{"record":{"id":"03eae7a39579ea98","repo":"ruvnet/ruflo","slug":"no-log-file-yet-meta-proxy-has-never-been-starte","errorCode":null,"errorMessage":"no log file yet — meta-proxy has never been started in --service mode","messagePattern":"no log file yet — meta-proxy has never been started in --service mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"v3/@claude-flow/cli/src/proxy/lifecycle.ts","lineNumber":283,"sourceCode":"  const logPath = proxyLogFilePath();\n  if (!fs.existsSync(logPath)) return '';\n  const { size } = fs.statSync(logPath);\n  const start = Math.max(0, size - maxBytes);\n  const fd = fs.openSync(logPath, 'r');\n  try {\n    const buf = Buffer.alloc(size - start);\n    fs.readSync(fd, buf, 0, buf.length, start);\n    return buf.toString('utf-8');\n  } finally {\n    fs.closeSync(fd);\n  }\n}\n\n/** Streams new log lines as they're appended, starting from the current end of file. */\nexport function watchProxyLog(onLine: (line: string) => void): fs.FSWatcher {\n  const logPath = proxyLogFilePath();\n  if (!fs.existsSync(logPath)) {\n    throw new Error('no log file yet — meta-proxy has never been started in --service mode');\n  }\n  let offset = fs.statSync(logPath).size;\n  return fs.watch(logPath, () => {\n    const { size } = fs.statSync(logPath);\n    if (size <= offset) return;\n    const fd = fs.openSync(logPath, 'r');\n    try {\n      const buf = Buffer.alloc(size - offset);\n      fs.readSync(fd, buf, 0, buf.length, offset);\n      offset = size;\n      for (const line of buf.toString('utf-8').split('\\n')) {\n        if (line.length > 0) onLine(line);\n      }\n    } finally {\n      fs.closeSync(fd);\n    }\n  });\n}","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/proxy/lifecycle.ts#L265-L301","documentation":"watchProxyLog() (log streaming / `logs -f`) tails the service-mode log file starting from the current end of file. The log file only exists because startBackground() opens it for append — so if the proxy has never been started in --service mode there is nothing to watch, and this error states exactly that.","triggerScenarios":"Calling watchProxyLog() or `ruflo proxy logs -f` before any `ruflo proxy start --service`; after the log file was deleted (rotation scripts); on a fresh machine right after `ruflo proxy install` but before the first service start.","commonSituations":"Users expecting foreground-mode output in the log file (foreground uses stdio 'inherit', no log file); log-rotation tools removing the file; CI health checks tailing logs before first boot.","solutions":["Start the service once first: `ruflo proxy start --service`, then tail logs","Use `ruflo proxy logs` (non-follow) to confirm whether service mode has ever run on this machine","For foreground runs, read the terminal output — it is deliberately not redirected to the log file"],"exampleFix":"# before\nruflo proxy logs -f   # no log file yet\n# after\nruflo proxy start --service && ruflo proxy logs -f","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nimport { proxyLogFilePath } from '@claude-flow/cli/.../proxy/paths.js';\nif (!existsSync(proxyLogFilePath())) {\n  console.error('no service log yet — start once with `ruflo proxy start --service`');\n} else {\n  watchProxyLog(line => console.log(line));\n}","typeGuard":"const isNoLogFile = (e: unknown): e is Error =>\n  e instanceof Error && /no log file yet/.test(e.message);","tryCatchPattern":"try {\n  watchProxyLog(onLine);\n} catch (e) {\n  if (isNoLogFile(e)) {\n    await startBackground();   // first service boot creates the log\n    watchProxyLog(onLine);\n  } else throw e;\n}","preventionTips":["Sequence tooling: start --service first, then tail logs","Remember foreground mode writes to the terminal, not the log file","Health checks should expect this error during first-boot windows"],"tags":["proxy","logging","service-mode","file-not-found"],"backgroundTag":"log-files-missing","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}