SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.09691 · 2026

What Context Does a Coding Agent Actually Need to Act?

Brian Sam-Bodden

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2607.09691.json · badge: /api/ran/2607.09691.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
integrallis/act-context canonical (classifier label)
classifier basis: census
10 ran · 0 no recorded run
FunctionStatusWhere it lives
cheap_client Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/llm.py
code served (permissive licence) · get_code("736308f98a7821d2")
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 OllamaClient. 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
import urllib.request
from unittest.mock import patch, MagicMock

# Define ARGS dict for cheap_client function
ARGS = {
    'model': 'qwen2.5-coder:3b'
}

# Optional: If you want to test the OllamaClient initialization directly,
# you can also create a standalone instance:
def test_setup():
    # This demonstrates how the cheap_client function works
    client = cheap_client(model='qwen2.5-coder:3b')
    # Verify it returns an OllamaClient instance
    assert isinstance(client, OllamaClient)
    assert client.model == 'qwen2.5-coder:3b'
    assert client.host == 'http://localhost:11434'
    assert client.timeout == 180
    return client

# Mock for testing without actual Ollama server
def mock_ollama_response():
    """Creates a mock response for testing generate without network"""
    return {
        'model': 'qwen2.5-coder:3b',
        'response': 'This is a test response',
        'done': True
    }
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 OllamaClient — a OllamaClient output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OllamaClient 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
integrallis/act-context/src/dhcm_ng/model.py
code served (permissive licence) · get_code("89ffdb3e66416cdb")
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

def content_hash(text: str) -> str:
    return hashlib.sha256(text.encode('utf-8', 'ignore')).hexdigest()[:16]

ARGS = {
    "text": "Hello, World! This is a test string for hashing."
}
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
cosine Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
integrallis/act-context/src/dhcm_ng/embed.py
code served (permissive licence) · get_code("ae2a1aba1e25a436")
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 float, 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 numpy as np

torch.manual_seed(0)

# The function takes two lists of floats and computes cosine similarity
# We need to construct two lists of floats with the same length

a = [1.0, 2.0, 3.0, 4.0]
b = [2.0, 3.0, 4.0, 5.0]

ARGS = {
    "a": a,
    "b": b
}
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 float, 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
frontier_client Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/llm.py
code served (permissive licence) · get_code("c6f1bbb6e692d13d")
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 AnthropicClient. 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 os
from pathlib import Path

# Mock the anthropic module since we can't make real API calls
class MockMessage:
    def __init__(self):
        self.model = 'claude-sonnet-4-6'
        self.stop_reason = 'end_turn'
        self.content = [MockContent()]

class MockContent:
    def __init__(self):
        self.type = 'text'
        self.text = 'Mock response from Claude'

class MockCountTokensResponse:
    def __init__(self):
        self.input_tokens = 42

class MockAnthropicClient:
    def messages(self):
        return self
    
    def create(self, **kwargs):
        return MockMessage()
    
    def count_tokens(self, **kwargs):
        return MockCountTokensResponse()

class MockAnthropicModule:
    def Anthropic(self, api_key=None):
        return MockAnthropicClient()

# Inject mock anthropic into sys.modules
import sys
sys.modules['anthropic'] = MockAnthropicModule()

# Set up environment variable to satisfy the key check
os.environ['ANTHROPIC_API_KEY'] = 'sk-ant-valid-test-key-for-testing-purposes-only-1234567890'

ARGS = {
    'model': 'claude-sonnet-4-6'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
anthropic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AnthropicClient — a AnthropicClient output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AnthropicClient 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
function_signature Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/reduce.py
code served (permissive licence) · get_code("9d7bdee049ea7781")
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 ast
import torch

torch.manual_seed(0)

# This function takes a function source code string as input and returns
# a signature + docstring. We need to construct a valid func_source argument.

# Create a sample function source code with:
# - A function definition
# - Parameters
# - Return type annotation
# - A docstring

func_source = """def example_function(x: int, y: str = 'default') -> bool:
    '''Check if x is positive and y is not empty.'''
    return x > 0 and len(y) > 0
"""

ARGS = {
    'func_source': func_source
}
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 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
gold_files_from_patch Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/context_arms.py
code served (permissive licence) · get_code("df6d085fb73cab5c")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

# Analyze the function:
# - Takes a patch string parameter
# - Splits by '\n'
# - Looks for lines starting with '+++ b/'
# - Extracts the part after '+++ b/'
# - Removes null entries and sorts

# Create a valid patch string with some file additions
patch = """+++ b/file1.py
@@ -1,3 +1,4 @@
 line1
 line2
+++ b/file2.txt
@@ -1,1 +1,2 @@
 content
+++ b/subdir/file3.json
--- a/file4.py
"""

ARGS = {
    "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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
gold_hunks_from_patch Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/context_arms.py
code served (permissive licence) · get_code("2a5420bc4a8a6ed0")
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 re

def gold_hunks_from_patch(patch: str) -> dict[str, list[tuple[int, int]]]:
    out, cur = ({}, None)
    for line in patch.split('\n'):
        if line.startswith('+++ b/'):
            cur = line[6:].strip()
        elif line.startswith('@@') and cur:
            m = re.search('@@ -(\\d+)(?:,(\\d+))?', line)
            if m:
                s, c = (int(m.group(1)), int(m.group(2) or 1))
                out.setdefault(cur, []).append((s, s + max(c, 1) - 1))
    return out

patch_content = """+++ b/src/main.py
@@ -10,5 +10,7 @@
 some context line
+++ b/src/utils.py
@@ -42,3 +42,5 @@
 another context
@@ -100,10 +100,12 @@
 more changes
"""

ARGS = {
    "patch": patch_content
}
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
redundancy Ran
ran, honoured the contract we drafted
integrallis/act-context/src/dhcm_ng/assemble.py
code served (permissive licence) · get_code("c7387a7192088136")
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 float, 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 re

def _trigrams(text: str) -> list[tuple[str, str, str]]:
    toks = re.findall('[a-zA-Z_][a-zA-Z0-9_]+', text.lower())
    return list(zip(toks, toks[1:], toks[2:]))

def redundancy(pieces: list[str]) -> float:
    """Fraction of trigram occurrences that are duplicates across the assembled pieces.
    0 = no repeated content; ->1 = highly redundant. Measures cross-piece restatement."""
    grams = []
    for p in pieces:
        grams.extend(_trigrams(p))
    if not grams:
        return 0.0
    seen, dup = (set(), 0)
    for g in grams:
        if g in seen:
            dup += 1
        else:
            seen.add(g)
    return dup / len(grams)

# Setup code
pieces = [
    "the quick brown fox jumps over the lazy dog",
    "the quick brown fox is fast",
    "a lazy dog sleeps under a tree"
]

ARGS = {
    "pieces": pieces
}
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 float, 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
summary_for Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/descent.py
code served (permissive licence) · get_code("ae9810d8e8fac4e1")
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 torch

torch.manual_seed(0)

class Node:
    def __init__(self):
        self.residual_summary = "residual summary text"
        self.cumulative_summary = "cumulative summary text"

node = Node()
scheme = 'residual'

ARGS = {
    'node': node,
    'scheme': scheme
}
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 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
uml_class_skeleton Ran
ran; our contract draft was wrong, not the code
integrallis/act-context/src/dhcm_ng/reduce.py
code served (permissive licence) · get_code("ad54287b72e4bb9c")
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 ast

# Simple test class sources for the function to parse
class_source_1 = '''
class Animal(object):
    """An animal class."""
    name: str
    age: int = 0
    
    def __init__(self, name: str, age: int = 0):
        """Initialize the animal."""
        self.name = name
        self.age = age
    
    def speak(self) -> str:
        """Make a sound."""
        return "Some sound"
    
    async def async_move(self, distance: float) -> None:
        """Move asynchronously."""
        pass
'''

class_source_2 = '''
class Counter:
    count = 0
    
    def increment(self):
        self.count += 1
    
    def get_count(self) -> int:
        return self.count
'''

class_source_3 = '''
class EmptyClass:
    pass
'''

class_source_4 = '''
class Vehicle(object, dict):
    wheels: int
    
    def accelerate(self, speed: int) -> bool:
        """Increase speed."""
        return True
'''

ARGS = {
    'class_source': class_source_1
}
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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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-23.

Repositories linked to this paper

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

Abstract

A modern coding agent can hold an entire repository in its context window. Most of its reading is wasted -and the interesting question is not how much context an agent can use, but what it actually needs. We study that question at the moment it matters most: when the agent must edit code. Separating finding the work site from acting on it, we hold localization fixed with an oracle, vary only how the code is represented, and score context against real issue resolution on SWEbench Verified. The answer is starkly minimal. The signal lives in the code being edited itself: natural-language summaries of it answer almost none of the behavioral questions that the source answers (4/45 vs. 27/45, held-out repositories, independent judge), and the gap belongs to the representation, not the summarizer -a frontier model's summaries score exactly as poorly as a 3B model's. The surrounding context hardly matters either: across every multi-file instance in Verified, under a protocol frozen before any data, rendering a file's remainder as UML skeletons and signatures resolves no more issues than deleting that remainder outright (N =70, exact McNemar p=0.75). That was our registered hypothesis, and it failed. Compressed context, meanwhile, matches whole files at a third of the tokens: a resolved issue costs 19K context tokens, not 94K. The instrument also yielded a finding the field should keep: temperature-0 API inference flips ∼9% of per-instance outcomes between byte-identical runs. That is a noise floor under every small effect reported on this benchmark, including ours. We release the instrument -gold-validated environments, per-instance proof that every reference edit is expressible from every arm's context, deterministic patch construction, and pre-registered hypotheses whose nulls we publish.

For agents

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

get_harvested_code_for_paper("2607.09691")
get_code_for_paper("2607.09691")
have("2607.09691")

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

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

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

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

Connect an agent — have() is free.