HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
aider: a turn that ended on a command says so rather than saying nothing (#219)
github-actions[bot]9f49a8544a4b
diff --git a/runner/aider_driver.py b/runner/aider_driver.pyindex fa43121e..5be79c32 100644--- a/runner/aider_driver.py+++ b/runner/aider_driver.py@@ -533,10 +533,19 @@ def main() -> int:# more of the model's work is not a failed turn: measured 2026-09-19, a restyled .pptx and an# edited hello.md were reported FAILED for a decode error twelve commands earlier.failed = coder.usage_report is None or gate.error_after_output+ # The result's text is what the gateway stores as the answer, so it is stripped of the+ # edit markup exactly as the text events were; the edits were reported as cards.+ final = strip_edit_blocks(coder.partial_response_content or "")+ if not final and gate.calls and not failed:+ # A response that was commands and nothing else leaves no answer once the blocks are+ # cards: the model's last word was a command, and aider gives it no further turn when+ # that command printed nothing. Measured on the hosted service (an officecli that was+ # not installed ran seven times and the task ended with no text and no file). Said as+ # what happened, not as an answer the model gave.+ final = ("The task ended without a written answer after running commands. The commands "+ "and their output are above.")_emit("result", {- # The result's text is what the gateway stores as the answer, so it is stripped of the- # edit markup exactly as the text events were; the edits were reported as cards.- "final": strip_edit_blocks(coder.partial_response_content or ""),+ "final": final,"ok": not failed,"edited": sorted(coder.aider_edited_files or []),"shell_calls": gate.calls,diff --git a/runner/tests/test_aider_driver.py b/runner/tests/test_aider_driver.pyindex 54e9cff1..7f53da71 100644--- a/runner/tests/test_aider_driver.py+++ b/runner/tests/test_aider_driver.py@@ -291,7 +291,17 @@ def test_edit_blocks_are_stripped_from_the_answer_and_the_edits_render_as_cards(# the markup comes back through the other door (measured: the text event was clean and the# stored answer still carried the block)src = pathlib.Path(__file__).resolve().parents[1].joinpath("aider_driver.py").read_text()- assert '"final": strip_edit_blocks(coder.partial_response_content or "")' in src+ assert 'final = strip_edit_blocks(coder.partial_response_content or "")' in src+++def test_a_turn_that_ended_on_a_command_says_so_rather_than_saying_nothing():+ """A response that was commands and nothing else leaves no answer once the blocks are cards;+ the record then read as an empty reply (hosted, 2026-09-19: seven officecli attempts, no text,+ no file). The sentence states what happened; a turn with an answer, an edit-only turn (no+ commands) and a failed turn keep their own text."""+ src = pathlib.Path(__file__).resolve().parents[1].joinpath("aider_driver.py").read_text()+ assert "if not final and gate.calls and not failed:" in src+ assert "The task ended without a written answer after running commands." in srcdef test_agent_doc_is_written_as_agents_md_even_though_aider_reads_it_via_read():