Skip to content

v0.16.2

Choose a tag to compare

@PleasePrompto PleasePrompto released this 29 Apr 05:41
· 74 commits to main since this release

ductor v0.16.2

Patch release for async inter-agent result delivery and Codex error reporting.

TL;DR

  • Async inter-agent responses now route through the parent session — sub-agent results were previously delivered raw to the user instead of being injected back into the calling agent's CLI session. Merged PR #118 by @kdramapulse.
  • Codex turn.failed errors now show the real cause — usage-limit and similar failures no longer get masked by the misleading thread … not found stderr artefact. Reported by @Ilinvic in #117.
  • Cleaner Matrix session-continuation hint — the injected hint sentence had a missing middle clause on Matrix; both transports now share the same prompt builder.

Fixes

Async inter-agent injection (#118)

Merged contributor PR #118 by @kdramapulse.

from_interagent_result() never set envelope.prompt, so bus._process() always skipped injection and delivered the sub-agent text directly to the user instead of resuming the parent session. The adapter now accepts an injection_prompt kwarg; Telegram and Matrix handlers build the full [ASYNC INTER-AGENT RESPONSE …] prompt and pass it in. Includes 10 new regression tests covering idle delivery, lock-contention queueing, raw-deliver fallback, and concurrent multi-task injection.

Internal cleanup on top: extracted build_interagent_injection_prompt() into bus/adapters.py so both transports share one builder, and fixed the Matrix session_hint which previously rendered as "…in session \X`. via `@X `."` (missing middle clause from a copy/paste).

Codex usage-limit errors (#117)

Reported by @Ilinvic.

When the Codex CLI emitted turn.failed (e.g. usage limit reached), ductor showed Detail: … thread <id> not found — a downstream rollout artefact — instead of Codex's actual error message ("You've hit your usage limit. Try again at 6:00 PM.").

Two fixes:

  1. _StreamState now captures the most recent in-stream ResultEvent(is_error=True) message into last_error_message, and _codex_final_result prefers it over stderr. Priority is now last_error_message → accumulated_text → stderr_text → "(no output)". Partial assistant output also now beats stderr noise.
  2. classify_cli_error's _RATE_PATTERNS extended with "usage limit", "upgrade to pro", "hit your" so the friendly localized hint fires for Codex's exact wording, not just 429 / rate limit.

Verification

  • pytest — 3661 passed
  • ruff check .
  • ruff format --check
  • mypy ductor_bot — clean over 238 source files