SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.09751 · 2026

Collaborative Human-Agent Protocol (CHAP) An open protocol for auditable, structured multi-human and multi-agent collaboration

Arsalan Shahid, Gordon Suttie, Philip Black, Brightbeam Ai

arXiv · PDF

Code that ran

10 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 8 failures of our instrument; 7 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.09751.json · badge: /api/ran/2606.09751.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
BrightbeamAI/chap canonical (classifier label)
classifier basis: census
10 ran · 7 no recorded run
FunctionStatusWhere it lives
apply_json_patch Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/chap-analytics/chap_analytics/_patch.py
code served (permissive licence) · get_code("6acbbc7990828852")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# The function appears to be apply_json_patch based on the code snippet
# Looking at the function body, it takes:
# - doc: Any (a document to patch)
# - patch: list of operations
# The function applies JSON Patch operations (RFC 6902)

# Construct a simple document to patch
doc = {
    "name": "John",
    "items": [1, 2, 3],
    "nested": {
        "value": 42
    }
}

# Construct valid patch operations
patch = [
    {
        "op": "add",
        "path": "/age",
        "value": 30
    },
    {
        "op": "replace",
        "path": "/name",
        "value": "Jane"
    },
    {
        "op": "add",
        "path": "/items/-",
        "value": 4
    }
]

ARGS = {
    "doc": doc,
    "patch": patch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ask_in_terminal Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/start-here/chap_starter.py
code served (permissive licence) · get_code("1176fbada736f8d1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

class MockGate:
    """Minimal gate implementation with inspect and decide methods."""
    
    def __init__(self):
        self.tasks = {
            'task_1': {
                'draft': {'action': 'test', 'value': 42},
                'digest': 'abc123def456'
            }
        }
    
    def inspect(self, task_id):
        """Return view with draft and digest."""
        return self.tasks.get(task_id, {
            'draft': {'action': 'default', 'value': 0},
            'digest': 'default_digest'
        })
    
    def decide(self, task_id, decision, edited=None, rationale='', expected_digest=''):
        """Process a decision and return result."""
        return {
            'task_id': task_id,
            'decision': decision,
            'edited': edited,
            'rationale': rationale,
            'expected_digest': expected_digest
        }

def mock_read(prompt):
    """Mock input that simulates user responses."""
    responses = iter(['a', 'Test reason'])
    try:
        response = next(responses)
        return response
    except StopIteration:
        raise EOFError()

def mock_write(text):
    """Mock output that does nothing."""
    pass

gate = MockGate()
task_id = 'task_1'

ARGS = {
    'gate': gate,
    'task_id': task_id,
    'read': mock_read,
    'write': mock_write
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
canonicalize Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/canonical.py
code served (permissive licence) · get_code("2f1073c3823b9aea")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bytes. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

ARGS = {
    "obj": {
        "name": "Alice",
        "age": 30,
        "active": True,
        "balance": None,
        "scores": [95, 87, 92],
        "metadata": {
            "created": "2024-01-15",
            "verified": False
        }
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
content_hash Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/canonical.py
code served (permissive licence) · get_code("feec9349999bf3a9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib
import json
from typing import Any

# Test the content_hash function with various JSON-compatible values

ARGS = {
    'content': {
        'name': 'test',
        'value': 42,
        'items': [1, 2, 3],
        'nested': {
            'key': 'hello',
            'flag': True,
            'empty': None
        },
        'decimal_string': '8.2'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_valid_envelope Ran
ran, violated the contract we drafted
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/jsonrpc.py
code served (permissive licence) · get_code("eb738b573c7a6cc5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Any

# The function checks if env is a dict with 'jsonrpc' == '2.0'
# We need to construct a valid envelope argument

# Valid envelope
valid_envelope = {
    'jsonrpc': '2.0',
    'method': 'someMethod',
    'params': [],
    'id': 1
}

ARGS = {
    'env': valid_envelope
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_response Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/jsonrpc.py
code served (permissive licence) · get_code("87571a2106f20ebe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for make_response function
# The function takes:
# - env_id: Any
# - result: Any (default None)
# - error: dict | None (default None)

# Since the function just constructs a dict with these values,
# we need to provide valid Python objects

env_id = 12345
result = {"status": "success", "data": [1, 2, 3]}
error = None

ARGS = {
    "env_id": env_id,
    "result": result,
    "error": error,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mode_le Ran
ran, violated the contract we drafted
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/coordinator.py
code served (permissive licence) · get_code("e379bc6cd0e22289")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Set seed for reproducibility
torch.manual_seed(0)

# Create arguments for mode_le function
ARGS = {
    'a': 'shadow',
    'ceiling': 'production'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rpc_error Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/jsonrpc.py
code served (permissive licence) · get_code("9f4d5b550e4f5183")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any

torch.manual_seed(0)

# Construct arguments for rpc_error function
code = -32700  # Valid JSON-RPC error code
message = "Parse error"
data = {
    "details": "Invalid JSON was received by the server",
    "line": 42,
    "column": 10
}

ARGS = {
    "code": code,
    "message": message,
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sha256_hex Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/canonical.py
code served (permissive licence) · get_code("46ec1cabc5db2794")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib

ARGS = {
    'data': b'Hello, World!'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sign Ran
ran; our contract draft was wrong, not the code
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/crypto.py
code served (permissive licence) · get_code("e5996c400ed86e87")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import base64
from typing import Any


class MockSigningKey:
    """Mock Ed25519 key with a sign method."""
    
    def sign(self, data: bytes) -> bytes:
        """Return a mock 64-byte Ed25519 signature."""
        # Ed25519 signatures are 64 bytes
        return b'\x00' * 64


ARGS = {
    'canonical_bytes': b'test canonical data',
    'key': MockSigningKey(),
    'kid': 'test_key_id',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
derive_private_key Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/crypto.py
code served (permissive licence) · get_code("51109f9861792e82")
How it ran

no invocation recorded.

from_json Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/chap-analytics/chap_analytics/load.py
code served (permissive licence) · get_code("f2d7b046a65e6891")
How it ran

no invocation recorded.

from_sqlite Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/chap-analytics/chap_analytics/load.py
code served (permissive licence) · get_code("e0ed1a8f7e2ca028")
How it ran

no invocation recorded.

json_diff Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/start-here/chap_starter.py
code served (permissive licence) · get_code("202bbbc80e86c4a8")
How it ran

no invocation recorded.

public_jwk Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/coordinator-py/chap_coordinator/crypto.py
code served (permissive licence) · get_code("9670c593bdae50c2")
How it ran

no invocation recorded.

redact_artefacts Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/chap-analytics/chap_analytics/load.py
code served (permissive licence) · get_code("610d7dc076730169")
How it ran

no invocation recorded.

support_desk_coordinator Not yet run
unverified (harvested, no recorded run)
BrightbeamAI/chap/packages/chap-analytics/chap_analytics/sample.py
code served (permissive licence) · get_code("a7359391c2bd5f7e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 17 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Foundation models are moving from response generation into operational roles. They plan across steps, call tools, request human input, coordinate with other agents, and increasingly carry responsibility for work that affects customers, claims, code, contracts, and clinical decisions. Production deployments are no longer one human supervising one model. They are multi-human, multi-agent collaborations that cross teams, time zones, and trust boundaries. The technical surface for this collaboration remains weakly specified. When an agent drafts a response and a human edits it before it ships, the moment of human judgement is the most valuable signal in the system. In current practice it is recorded, if at all, in application code, chat threads, ticket comments, and tribal memory. Two protocol standards address adjacent concerns: MCP standardises agent access to tools and data, and A2A standardises agent-to-agent interoperability. Neither defines the shared workspace in which humans and agents perform accountable work together. This paper presents CHAP, the Collaborative Human-Agent Protocol. Under CHAP, the override that used to vanish into a chat thread becomes a structured event carrying a diff, a rationale, and a content hash. The handoff between shifts becomes a portable envelope rather than a pinned message. The human approval of an agent's draft becomes a non-repudiable signed decision that can be replayed years later. The protocol achieves this through a small Core (workspaces, participants, tasks, artefacts, and an append-only evidence log) together with composable profiles that add review, modes, routing, deliberation, handoff, identity, signatures, and transparency-backed audit as deployments require them. Specification, two interoperable reference implementations (TypeScript and Python), conformance harness, and worked examples are available at: https://github.com/BrightbeamAI/chap

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.09751")
get_code_for_paper("2606.09751")
have("2606.09751")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2606.09751.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2606.09751.svg)](https://syntology.ai/paper/2606.09751)

Connect an agent — have() is free.