Skip to content

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.

gateway: an adopted turn keeps its ignored_fields

richard-epsillaab6e08421f39
diff --git a/gateway/app.py b/gateway/app.py
index 086705de..d12d76fb 100644
--- a/gateway/app.py
+++ b/gateway/app.py
@@ -2071,7 +2071,14 @@ async def _adopt_orphan_turn(sid: str, org: str, v: dict) -> bool:
model = str(v.get("model") or "")
harness_id = tr["harness_id"]
member = tr["member"]
- translator = _RespTranslator(resp_id, model, None, True, time.time(), sid=sid)
+ translator = _RespTranslator(resp_id, model, None, True, time.time(), sid=sid,
+ # The original owner computed this from the request body, which
+ # this replica never saw. Without it, the settle below overwrites
+ # the stored record and the marker vanishes exactly when a turn is
+ # adopted — a client that sent `tools` would see ignored_fields on
+ # the running snapshot and then not on the terminal record, which
+ # reads as the field having been honoured after all (tasks.md 1.1).
+ ignored=((_orig_rec or {}).get("metadata") or {}).get("ignored_fields"))
# Resume at the PER-TURN harvest cursor (the sandbox indexes /turn/{rt}?since=N in THIS turn's
# own event space — NOT the session-wide trace count). The primary loop persists it after each
# ack'd flush; poll since=cursor so no already-flushed event is re-written or re-emitted. If it