limited-student-10747
06/19/2026, 12:28 PMlimited-student-10747
06/19/2026, 12:36 PMnutritious-balloon-65098
06/19/2026, 12:37 PMnutritious-balloon-65098
06/19/2026, 12:44 PMcodex-rs/core/src/unified_exec/):
• Uses two tools: exec_command (starts a PTY process) and write_stdin (sends input or polls with empty chars)
• Both accept a yield_time_ms parameter — the LLM explicitly controls how long to wait before getting control back (250ms–30s range)
• The output schema uses session_id presence as the "still running" signal: if session_id is in the response, the process is still running and the LLM calls write_stdin(session_id=X) to check back. When done, only exit_code is present.
• Yields are proactive and time-based — the LLM gets control back after N ms regardless of output activity
OpenHands current behavior has all the machinery but with poor framing:
• timeout=N already returns after N seconds with exit_code=-1 (process keeps running) — this IS the yield mechanism, but it's described as "you'll be asked whether to continue or stop it"
• The "still running" signal is buried in exit_code=-1, which also means errors
• Yields are reactive (fire only after 30s of silence), not proactive
Proposed implementation (three tiers) 1. Tier 1 — Update descriptions/messages: reframe timeout as a "soft yield interval" and TIMEOUT_MESSAGE_TEMPLATE as a positive status update rather than error language
2. Tier 2 — Add still_running: bool to TerminalObservation as an unambiguous signal (direct equivalent of Codex's session_id presence), set in the no-change and hard-timeout handlers
3. Tier 3 — Make timeout proactive (fire after N seconds regardless of output activity) instead of the current reactive no-change trigger — this is the actual behavioral parity with Codex's yield_time_mslimited-student-10747
06/19/2026, 2:18 PMnutritious-balloon-65098
06/19/2026, 2:19 PMnutritious-balloon-65098
06/19/2026, 2:40 PMstraight-dog-12443
06/19/2026, 3:22 PMlimited-student-10747
06/19/2026, 4:12 PMlimited-student-10747
06/19/2026, 4:13 PMnutritious-balloon-65098
06/19/2026, 5:02 PMcalm-artist-7206
06/19/2026, 7:09 PMlimited-student-10747
06/19/2026, 7:31 PM