Metadata
| Status | done |
|---|---|
| Assigned | agent-935 |
| Model | pi:openai-codex:gpt-5.6-sol |
| Created | 2026-07-29T22:11:05.984287526+00:00 |
| Started | 2026-07-29T22:11:13.793027603+00:00 |
| Completed | 2026-07-30T00:19:22.478948380+00:00 |
| Tags | tui, chat, pi, ipc, regression |
| Tokens | 71675695 in / 88585 out |
Description
External production report from a Lustre-backed HPC graph using WorksGood 0.1.0+b27e34a831e3 and a valid Pi profile (worker/chat pi:openai-codex:gpt-5.6-sol high; agency/eval pi:openai-codex:gpt-5.6-luna low): TUI New chat displayed Error: Service IPC response timed out after 2s; the daemon is alive but unresponsive, while .chat-1 was already visible as in-progress turn 0 and the daemon logged Coordinator-1: persistent TUI tmux pane is live. Immediately afterward the daemon logged Error handling connection: Broken pipe (os error 32). Concurrent coordinator ticks repeatedly attempted a historical route-less .flip-implement-true-resilient, producing WG-EXEC-AGENCY-ROUTE-UNSELECTED, and some ticks exceeded the client timeout. This proves a post-commit response-loss/IPC-starvation failure, not an invalid Pi model definition: chat creation and the vendor pane succeeded, the client timed out, then the daemon replied to a closed socket.
Reproduce credential-free with a fake Pi and deterministic fault injection or coordinator delay exceeding the current 2s IPC response budget. Exercise the real TUI New chat path (PTY where appropriate), service IPC path, graph mutation, persistent chat runtime/tmux ownership, and response-loss boundary. Fix the architecture rather than merely inflating a timeout. A slow coordinator/eval/registry/graph tick must not starve chat IPC. A chat-create operation must have idempotent/reconcilable identity: if the task/runtime committed before the response was lost, the TUI must discover/select that exact chat and must not report a false creation failure or create a duplicate on retry. If mutation did not commit, it may fail clearly with no chat/runtime residue. Late replies to disconnected clients should be handled as expected cancellation evidence rather than noisy corruption. Existing live tmux ownership must never trigger a competing handler.
Also fix the attended-Pi UX boundary implicated by the report. TUI New chat must offer/use an attended bare-Pi launch when the user did not explicitly pin a per-chat model: invoke Pi without a --model override so Pi owns login and model choice (including its own model picker), while retaining the repo profile only as the unattended worker/agency service contract. Do not weaken fail-closed explicit routes/reasoning for unattended workers, evaluation, FLIP, or service startup. An explicit per-chat pi:<provider>:<model> must remain exact and continue to work. Persist/observe the actual chat session model when Pi reports it, without silently rewriting project worker/agency routes.
Regression requirements: simulate service work longer than 2s; assert New chat succeeds/reconciles exactly one .chat-N; assert it becomes selectable/attachable; assert no duplicate task, tmux pane, handler, or session is created; assert a late response/BrokenPipe cannot turn success into UI failure; assert bare attended Pi argv omits model while explicit per-chat model argv includes the exact provider/model; assert stale route-less eval work cannot block chat IPC; assert service restart preserves the chat and does not spawn beside a live tmux owner. Preserve failure evidence and use isolated HOME/WG graph with no credentials. Inspect existing chat IPC, TUI new-chat, terminal-host, and docs/bugs/tui-pi-chat-launch-enoent.md regressions before changing behavior.
Validation
- Run the new real TUI/service/fake-Pi smoke at least three consecutive times.
- Run existing TUI Pi chat launch/ENOENT, chat create, persistent tmux ownership, service IPC, and restart smokes identified from the manifest.
- Run focused Rust tests for every touched module.
- Run cargo fmt, cargo fmt --check, cargo clippy, and cargo test for affected crates/modules.
- Validate both inherited bare-Pi chat and explicit per-chat Pi model cases from a freshly built candidate binary, never a stale PATH installation.
- Do not claim completion until the candidate is merged and the accepted binary is installed.
Depends on
- (none)
Required by
- (none)
Log
- 2026-07-29T22:11:05.953919919+00:00 Task paused
- 2026-07-29T22:11:12.740817095+00:00 Task published
- 2026-07-29T22:11:14.017795145+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-07-29T22:11:27.566531328+00:00 Starting investigation: inspecting prior WIP, chat IPC/TUI/terminal-host regressions, then implementing directly unless file scope warrants fanout.
- 2026-07-29T23:50:56.023661838+00:00 Implemented dedicated attended-chat IPC lane, durable idempotent create receipts + timeout reconciliation, cancellation-safe late replies, atomic graph insertion, bare attended Pi/default and exact explicit routes. Fresh candidate smoke passed 3 consecutive times; hot-upgrade/ENOENT, mixed IPC, restart, and tmux ownership smokes pass; focused Rust tests, fmt/check, clippy, build, and cargo install pass. Full cargo test remains red only on 26 pre-existing stale Pi-only/attempt-policy/render tests (3816 passed); parallel run also exposed pre-existing global-state profile flake.
- 2026-07-30T00:17:09.425611276+00:00 Urgent live-input extension resolved in the same candidate: embedded tmux attach now unsets the nested-session guard while pinning the exact inherited outer socket (-S), so the TUI retains a live input-forwarding PtyPane. Context row now advertises Ctrl+O in PTY focus and command keys/? Help after escape; real TUI smoke proves exact Fake-Pi stdin before/after Ctrl+O+Help. Added monotonic locked per-chat route generations so stale daemon snapshots cannot revert Pi model observations. Final extended smoke passed 3 consecutive times; existing PTY, keymap, hot-upgrade/ENOENT, mixed IPC, stateful restart, and tmux ownership smokes pass. Focused IPC/launcher/PTY/render/route-generation/writeback tests, fmt/check, clippy, build, and final cargo install pass.
- 2026-07-30T00:19:22.478951671+00:00 Task marked as done