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
UHP 2026-10-19, addition: a new task may bring its earlier turns (input_history) (#520)
github-actions[bot]9ecd0046fe84
diff --git a/protocol/CHANGELOG.md b/protocol/CHANGELOG.mdindex 1eab53c3..7fc0beb7 100644--- a/protocol/CHANGELOG.md+++ b/protocol/CHANGELOG.md@@ -2,6 +2,16 @@All notable changes to the Unified Harness Protocol.+## 2026-10-19, addition: earlier turns (capability `input_history`)++Additive. A request without `previous_response_id` may carry the conversation so far as `user` and+`assistant` messages before the last `user` message ([Tasks §2.1](versions/2026-10-19/tasks.md#21-earlier-turns)).+A server that reports the new `input_history` capability gives them to the harness as its history,+treats only the last `user` message as the task's own, keeps them as the session's first turns marked+`imported: true` in `/turns` (completed, no model ran, no cost). Beyond its bounds it imports none+of them and reads the request as without the capability, never refusing it. A server without the+capability, or one that reports it `false`, is unchanged.+## 2026-10-19Against `2026-10-04`, one rule changes and the rest is additive.diff --git a/protocol/conformance/uhp_conformance/uhp-2026-10-19.schema.json b/protocol/conformance/uhp_conformance/uhp-2026-10-19.schema.jsonindex ea25de01..9823b771 100644--- a/protocol/conformance/uhp_conformance/uhp-2026-10-19.schema.json+++ b/protocol/conformance/uhp_conformance/uhp-2026-10-19.schema.json@@ -118,6 +118,10 @@"memories": {"type": "boolean","description": "The server holds memories: a tree of memories with access granted per node, records kept\nby a connected provider, and tools a harness's agent reaches them with. Optional at every class.\n"+ },+ "input_history": {+ "type": "boolean",+ "description": "A request that starts a session may carry earlier turns: `user` and `assistant` messages\nbefore the last `user` message, given to the harness as the conversation so far and kept as\nthe session's first turns, marked `imported` in its turns. See Tasks §2.1. Optional at every class.\n"}},"additionalProperties": {@@ -731,7 +735,7 @@}}],- "description": "A bare string is shorthand for one user message."+ "description": "A bare string is shorthand for one user message. Without `previous_response_id`, on a\nserver with `input_history`, `user` and `assistant` messages before the last `user` message\nare the conversation so far, kept as the session's first turns, marked imported (Tasks §2.1).\n"},"model": {"type": "string",@@ -1122,6 +1126,10 @@"type": "object","additionalProperties": true}+ },+ "imported": {+ "type": "boolean",+ "description": "A turn the session was started with (Tasks §2.1, capability `input_history`): completed,\nno model ran and nothing was spent. `false`, or absent, for a turn that ran.\n"}},"additionalProperties": truediff --git a/protocol/schema/uhp-2026-10-19.openapi.yaml b/protocol/schema/uhp-2026-10-19.openapi.yamlindex cfc01153..763d08e4 100644--- a/protocol/schema/uhp-2026-10-19.openapi.yaml+++ b/protocol/schema/uhp-2026-10-19.openapi.yaml@@ -1808,6 +1808,12 @@ components:description: |The server holds memories: a tree of memories with access granted per node, records keptby a connected provider, and tools a harness's agent reaches them with. Optional at every class.+ input_history:+ type: boolean+ description: |+ A request that starts a session may carry earlier turns: `user` and `assistant` messages+ before the last `user` message, given to the harness as the conversation so far and kept as+ the session's first turns, marked `imported` in its turns. See Tasks §2.1. Optional at every class.additionalProperties: { type: boolean }Harness:@@ -2135,7 +2141,10 @@ components:- type: string- type: arrayitems: { type: object, additionalProperties: true }- description: A bare string is shorthand for one user message.+ description: |+ A bare string is shorthand for one user message. Without `previous_response_id`, on a+ server with `input_history`, `user` and `assistant` messages before the last `user` message+ are the conversation so far, kept as the session's first turns, marked imported (Tasks §2.1).model: { type: string, description: Canonical model id. Omitted means the harness default. }metadata:type: object@@ -2319,6 +2328,11 @@ components:assistant: { type: string }tools: { type: array, items: { type: object, additionalProperties: true } }files: { type: array, items: { type: object, additionalProperties: true } }+ imported:+ type: boolean+ description: |+ A turn the session was started with (Tasks §2.1, capability `input_history`): completed,+ no model ran and nothing was spent. `false`, or absent, for a turn that ran.additionalProperties: trueEnvironment:diff --git a/protocol/schema/uhp-2026-10-19.schema.json b/protocol/schema/uhp-2026-10-19.schema.jsonindex ea25de01..9823b771 100644--- a/protocol/schema/uhp-2026-10-19.schema.json+++ b/protocol/schema/uhp-2026-10-19.schema.json@@ -118,6 +118,10 @@"memories": {"type": "boolean","description": "The server holds memories: a tree of memories with access granted per node, records kept\nby a connected provider, and tools a harness's agent reaches them with. Optional at every class.\n"+ },+ "input_history": {+ "type": "boolean",+ "description": "A request that starts a session may carry earlier turns: `user` and `assistant` messages\nbefore the last `user` message, given to the harness as the conversation so far and kept as\nthe session's first turns, marked `imported` in its turns. See Tasks §2.1. Optional at every class.\n"}},"additionalProperties": {@@ -731,7 +735,7 @@}}],- "description": "A bare string is shorthand for one user message."+ "description": "A bare string is shorthand for one user message. Without `previous_response_id`, on a\nserver with `input_history`, `user` and `assistant` messages before the last `user` message\nare the conversation so far, kept as the session's first turns, marked imported (Tasks §2.1).\n"},"model": {"type": "string",@@ -1122,6 +1126,10 @@"type": "object","additionalProperties": true}+ },+ "imported": {+ "type": "boolean",+ "description": "A turn the session was started with (Tasks §2.1, capability `input_history`): completed,\nno model ran and nothing was spent. `false`, or absent, for a turn that ran.\n"}},"additionalProperties": truediff --git a/protocol/versions/2026-10-19/index.md b/protocol/versions/2026-10-19/index.mdindex ec24f674..6fd4a9bc 100644--- a/protocol/versions/2026-10-19/index.md+++ b/protocol/versions/2026-10-19/index.md@@ -116,6 +116,10 @@ Against `2026-10-04`, one rule changes and the rest is additive.delete response gains `sessions` and `restorableUntil`. This is the one change that is notadditive: a client that relies on a retired harness's sessions staying readable checks thecapability.+- **A new task may bring its earlier turns** ([Tasks §2.1](tasks.md#21-earlier-turns)), added after+ publication and additive: with the `input_history` capability, the messages before the last `user`+ message are the conversation so far, kept as the session's first turns marked `imported`. Beyond+ a server's bounds the request is read as without the capability, never refused.- **Harness writes refuse what they cannot store** ([Harnesses §5.1](harnesses.md#51-create)): a fieldthe harness does not have, and a `default_model` its base does not run, are `422`. Both maintainedservers have done this since 2026-10-10, inside `2026-10-04`; this version states it.diff --git a/protocol/versions/2026-10-19/lifecycle.md b/protocol/versions/2026-10-19/lifecycle.mdindex 207ca31d..d2d4247d 100644--- a/protocol/versions/2026-10-19/lifecycle.md+++ b/protocol/versions/2026-10-19/lifecycle.md@@ -58,6 +58,7 @@ credentials. The document MUST NOT contain anything principal-specific."session_listing": true,"harness_management": true,"harness_retirement": false,+ "input_history": false,"session_sharing": true,"idempotency": true,"plugins": true,diff --git a/protocol/versions/2026-10-19/sessions.md b/protocol/versions/2026-10-19/sessions.mdindex 0f34c3e0..ea6b57c4 100644--- a/protocol/versions/2026-10-19/sessions.md+++ b/protocol/versions/2026-10-19/sessions.md@@ -91,6 +91,9 @@ understand. This was previously an object with no stated shape, which meant no ccould assert anything past the status code, and every client that rebuilt a transcript did soagainst one implementation's habits.+A server with the `input_history` capability marks each turn a session was started with+([Tasks §2.1](tasks.md#21-earlier-turns)) `imported: true`, and every turn that ran `imported: false`.+A session whose turns read an environment carries `environment`, the environment's id, so a clientcan tell which project a conversation worked in ([Environments §6](environments.md#6-what-a-session-sees)).diff --git a/protocol/versions/2026-10-19/tasks.md b/protocol/versions/2026-10-19/tasks.mdindex a262e8cc..50bc329f 100644--- a/protocol/versions/2026-10-19/tasks.md+++ b/protocol/versions/2026-10-19/tasks.md@@ -180,6 +180,45 @@ the honest form here is to say plainly that these two do nothing.A server at conformance class **Core** MUST accept `input_text`. A server at **Extended** MUST alsoaccept `input_file` and `input_image`. See [Files](files.md).+### 2.1 Earlier turns++A task can start from a conversation held somewhere else: a transcript the client kept, or a recorded+run it continues as a task of its own. On a request **without** `previous_response_id`, an `input`+array carries it the way the Responses API reads one: the `user` and `assistant` messages before the+last `user` message, in order, are the conversation so far, and the last `user` message is the work.++```json+{+ "input": [+ { "role": "user", "content": [{ "type": "input_text", "text": "Make a product image of a mug." }] },+ { "role": "assistant", "content": "Here is the mug on a light oak table." },+ { "role": "user", "content": [+ { "type": "input_text", "text": "Make the background white." },+ { "type": "input_file", "filename": "mug.png", "file_data": "data:image/png;base64,…" }+ ]}+ ]+}+```++An assistant message's `content` is a string or an array of `output_text` parts; files travel as+`input_file` in a `user` message, under the limits of [Files](files.md). A server that reports the+`input_history` capability:++- MUST give the harness the earlier messages as the conversation so far, and MUST treat only the last+ `user` message as the task's own message: it is what the task's turn records as the user's.+ `system` and `developer` messages stay instructions for the task, wherever they appear.+- MUST keep the earlier messages in the session as its first turns, before the task's own, each+ marked `imported: true` in [`/turns`](sessions.md#3-inspecting-a-session). An imported turn is+ `completed`, ran no model and costs nothing.+- MAY bound how many earlier messages and how much text it imports. Beyond a bound it MUST NOT+ import any of them and MUST NOT refuse the request for it: the request is read as it would be+ without the capability, so a client that sent such arrays before keeps working. A client that+ needs the turns kept checks that the first turn reads back `imported: true`.++With `previous_response_id`, the session already holds the conversation and this section does not+apply. A client that needs the earlier turns kept MUST check `capabilities.input_history` first: a+server without it may give the harness the last messages alone.+## 3. The response object```json