Skip to content

Codex process fails with SIGKILL then ENOENT after bundled codex binary is removed #100

Description

@jinsley8

What happened

Running deepsec process with the Codex backend fails after the bundled Codex executable was killed and then could no longer be spawned. MacOS shows a warning that codex was blocked because it contains malware.

The process first logged Codex Exec exited with signal SIGKILL, then retried and logged spawn .../codex ENOENT. macOS also showed a malware warning for codex, after which the executable appeared to be missing.

Reproduction

cd .deepsec

pnpm deepsec scan
pnpm deepsec process --project-id <project-id> --agent codex --model gpt-5.5

Expected vs actual

Expected: deepsec process should either run the Codex backend successfully or fail with clear guidance that the local Codex executable was killed/removed by the OS.
Actual: deepsec process starts batches, then the Codex backend exits with SIGKILL. On retry, the Codex executable path fails with ENOENT, and batches fail after 3 attempts.

Environment

  • deepsec version (pnpm deepsec --version): 2.1.2
  • Node version (node --version): 22.22.3
  • OS: macOS, Apple Silicon
  • Agent backend (claude-agent-sdk / codex): codex
  • Model: gpt-5.5

Logs

Processing project <project-id>
  Agent: codex (gpt-5.5)
  Root: /path/to/repo

Batch 1/230: Processing batch 1/230 (5 files, 1 in flight)
Batch 2/230: Processing batch 2/230 (2 files, 2 in flight)
Batch 3/230: Processing batch 3/230 (4 files, 3 in flight)
Batch 4/230: Processing batch 4/230 (3 files, 4 in flight)
Batch 5/230: Processing batch 5/230 (5 files, 5 in flight)
Batch 6/230: Processing batch 6/230 (5 files, 6 in flight)
Batch 7/230: Processing batch 7/230 (5 files, 7 in flight)
Batch 8/230: Processing batch 8/230 (5 files, 8 in flight)
Batch 9/230: Processing batch 9/230 (5 files, 9 in flight)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 2 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 4 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 3 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
  > Investigating 5 file(s) with Codex SDK (gpt-5.5, effort=xhigh)
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Codex SDK error: Codex Exec exited with signal SIGKILL:
    Retrying batch after transient error (attempt 2/3): Codex Exec exited with signal SIGKILL:
    Retrying batch after transient error (attempt 2/3): Codex Exec exited with signal SIGKILL:
    Codex SDK error: spawn /path/to/repo/.deepsec/node_modules/.pnpm/@openai+codex@0.125.0-darwin-arm64/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex/codex ENOENT
    Retrying batch after transient error (attempt 2/3): Codex Exec exited with signal SIGKILL:
    Codex SDK error: spawn /path/to/repo/.deepsec/node_modules/.pnpm/@openai+codex@0.125.0-darwin-arm64/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex/codex ENOENT
    Retrying batch after transient error (attempt 3/3): spawn /path/to/repo/.deepsec/node_modules/.pnpm/@openai+codex@0.125.0-darwin-arm64/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex/codex ENOENT
    Codex SDK error: spawn /path/to/repo/.deepsec/node_modules/.pnpm/@openai+codex@0.125.0-darwin-arm64/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex/codex ENOENT
  Batch 1/230 failed: Codex SDK produced no result after 3 attempt(s). Last error: spawn /path/to/repo/.deepsec/node_modules/.pnpm/@openai+codex@0.125.0-darwin-arm64/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex/codex ENOENT. (8 in flight, 1/230 done)

Additional context: macOS also showed a system dialog saying "codex" was not opened because it contains malware, and the binary appeared to be missing afterward.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions