mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-24 22:55:57 +03:00
[GH-ISSUE #204] kiro-acp backend: orphaned processes, garbled TUI, missing output #77
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsamuel1 on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/mikeyobrien/ralph-orchestrator/issues/204
Summary
Multiple issues when using the
kiro-acpbackend, particularly in subprocess TUI mode (the default).Issues
1. Orphaned kiro-acp processes
After ralph exits (normal completion or Ctrl+C),
kiro-cli acpand its MCP subprocess trees remain running as orphans (PPID=1). Repeated runs accumulate dozens of zombie process trees.MCP subprocesses are spawned in separate process groups, so they escape standard process group signals during cleanup.
No graceful ACP shutdown is attempted — the session is never cancelled, so kiro-cli has no opportunity to clean up its MCP subprocesses.
2. Garbled TUI display
Two separate causes:
a) Subprocess stderr bleeds into the TUI. The child process (
ralph run --rpc) logs to stderr, which is inherited by the parent TUI process. Log lines render directly on the terminal, overlapping the ratatui alternate screen layout.b) Fragmented markdown rendering. Text deltas from the RPC event stream are individually parsed through termimad markdown rendering and appended as separate line groups. Markdown that spans multiple delta chunks (headings, lists, code blocks) renders incorrectly — broken formatting, duplicate elements, garbled output.
3. No content displayed in TUI with kiro-acp backend
The TUI content pane stays completely empty even though kiro-acp is actively working. The ACP executor does not emit JSON-RPC events to stdout when running in
--rpcmode — it falls through to a console text handler instead. The parent TUI expects JSON lines and silently discards everything.4. Tool call display issues
⚙ [ls]with no path) because ACP uses lowercase tool names (read,shell,ls,glob) that don't match the existing PascalCase mappings (Read,Bash,Glob).{"items":[{"Json":{"exit_status":"exit status: 0","stdout":"..."}}]}) instead of the extracted meaningful content.@jsamuel1 commented on GitHub (Feb 26, 2026):
These issues are a result of the parallel TUI subprocess refactor (#200) landing alongside the kiro-acp backend (#199) — the two features were developed in parallel and the integration points were missed. Fixes are in progress and will be pushed shortly.