---
id: 11380
title: 'Orchestrator daemon child process failures (stdio, mlx arg, chroma gap)'
state: CLOSED
labels:
  - bug
  - ai
assignees:
  - neo-gemini-pro
createdAt: '2026-05-14T23:46:26Z'
updatedAt: '2026-06-07T17:11:49Z'
githubUrl: 'https://github.com/neomjs/neo/issues/11380'
author: neo-gemini-pro
commentsCount: 0
parentIssue: null
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-05-15T00:24:00Z'
---
# Orchestrator daemon child process failures (stdio, mlx arg, chroma gap)

**Context**
During the Antigravity boot sequence and orchestrator daemon startup, several child processes failed with `exit code 1` or went into restart loops. This instability was detected in `ai:orchestrator` logs.

**The Problem**
1. `ProcessSupervisorService` spawns child processes with `stdio: 'ignore'`. This hides `stderr`, making child process failures completely opaque and unrecoverable for post-mortem analysis.
2. The `mlx` task definition uses `--model gemma4:31b` which is Ollama-format, but `mlx_lm.server` expects a valid HuggingFace repository ID or local path. This causes the mlx inference server to crash and restart every ~15s.
3. The Memory Core Chroma instance (port 8001) is not managed by the orchestrator daemon, meaning if it's down, dependent tasks (like `kbSync`, `backup`, `summary`) fail on boot in a cascading chain until manually started.

**The Architectural Reality**
- `ai/daemons/services/ProcessSupervisorService.mjs` line 207 spawns the child with `{stdio: 'ignore'}`.
- `ai/daemons/TaskDefinitions.mjs` line 54 defines the `mlx` task with the incorrect model argument.

**The Fix**
- Update `ProcessSupervisorService.mjs` to pipe or inherit `stdio` (e.g., `['ignore', 'pipe', 'pipe']`) and explicitly handle logging child `stderr` to `writeLog_`.
- Correct the `mlx` task model argument in `TaskDefinitions.mjs` to a valid HuggingFace repo ID (e.g., `google/gemma-2-27b-it` or appropriate for the local environment).
- Add Memory Core Chroma to the orchestrator `TaskDefinitions` so it gets managed alongside KB Chroma.

**Acceptance Criteria**
- [ ] `ProcessSupervisorService` captures and logs child process `stderr` on failure.
- [ ] `mlx` inference server starts successfully without looping.
- [ ] Memory Core Chroma is automatically managed by the orchestrator.

**Out of Scope**
- Major refactoring of the ProcessSupervisor logic beyond fixing the logging visibility.

**Origin Session ID**
Origin Session ID: 188acb85-b41e-435c-94ee-0cc9944d4c97

## Timeline

- 2026-05-14T23:46:27Z @neo-gemini-pro added the `bug` label
- 2026-05-14T23:46:27Z @neo-gemini-pro added the `ai` label
- 2026-05-14T23:50:04Z @neo-gemini-pro assigned to @neo-gemini-pro
- 2026-05-14T23:51:06Z @neo-gemini-pro cross-referenced by PR #11382
- 2026-05-14T23:54:54Z @neo-gemini-pro cross-referenced by #11383
- 2026-05-14T23:54:57Z @neo-gemini-pro cross-referenced by #11384
- 2026-05-15T00:24:00Z @tobiu referenced in commit `94cd337` - "fix(ai): orchestrator daemon child process failures (#11380) (#11382)

* fix(ai): orchestrator daemon child process failures (#11380)

* fix(ai): resolve PR #11382 review feedback (Cycle 1)

- Add memoryCoreChroma to continuousTasks and test specs
- Swap mlx model to mlx-community/gemma-2-27b-it-4bit
- Fix trailing whitespace

---------

Co-authored-by: neo-gemini-3-1-pro <neo-gemini-3-1-pro@users.noreply.github.com>"
- 2026-05-15T00:24:00Z @tobiu closed this issue
- 2026-05-15T03:12:48Z @neo-opus-ada cross-referenced by #11393
- 2026-05-15T03:26:44Z @neo-opus-ada cross-referenced by #11395
- 2026-05-16T15:37:06Z @neo-gpt cross-referenced by #11471
- 2026-05-16T16:03:14Z @neo-opus-ada cross-referenced by PR #11473
- 2026-05-16T21:02:39Z @neo-gpt cross-referenced by #11496
- 2026-05-17T06:56:49Z @neo-gpt cross-referenced by #11524

