ComposioHQ/composio · error · Error

${command} failed with exitCode=${exitCode ?? 'null'} signal

Error message

${command} failed with exitCode=${exitCode ?? 'null'} signal=${signal ?? 'null'}: ${stderr.trim()}

What it means

Generic helper in the beeper-imessage toolkit that runs a child process and throws when it exits non-zero. The message includes the command, exitCode, signal, and stderr. It is the toolkit-level equivalent of the runtime's command failure (243) and usually wraps tools like sqlite3 or imessage database queries.

Source

Thrown at ts/packages/cli-local-tools/src/toolkits/beeper-imessage.ts:259

  child.stderr.setEncoding('utf8');
  child.stdout.on('data', chunk => {
    stdout += chunk;
  });
  child.stderr.on('data', chunk => {
    stderr += chunk;
  });

  const exitPromise = new Promise<{
    readonly exitCode: number | null;
    readonly signal: string | null;
  }>((resolve, reject) => {
    child.once('error', reject);
    child.once('exit', (exitCode, signal) => resolve({ exitCode, signal }));
  });
  const timeout = setTimeout(() => child.kill('SIGTERM'), timeoutMs);
  const { exitCode, signal } = await exitPromise.finally(() => clearTimeout(timeout));
  if (exitCode !== 0) {
    throw new Error(
      `${command} failed with exitCode=${exitCode ?? 'null'} signal=${signal ?? 'null'}${
        stderr.trim() ? `: ${stderr.trim()}` : ''
      }`
    );
  }
  return { stdout, stderr };
};

const contactLookupScript = `
function normalizePhone(value) {
  return String(value || '').replace(/[^0-9]/g, '');
}
function normalizeIdentifier(value) {
  const text = String(value || '').trim().toLowerCase();
  if (!text) return '';
  if (text.indexOf('@') >= 0) return text;
  return normalizePhone(text) || text;
}

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Check stderr in the message for the exact command failure
  2. Grant Full Disk Access to the terminal/CLI on macOS (System Settings → Privacy & Security)
  3. Ensure required binaries (sqlite3) are on PATH
  4. Simplify the query / narrow the time window if hitting the timeout
Defensive patterns

Strategy: try-catch

Try / catch

try { const { stdout } = await runProcess(cmd, args, ctx); } catch (e) { if (e instanceof Error && e.message.includes('failed with exitCode')) surface(e.message); }

Prevention

When it happens

Trigger: The underlying macOS command (e.g. sqlite3 querying chat.db) failing due to permissions, missing binary, malformed SQL, or the process being SIGTERM'd by the built-in timeout.

Common situations: Terminal app lacks Full Disk Access on macOS so chat.db reads fail; sqlite3 not installed; query timeouts on large thread databases.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/ae2537bf6ce5b548. Report an issue: GitHub.