Skip to content

Wake agents when async bash commands finish - #2053

Closed
sethkarten wants to merge 6 commits into
mainfrom
feat/async-bash-completion-message
Closed

sethkarten wants to merge 6 commits into
mainfrom
feat/async-bash-completion-message

fix(runtime): follow nested asyncio wait ownership

1bb4d43
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check succeeded Sep 6, 2026 in 1m 32s

No issues identified (2 code objects reviewed).

• Reviewed files modified since 1eab8bc; other PR files not modified since then were skipped.
• Merge Base: 5c2750b
• Head: 1bb4d43
• Detection Mode: Precise (Learn more)

Details

✅ File Path U3 Bytes Comments Posted Reason
➖ prime-agent-runtime/test/test_repl.py 1994 Excluded by default ignore patterns
✅ prime-agent-runtime/src/rlm/bash.py 889 0

Billed Total: 10.00KB of diff | $0.50 (This review was charged at our per-review byte minimum of 10.00KB. Learn more here)

Filtered Issues Details

prime-agent-runtime/src/rlm/bash.py
  • line 128: _completion_reaches only follows callback identities in _ASYNCIO_WRAPPER_CALLBACKS, which omits asyncio.as_completed's completion callback. asyncio.as_completed([bash("sleep 1")]) is a supported way to run awaitables and the creating cell can await its yielded coroutine, but the task wrapping the handle is not connected to the cell by any branch here, so _awaited_by_creating_cell stays false and a spurious bash.completed wake-up is sent after the cell already consumed the result. [ Already posted ]