Files
patterm/TODO.md
Harry Bayliss 7b5a22618f Dispatch MCP requests concurrently per connection
handleConn processed requests serially, so a slow tool (e.g.
wait_for_pattern with a 300s timeout) monopolized the single per-agent
MCP connection and every queued call timed out behind it. Handle each
request in its own goroutine, serialize responses through a per-conn
write mutex (full response written atomically, partial writes handled),
copy the request line before handing it off (bufio reuses its buffer),
and wait on a WaitGroup before closing the conn so in-flight handlers
finish cleanly. Greeting stays sequential; notifications still get no
response.

Resolves the [MCP TIMEOUT] TODO item.
2026-05-25 12:39:31 +01:00

12 KiB
Raw Blame History

  • Codex idle detection seems to trigger too soon, see below [CODEX IDLE]
  • When opening a codex sub agent, the message gets input to the field, but the message is never submitted.
    • This appears to be inconsistent. Sometimes it works, sometimes it doesn't. Might be because of popups on codex sub agents?
    • Question: when it fails, is a Codex startup popup visible (trust/workspace, auth/model selection, permissions), or is the normal composer focused?
    • Question: if the message is sitting in the composer, does pressing Enter once manually submit it, or does something else need to be dismissed first?
    • Question: does this happen with short one-line prompts as well as long/multiline sub-agent instructions?

[CODEX IDLE]

Crunched for 1m 57s │ │ Agent Tree codex-implement is idle. Read your own pane for the [sub-agent:codex-implement] reply. │ ───────────────────────── │ ▎ ○ claude ⏱ 59m Called patterm, searched memories (ctrl+o to expand) │ ● codex-implement-2 │ ● Bash(git -C /home/harry/Dev/popdog/.worktrees/harvester-issue-136-kick-segment-repair log -3 --oneline && git -C /home/harry/Dev/popdog/.worktrees/harvester-issue-13…) │ Issue #136 plan drafted ⎿  9604013 fix(youtube): finalize segments on ghost-cleanup path (#120) │ in scratchpad; 6da9125 fix(kick): bump KickCategoryAuditor MaxPerCycle to 500 (#135) │ verification sub-agent db149e6 fix(twitch): enqueue stream segment repairs (#134) │ ⎿  Allowed by auto mode classifier │ Scratchpads │ ───────────────────────── ● No commits in the worktree. Let me check the codex-implement pane. │ 0027-review │ 569-state Called patterm (ctrl+o to expand) │ db-infra-options │ db-perf-batching-plan ● Codex exited mid-update prompting "Please restart Codex." Let me spawn a fresh one — the update is now installed. │ e2e-canonicalisation-ru… │ issue-136-kick-segment-… Called patterm 3 times (ctrl+o to expand) │ pg-stat-optimization-de… │ pg-stat-statements-find… ● Fresh codex-implement-2 spawned. Waiting. │ pr-569-stream-category-… │ stream-category-cutover… ✻ Sautéed for 55s │ │ codex-implement-2 is idle. Read your own pane for the [sub-agent:codex-implement-2] reply. │ │ ● Bash(git log -3 --oneline && echo "---STATUS---" && git status -s && echo "---BRANCH---" && git branch -vv && echo "---REMOTE---" && git ls-remote origin fix/kick-se…) │ ⎿  9604013 fix(youtube): finalize segments on ghost-cleanup path (#120) │ 6da9125 fix(kick): bump KickCategoryAuditor MaxPerCycle to 500 (#135) │ db149e6 fix(twitch): enqueue stream segment repairs (#134) │ … +44 lines (ctrl+o to expand) │ ⎿  Allowed by auto mode classifier │ ⎿  Interrupted · What should Claude do instead? │ │ it's still running. │ │ ● Got it — re-scheduling the wait. │ │ Called patterm (ctrl+o to expand) │ │ ● Waiting for codex-implement-2 to finish. │ │ ✻ Sautéed for 12s │ │ 7 tasks (5 done, 1 in progress, 1 open) │ ◼ Spawn codex sub-agent to implement plan │ ◻ Open PR for issue 136 │ ✔ Read GitHub issue 136 and gather reference code │ ✔ Set up worktree for issue 136 implementation │ ✔ Draft implementation plan │ … +2 completed │