Summary
ACP mode: "run" sessions spawned via sessions_spawn without thread binding have no completion delivery mechanism back to the parent/requester session. Subagent mode: "run" sessions auto-announce completion to the parent, but equivalent ACP sessions silently complete with no notification.
Steps to Reproduce
- From a main or agent session (e.g. Telegram direct chat, no thread/topic), spawn an ACP run:
{
"runtime": "acp",
"agentId": "claude",
"mode": "run",
"task": "Run date and report the time",
"runTimeoutSeconds": 60
}
- The task executes successfully — the session JSONL shows correct assistant output.
- The parent session never receives a completion event or auto-announce.
Observed Behavior
- Subagent
mode: "run": Completion auto-announces to parent session ✅
- ACP
mode: "run" without thread binding: Task completes, result written to session JSONL, but parent session receives nothing ❌
- ACP
mode: "run" with streamTo: "parent": Only a start system event is delivered; no completion or end event arrives ❌
Timeline from gateway logs (streamTo: "parent" case)
13:57:25 — stream log: kind=system_event, text="Started claude session..."
13:57:45 — session JSONL: assistant responds with correct output, stopReason=stop
(no further stream log entries, no completion event)
Expected Behavior
ACP mode: "run" should deliver completion results back to the requester session, consistent with subagent mode: "run" behavior. At minimum when streamTo: "parent" is set, a completion/end system event should be emitted.
Context
- ACP delivery appears designed primarily for thread-bound scenarios (Discord threads / Telegram topics). Non-thread-bound spawns from direct sessions have no delivery target.
- Startup identity reconcile also fails consistently (
checked=3 resolved=0 failed=3) because it runs ~80ms after acpx backend registered but ~1s before backend ready — possibly related but not the direct cause of this delivery gap.
- Gateway version: 2026.3.11 (updated today)
- acpx version: 0.1.16
- ACP backend: claude (Claude Code CLI)
Workarounds
- Poll the ACP session JSONL manually after spawning
- Use thread-bound ACP sessions (requires forum-mode Telegram or Discord threads)
- Use native subagent runtime instead of ACP when auto-announce is needed
Suggestion
- For
mode: "run" without thread binding, deliver completion to the requester session the same way subagents do (auto-announce).
- For
streamTo: "parent", ensure a completion/end event is written to the stream log when the ACP run finishes.
- Consider adding a startup reconcile retry or gate on backend
ready (separate issue if preferred).
Summary
ACP
mode: "run"sessions spawned viasessions_spawnwithout thread binding have no completion delivery mechanism back to the parent/requester session. Subagentmode: "run"sessions auto-announce completion to the parent, but equivalent ACP sessions silently complete with no notification.Steps to Reproduce
{ "runtime": "acp", "agentId": "claude", "mode": "run", "task": "Run date and report the time", "runTimeoutSeconds": 60 }Observed Behavior
mode: "run": Completion auto-announces to parent session ✅mode: "run"without thread binding: Task completes, result written to session JSONL, but parent session receives nothing ❌mode: "run"withstreamTo: "parent": Only astartsystem event is delivered; nocompletionorendevent arrives ❌Timeline from gateway logs (
streamTo: "parent"case)Expected Behavior
ACP
mode: "run"should deliver completion results back to the requester session, consistent with subagentmode: "run"behavior. At minimum whenstreamTo: "parent"is set, a completion/end system event should be emitted.Context
checked=3 resolved=0 failed=3) because it runs ~80ms after acpx backendregisteredbut ~1s before backendready— possibly related but not the direct cause of this delivery gap.Workarounds
Suggestion
mode: "run"without thread binding, deliver completion to the requester session the same way subagents do (auto-announce).streamTo: "parent", ensure a completion/end event is written to the stream log when the ACP run finishes.ready(separate issue if preferred).