ruvnet/ruflo · warning

no log file yet — meta-proxy has never been started in…

Error message

no log file yet — meta-proxy has never been started in --service mode

What it means

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.

Solutions

  1. Start the service once first: `ruflo proxy start --service`, then tail logs
  2. Use `ruflo proxy logs` (non-follow) to confirm whether service mode has ever run on this machine
  3. For foreground runs, read the terminal output — it is deliberately not redirected to the log file

Example fix

# before
ruflo proxy logs -f   # no log file yet
# after
ruflo proxy start --service && ruflo proxy logs -f
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync } from 'node:fs';
import { proxyLogFilePath } from '@claude-flow/cli/.../proxy/paths.js';
if (!existsSync(proxyLogFilePath())) {
  console.error('no service log yet — start once with `ruflo proxy start --service`');
} else {
  watchProxyLog(line => console.log(line));
}

Type guard

const isNoLogFile = (e: unknown): e is Error =>
  e instanceof Error && /no log file yet/.test(e.message);

Try / catch

try {
  watchProxyLog(onLine);
} catch (e) {
  if (isNoLogFile(e)) {
    await startBackground();   // first service boot creates the log
    watchProxyLog(onLine);
  } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/03eae7a39579ea98. Report an issue: GitHub.

Appendix: source

Thrown at v3/@claude-flow/cli/src/proxy/lifecycle.ts:283

  const logPath = proxyLogFilePath();
  if (!fs.existsSync(logPath)) return '';
  const { size } = fs.statSync(logPath);
  const start = Math.max(0, size - maxBytes);
  const fd = fs.openSync(logPath, 'r');
  try {
    const buf = Buffer.alloc(size - start);
    fs.readSync(fd, buf, 0, buf.length, start);
    return buf.toString('utf-8');
  } finally {
    fs.closeSync(fd);
  }
}

/** Streams new log lines as they're appended, starting from the current end of file. */
export function watchProxyLog(onLine: (line: string) => void): fs.FSWatcher {
  const logPath = proxyLogFilePath();
  if (!fs.existsSync(logPath)) {
    throw new Error('no log file yet — meta-proxy has never been started in --service mode');
  }
  let offset = fs.statSync(logPath).size;
  return fs.watch(logPath, () => {
    const { size } = fs.statSync(logPath);
    if (size <= offset) return;
    const fd = fs.openSync(logPath, 'r');
    try {
      const buf = Buffer.alloc(size - offset);
      fs.readSync(fd, buf, 0, buf.length, offset);
      offset = size;
      for (const line of buf.toString('utf-8').split('\n')) {
        if (line.length > 0) onLine(line);
      }
    } finally {
      fs.closeSync(fd);
    }
  });
}

View on GitHub (pinned to fa13ee4ad6)