coleam00/Archon · warning

Warning: could not open a log file — child output will not b

Error message

Warning: could not open a log file — child output will not be captured.

What it means

Warning from the detached path of `archon workflow run` (packages/cli/src/commands/workflow.ts:2226). In `--detach` mode the CLI spawns a child process and tries to open a log file to capture its output; if the log file could not be opened, the child still runs but its stdout/stderr are discarded, so a failure after the startup window leaves no evidence beyond the run row in the database.

Source

Thrown at packages/cli/src/commands/workflow.ts:2226

        detached: true,
        // The handle the launch promised (#2872). Its row already exists, so a caller
        // can query or wait on it without polling for the run to appear.
        runId: detachedRunId,
        workflow: workflow.name,
        branch: pinnedBranch ?? options.branchName ?? null,
        conversationId: childConversationId,
        logPath,
      });
    } else {
      console.log(`Started '${workflow.name}' in the background.`);
      console.log(`Run id: ${detachedRunId}`);
      console.log(`Track it with: archon workflow get ${detachedRunId}`);
      if (logPath) {
        console.log(`Child output: ${logPath}`);
      } else {
        // Log file couldn't be opened — the child runs with its output discarded, so a
        // failure after the startup window leaves no trail beyond the run row itself.
        console.warn('Warning: could not open a log file — child output will not be captured.');
      }
    }
    return;
  }

  console.log(`Running workflow: ${workflowName}`);
  console.log(`Working directory: ${cwd}`);
  console.log('');

  // Create CLI adapter
  const adapter = new CLIAdapter();

  // Generate conversation ID
  const conversationId = options.conversationId ?? generateConversationId();

  // Get or create conversation in database
  let conversation;
  try {

View on GitHub (pinned to 0773b97458)

Solutions

  1. Check permissions on the Archon workspace/log directory and fix ownership or ACLs.
  2. Free disk space or raise the quota if the filesystem is full.
  3. Verify the configured log/workspace path exists and is writable, then re-run with --detach.
  4. Alternatively run without --detach so output streams to your terminal.

Example fix

// before: logs dir not writable
archon workflow run fix --detach
// after
mkdir -p ~/.archon/logs && chmod u+w ~/.archon/logs
archon workflow run fix --detach
Defensive patterns

Strategy: validation

Validate before calling

// Verify the log directory is writable before detaching
import { accessSync, constants } from 'node:fs';
accessSync(logDir, constants.W_OK); // throws early with a clearer error

Prevention

When it happens

Trigger: Running `archon workflow run <wf> --detach` when the log file cannot be created/opened — e.g. unwritable log directory, full disk, permission denied, or invalid log path configuration.

Common situations: Running under a user without write access to the Archon workspace/logs directory; read-only container filesystem; ARCHON workspace path misconfigured; disk quota exhausted.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/0420692cabaaa4e8. Report an issue: GitHub.