coleam00/Archon · error

Failed to inspect volume '${volume}': ${detail}

Error message

Failed to inspect volume '${volume}': ${detail}

What it means

volumeExists() runs `docker volume inspect <volume>`; 'no such volume' is normalized to false, but any other failure is thrown wrapped in this message because the code cannot distinguish missing from broken.

Source

Thrown at packages/isolation/src/backends/container.ts:515

      const detail = extractDockerError(err);
      if (/no such (object|container)/i.test(detail)) return 'missing';
      throw new Error(`Failed to inspect container '${nameOrId}': ${detail}`);
    }
  }

  private async getContainerId(nameOrId: string): Promise<string> {
    const { stdout } = await this.docker(['inspect', '-f', '{{.Id}}', nameOrId]);
    return stdout.trim();
  }

  private async volumeExists(volume: string): Promise<boolean> {
    try {
      await this.docker(['volume', 'inspect', volume]);
      return true;
    } catch (err) {
      const detail = extractDockerError(err);
      if (/no such volume/i.test(detail)) return false;
      throw new Error(`Failed to inspect volume '${volume}': ${detail}`);
    }
  }

  /**
   * Run a `docker rm`/`volume rm` and swallow ONLY the idempotent not-found case
   * (the resource is already gone). Returns `undefined` on success or not-found,
   * or the error detail string on a genuine failure the caller must surface.
   */
  private async removeIgnoringNotFound(args: string[]): Promise<string | undefined> {
    try {
      await this.docker(args);
      return undefined;
    } catch (err) {
      const detail = extractDockerError(err);
      if (/no such (container|volume)/i.test(detail)) {
        log.debug({ args, detail }, 'isolation.container_destroy_already_gone');
        return undefined;
      }

View on GitHub (pinned to 0773b97458)

Solutions

  1. Run `docker volume inspect <name>` manually to see the raw error
  2. Confirm the daemon is up (`docker info`) and DOCKER_HOST is correct
  3. Fix socket permissions or docker group membership
  4. Retry resume once daemon access is restored
Defensive patterns

Strategy: try-catch

Validate before calling

const { execSync } = require('child_process');
try { execSync('docker info', { stdio: 'ignore' }); } catch { throw new Error('Docker daemon not reachable'); }

Try / catch

try {
  const ok = await backend.volumeExists(vol);
} catch (err) {
  if (String(err).startsWith('Failed to inspect volume')) {
    // not 'false' (missing) — daemon failure; surface to operator
  }
  throw err;
}

Prevention

When it happens

Trigger: `docker volume inspect` fails with a non-'no such volume' error — daemon unreachable, permission denied on the socket, or a malformed volume name.

Common situations: Docker daemon down or restarting during resumeEnv; DOCKER_HOST pointing at an unreachable remote; volume name containing invalid characters; partial daemon startup after host reboot.

Related errors


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