迁移路径: /run/media/airlongdian/EasyU/AirCoding -> /home/airlongdian/DataDevices/AirWorkSpace/AirCoding Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
956 B
Executable File
956 B
Executable File
ADR-0005: Use Independent Worker Processes And NDJSON IPC
- Status: Accepted
- Date: 2026-05-27
Context
A single agent process doing all work would cause context explosion, reduce responsiveness, and make parallel execution fragile. AirCoding needs workers that can be monitored, retried, cancelled, and recovered independently.
Decision
Run Executor, Reviewer, Debugger, Compactor, and ExperienceMiner as independent Bun child processes. Use NDJSON over stdio for IPC.
IPC messages use:
kind: event
kind: control
kind: log
The Scheduler owns process lifecycle, heartbeat monitoring, timeout handling, and WorkerResult collection.
Consequences
- Main Agent remains responsive.
- Workers have bounded task context.
- Scheduler can detect lost workers through heartbeat/process state.
- stdout is reserved for protocol; stderr is crash/fatal fallback.
- Worker loops may be role-specific rather than one generic shared loop.