Skip to content

Headless sidecar exits but parent shell process remains running indefinitely #15

@ellisjr

Description

@ellisjr

Description

When running sidecar start --no-ui from a parent process (e.g., Claude Code's Bash tool), the sidecar CLI process completes (summary output emitted, session marked complete or error in sidecar list) but the parent shell process never terminates.

Steps to Reproduce

  1. Launch sidecar headless from a background shell:
    sidecar start --model gemini --agent Plan --no-ui --timeout 20 --prompt "Review this file: some-file.md"
  2. Wait for the sidecar session to complete (visible in sidecar list --status complete)
  3. Check the parent shell process — it's still running

Expected Behavior

Parent shell process exits when sidecar CLI returns.

Actual Behavior

Parent shell process stays alive indefinitely. In our test, 10 out of 10 background sidecar launches became zombies, requiring manual kill/TaskStop.

Impact

When launching multiple sidecars in parallel (the documented multi-LLM pattern), zombie processes accumulate and confuse the user into thinking tasks are still running.

Environment

  • macOS Darwin 23.5.0
  • sidecar installed via npm install -g claude-sidecar
  • Launched from Claude Code background bash tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions