Repository navigation
Releases
v0.9.1
A patch release, all of it from one 0.9.0 session on a large monorepo. The @
attachment shipped in 0.9.0 worked -- 241 lines of a PRD read into the turn --
and then three separate defects threw it away: the loop sent the model hunting
for a file it had already been given, the terminal reported a failed search as
a hit, and the context guard refused a re-read the context guard had asked for.
Fixed
-
A file the user attached is not missing. The user attached a PRD with
@
and the model askedread_filefor its basename. The ordinary not-found
message -- right for every other miss -- told it to useglob. It globbed
three times, asked GitHub, concluded the file did not exist, and started
writing a replacement, with the whole document sitting in its own history. A
failed call whose path matches something attached this turn now says so. Only
on a failure, so a workspace file that happens to share a basename with an
attachment is still read normally. -
A search that found nothing said it found one thing.
globanswers an
empty search with the sentenceNo files match '**/*.tex'., and the status
line counted lines, so a miss rendered as1 path. The transcript printed
1 paththree times while the model went on -- correctly -- concluding the
file was not there.grep,list_filesandcodebase_searchhad the same
hole. -
A read the loop elided is read again rather than refused. Eliding leaves a
note reading "Call it again if you still need it", and the repeat guard
answered exactly that call with "you already ran this". The loop freed the
file, asked the model to fetch it back, refused when it did, and handed back
the text it had just freed -- paying a round trip to end up where it started,
and counting the recovery towards the bound for a model going in circles. One
qwen2.5-coder:7bturn spent two minutes there. A repeat is now only a repeat
while the first result is still in the window; a second one with the result
gone is still refused, because read/elide/read/elide is a cycle of its own.
Small windows only -- deduplication is off above 65k, so this never bit 14b.
Changed
-
A tool result is shown rather than counted. A count on its own is a
receipt: it says a call happened and nothing about what it found.241 lines
is not an answer toread_file, and one count was not even true. The first
lines of a result are now drawn under the call, hung off a connector, with the
count moved to the line that says there is more -- so a result that fits gets
no count at all. Lines are cut to the terminal rather than wrapped, because a
wrapped line restarts in column zero and puts the tail of a tool result where
the model's prose goes.--verboseis the same block drawn longer rather than
a second layout. -
A lone multi-line argument is spread over lines. A
bashheredoc is the
argument most worth reading and the one the single-line rendering mangled
worst: newlines escaped, then cut at sixty characters, which is the opening of
a script and none of what it does. Only a lone one, sowrite_filekeeps its
generated content on the one line where it belongs.
v0.9.0
The release is about one number. Across every session on this machine -- 733
files, 37 recorded turns -- 18 of the 26 turns that answered called no tool at
all, and 15 of those were real requests rather than greetings. Broken down by
the size of the system prompt, which is a proxy for the size of the workspace:
42% of turns on a medium one, 83% on the largest. Median iterations, 1.0.
The agent was answering out of a keyword search without opening a file, more
often the bigger the codebase got, and nothing in the loop or the benchmark
could see it happening.
Added
-
A turn that describes the work instead of doing it is refused. Tool calls
travel in message content, so prose was the signal a turn had finished -- and
prose is also what a model produces when it writes about a tool rather than
calling one. The loop could not tell the two apart. It can now, by a rule that
contains no language at all: the workspace search only runs whentermsfound
something worth searching for, and it never does for a greeting, so a turn that
searched and then answered without opening anything answered out of a keyword
match. Two more tests back it up -- a reply that names a registry tool without
calling it, and a reply whose every sentence announces an action. The last of
those needed Uzbek to be useful:<verb>sh kerakis how the language says "it
must be done", every narrated turn in the corpus is built out of it, and an
English-only rule caught none of them. -
Asked once, then done for it. Correcting a small model twice with the same
paragraph returns the same paragraph: run againstqwen2.5-coder:7b, three
identical corrections produced three identical non-answers and a turn that
opened nothing. So the correction now ends on a call that can be sent back
verbatim, with the path filled in from the search's own best match -- at that
size a model copies far better than it composes -- and on the second refusal
the loop stops asking and reads the file itself. The precedent is the scout,
which already puts a result the model never asked for into the history; this
is the same move one step further on, and it is the step the model named. It
goes through_execute, so permissions and hooks apply and the read is
counted like any other. -
@attaches a file the user names, wherever it lives. A request pointing
at@~/PRDs/mobile.texfrom a workspace that does not contain it was
unwinnable: the path is outside the root,containrefuses it, and nothing
said so. The turn guessed the basename, globbed for it twice, readCLAUDE.md
three times and was still going at 122 seconds with 70% of the window spent.
The sandbox is about the agent's reach -- what the model may decide, on its
own, to go and look at -- and a path typed at the prompt is not the model
deciding anything. So the line drawn here is provenance, not location:
Agent.runtakestyped, defaulting to False, and the REPL and one-shot runs
are the only callers that pass it. A sub-agent's instruction, a hook's output,
a resumed history, and anything a file in the workspace could write all get
nothing, because each is a route by which something other than the user could
name a path. A path that cannot be read is attached too, saying so, since that
one sentence is what the two minutes above were missing. -
The benchmark counts what it could not see. An answer written without
opening anything is fast, cheap, and reportsanswered-- there was no column
it showed up in.scripts/benchmark.pynow reports it, in the summary and in
--compare, along with the slowest task beside the median: a hang does not
move a median, it is the whole of what went wrong, and that is exactly how a
5,288-second turn stayed invisible. -
narratedjoins the reasons a turn can stop, so the failure above is
counted apart from a model that could not format a call. Different problem,
different fix, and a stop that says which is which.
Changed
-
A single round trip is bounded.
MAX_SECONDSwas checked between
iterations and skipped on the first, so it bounded nothing a short turn does:
three turns in this machine's history ran 664s, 1,495s and 5,288s against a
600s budget without it ever applying, and the 664s one was recorded
answered. A bigger workspace is a bigger prompt is a slower first token, so
on a large codebase the turn did not fail, it hung. The check now runs on the
first iteration like the rest and reaches inside the read -- both halves of
it, because a deadline tested against arriving chunks bounds nothing while
none arrive, and the wait before the first token is most of a turn on a local
model. Whatever prose arrived is kept and the turn ends on it astime-cap;
a turn that heard nothing at all is not asked again, because asking a silent
server for a final answer spends the whole of that budget waiting for the
same silence. Measured against a socket that accepts and never replies: 66
seconds for a turn bounded at 6, now 6.0. -
Context is freed for nothing before a model call is paid for it. There
are two levers and they cost wildly different amounts: eliding old tool output
is a dict write, summarizing is a full model call that also, by its own
instruction, drops the record of having read a file along with the file, so
the model reads it again. Summarizing went first and the free lever was only
reached on a second pass through the same turn -- which, across every session
on this machine, never arrived. No transcript carries an elided result, while
every window that filled paid a summarization round trip. Eliding now goes
first and clears the reported token count, so the recheck afterwards is honest
rather than always reporting the pressure it just relieved. -
A read costs a fraction of the window rather than a quarter of it. The
medianread_fileresult across every session here is 6,166 characters --
9.4% of a 16,384-token window in one call, five of them enough to fill it --
and 24 of the 31 paged reads start at line 1, because nothing had told the
model the file was 868 lines. So the default read length now follows the
window, the same questionset_output_budgetalready answers for characters
and answered by the same call: 128 lines at the default window rather than
400.globsays how long each file is, whichread_filecan only do
afterwards -- which is exactly why the first read was blind. And the prompt
says to search for the line before reading a window around it, rather than
opening a file from line 1 to find out what is in it.grepwas used once for
every 5.4 reads. -
The file listing is cut to fit a small window. The system prompt is fixed
overhead paid on every request, and on this repo it is 11,926 characters --
about 2,981 tokens, 18% of the default window before a word has been said,
which is what a session showing 22% used on its first turn is made of. The
listing is 3,462 of those characters and the only part that grows with the
repository, so it is the part that answers to the window: 80 paths below
65,536, and the prompt drops to 10,282 characters. Unchanged on a large
window, which is where the 200 was measured.
Fixed
-
The workspace search no longer searches for the Uzbek word "this". "what
is this repo about" produces no search terms, correctly; its twin "ushbu repo
nima haqida" searched the workspace forushbu-- and ranking on it returned
whatever happened to say it. Two holes in the same list:buandshucame
in withlanguage's vocabulary butushbu, the formal "this" and the one
people actually open a request with, did not; and Uzbek glues its cases on, so
repoarrives asreponi, which a list written in nominative forms misses
even thoughrepohas always been in it. A token is now tested as a stopword
twice, once as written and once with a case ending removed -- only when the
message is Uzbek, becauserunningends inningandrunis a stopword. -
An attached path is no longer handed to the workspace search. It is the
one thing in a request that certainly is not in the workspace, so searching
for it can only rank files by how much of somebody else's directory name they
happen to share. -
A sentence no longer ends at a filename.
.is also what a file is named
with, so splitting on a bare one turned "Faylni o'qish kerak:
tests/test_parsing.py." into a narration plus the fragment "py`" -- and a
reply stopped being narration because it had mentioned a Python file.
v0.8.0
Added
-
A turn with room to work in may now batch its tool calls. The prompt said
"one tool call per reply, wait for the result" -- a rule measured on a 14b
model at a 16,384-token window, where four results at once is four results
there is nowhere to put. Nothing else ever enforced it:extract_json_objects
has always returned every object in a reply andAgent._loophas always
iterated the list. So on a backend that reports a large window -- 400,000 for
codex, 1,000,000 forclaude-code, or a local server configured past
65,536 -- independent calls may now go out together, which is the difference
between reading four files in four round trips and reading them in one. The
ordering rule batching cannot relax is stated with it: a call that needs
another call's result waits for the next reply, so nothing edits a file in
the same breath it reads it. -
The system prompt now says how to answer, not only how to work. It
described the job in detail -- read before claiming, small verified steps,
plan a long task -- and said nothing at all about the reply, which left the
register to the model. That is most of what a user means when an agent feels
wrong: a preamble announcing the plan, a summary repeating the tool calls
they just watched happen, a whole file pasted back to make a two-line point,
a comment explaining the change to the person who asked for it, a README
nobody wanted. There is now an# Answeringsection that rules each of those
out, asks forfile:lineso a claim can be opened, and asks for a failed
step to be reported with what it printed. It sits above the tool section,
because the emission format has to stay the last thing read.
Changed
-
The language reminder no longer ends on prose. It is appended to every
request in a language that is not English, and a turn with no plan ends its
request with it -- so the last thing the model reads before generating was
four sentences about writing sentences. A small model obliges: asked in Uzbek
to study this repo,qwen2.5-coder:7banswered in fluent Uzbek having called
no tool at all, in one run out of four. The language rule is stated first
now, and the note closes on the work: if the task is not finished, the next
reply is a tool call, and when it is finished, answer. Both halves matter --
this note is appended to every request, including the one_final_answer
sends after a bounded turn has been told to stop calling tools and answer.
A closing line that named only the call contradicted that, and being last it
won: two runs out of two were recorded with no answer at all. Stated as a
judgement rather than a measured fix -- runs of the same request produce
different outcomes, so nothing at this sample size tells a prompt change from
a dice roll. -
edit_filewill no longer change a file this session has not read. An
exact-string match was the only precondition, and it is not evidence that the
model read anything: a string remembered from an earlier session, or
reconstructed from the file's name, either matches or it does not. When it
does not, the turn spends three iterations discovering that -- edit,
old_string was not found, read, edit. When it does, the edit landed in a
file nobody looked at. It now says which of the two is wrong and what to do
about it. The same record catches the other half: a file saved by somebody
else since the agent read it is refused until it is read again, because an
exact match against the part that did not move is exactly how that goes
unnoticed.write_fileis unaffected -- it states the whole file, so there is
no remembered text for it to be wrong about -- and a turn's own writes count
as having seen the file, so two edits to one file still work. -
Two more small-model rules now stop at the edge of a small window. The
loop refuses a byte-identical repeat and declares the turn stuck on the
third, and the scout searches the workspace before the model has seen the
request. Both are right at 16,384 tokens: freeing context costs the model
what it read, so a second read really is a symptom, and a 14b model that is
not handed a search will answer without doing one. Neither describes a
400,000-token window, where nothing was dropped, a second read is a choice,
and the prompt has to spend a paragraph telling the model to ignore a search
it never asked for. Above 65,536 the repeat runs and the scout is off, unless
scoutis written down -- a setting in a config file means what it says
whatever the window is.
Fixed
-
Typing while a turn ran lost what you typed. The thread watching for Esc
owns the terminal for the length of a turn, and it read every key to find
out whether it was one -- then dropped the ones that were not. So a user who
started writing their next question while waiting on a local model watched it
disappear, with no sign it had ever arrived. What is typed mid-turn is now
kept and opens the next prompt as a draft, cursor at its end, editable and
sent like anything else typed there. Enter is not carried over: it was meant
to send a message nothing was reading, and honouring it would fire the text
the instant the turn ended without the user having seen a word of it. Arrow
keys leave nothing behind, and the buffer is bounded -- this reads whatever
the terminal hands over, including a file somebody redirected into it. -
A reply that carried a whole imagined turn had all of it executed. The
prompt has always promised that a call's result comes back before the next
call is made, and the loop has never enforced it:parse_tool_callsreturns
every object in a reply and every one of them ran. So when a small model
slipped from calling a tool into narrating a session -- listing the files,
then readingpyproject.toml, then grepping, all in one reply -- the loop
ran the lot. A real turn in this repo's own workspace on
qwen2.5-coder:7bemitted twelve calls that way and came back to twelve
results at once, which is more than a 16,384-token window holds; the answer
after it was "Sorry, but I can't assist with that." A serial turn now runs
the first call and says why the rest did not: they were written before their
predecessor's result existed, so they were guesses about output the model was
never given. A turn with room to batch is unaffected -- there the calls are
meant.
v0.7.3
Added
-
The installers are tested in CI, on the shells they claim to support:
install.ps1under both Windows PowerShell 5.1 and PowerShell 7 -- which
differ in the one place it leans on, since 7.4 turned
$PSNativeCommandUseErrorActionPreferenceon by default -- andinstall.sh
on Linux and macOS. Each is parsed, analysed, and then actually run: a socket
answering/api/tagsstands in for Ollama, which is enough for the installer
to skip that whole branch, so what is exercised is every step that is
genuinely ours. Neither script had any coverage before, which is how a
PowerShell branch written on a Mac reached a release. -
BKHT_CODER_REPOinstalls a fork, a mirror, or a local checkout instead
of the published repository. It is also what lets the CI above run each
installer against the code in the pull request rather than against whatever
is already published -- including on a pull request from a fork, whose
commits the published repository has never seen.
Fixed
- The certificate retry scolded you on its way past. 0.7.2 set both
spellings of uv's system-certificate setting, on the reasoning that an
unknown environment variable is ignored where an unknown flag is fatal. A uv
new enough to have the new spelling prints a deprecation warning for the old
one, so the retry putUV_NATIVE_TLS is deprecatedin the middle of an
install that was already going badly. Which one to set is now asked of uv,
whose own help is the authority.
v0.7.2
Fixed
-
Installing behind a TLS-inspecting proxy failed with no explanation. uv
verifies against roots it bundles itself, so on a machine whose HTTPS is
re-signed by a corporate proxy or an antivirus -- where git, curl and the
browser all work --uv tool installdies fetching a Python interpreter with
invalid peer certificate: UnknownIssuer, and both installers reported only
"uv tool install failed". They now retry against the platform's certificate
store and, if that fails too, name the two other ways out
(--no-python-downloads,SSL_CERT_FILE).coder updatedoes the same.The setting is passed as an environment variable rather than a flag, in both
spellings (UV_NATIVE_TLSandUV_SYSTEM_CERTS), because the flag was
renamed between uv versions: an environment variable uv does not know is
ignored, where a flag it does not know is a hard error that would replace the
real failure with a worse one.
v0.7.1
Added
-
Hooks can be files.
agent/hooks/<event>/format.sh-- the directory names
the event, the file is the command, and a diff can review it, where the same
hook written intoconfig.jsonis a JSON string with escaped quotes in it.
Both sources fire, config first, appended rather than shadowed: a setting is
one value and the specific one wins, but a hook is a thing that happens, and a
project asking for a formatter has not asked for your own hook to stop. The
execute bit is required and a file without it is reported, because everything
in that directory is a candidate to run and a hook that silently never fires
is worse than one that was never written. -
Subagents: a delegated task handed to somebody in particular.
task
already ran a second agent, but every delegation got the same empty prompt and
the same skills -- right for "find where the registry is built", wrong for
"review this diff the way we review diffs here". A subagent is a directory
underagent/subagents/with a description to choose it by, its own
instructions, and its own skills. Its own, not the workspace's: a reviewer
that inherited every skill in the project would be the parent agent under
another name.With none written the
tasktool has the schema it always had, because a
parameter offering a choice of nothing can only be got wrong. There is no
per-subagent model: on a machine serving one, naming a second means evicting
the first to load it and evicting it back, which costs more than the
delegation saves. -
Tools a workspace writes for itself, behind two switches.
agent/tools/<name>.py, one tool per file, named for the file, exposing
TOOLortool(workspace). The tool set is short on purpose -- every extra
tool costs selection accuracy on a small model -- but that argument is about
this project's tools, not about the one integration a workspace lives inside
and otherwise reaches through a shell. A user tool'srunis wrapped, because
every other tool here promises the loop it raisesToolErrorand nothing
else, and a traceback out of one would end the turn rather than the call.This imports the workspace's Python into the agent's own process before the
first turn, which is a larger hazard than hooks. Cloning a repository must not
be enough to run it, so three things have to be true:agent/is marked with
anagent.json,agent_toolsis on (it ships off), and
--no-agent-toolswas not passed. Thendoctorand/toolsname every tool
and its file. A user tool cannot take a built-in's name -- one answering to
write_filewould take calls the permission layer had already approved under
that name, which is not a tool but a way around the gate.None of them load in plan mode or into the sub-agent behind
task, whatever
they declare.mutatinggates a built-in because this package wrote it and
knows what it does; on a user tool it is an assertion by the code it would be
gating, and a boundary the rest of the registry keeps structurally cannot be
left to the good faith of the thing on the other side of it. -
coder infosays what loaded, not only what is on disk, and/agent
prints the same view mid-session. The tree alone cannot show a skill refused
for want of a description; the summary alone cannot show which file that skill
is sitting in.
v0.7.0 — agent/ and hooks
Two directories' worth of new surface, and a row that was lying about itself.
agent/ — one directory for everything this project authors
Instructions, skills, commands and hooks each landed somewhere different, by a
rule of their own. agent/ is the floor of one rule instead — the slot a file
lands in decides how it loads — with instructions, skills, commands,
hooks, subagents and tools as the slots.
Layered, not moved. AGENTS.md, .claude/skills and .bkht-coder/commands all
still load, and agent/ goes last, where the most specific source belongs. A
workspace root needs an agent.json marker and the global root does not:
agent/ is exactly what an eve project calls its own agent, and adopting one
unasked would make its system prompt ours.
Skills gain the flat form, where the file is the skill and its path is its name.
A flat skill ships no resources — its neighbours are other skills, not its files
— so skill(resource=...) refuses one by name rather than reaching sideways
into somebody else's directory.
coder info prints the surface before anything reads from it, and doctor
reports it.
Hooks — your own commands, fired on tool events
permissions.json remembers what you allowed but cannot do anything. A
hooks block in config.json can: run the formatter after a write, refuse a
call whose shape this project never wants, kick off a build when the turn ends.
{
"hooks": {
"post_tool": ["[ -n \"$CODER_PATH\" ] && ruff format \"$CODER_PATH\""],
"pre_tool": ["scripts/gate.sh"]
}
}Three events, and only pre_tool can say no. A non-zero exit blocks the call
and what the hook printed becomes the tool result, so the model reads the
refusal and works around it — the same correction path a malformed call takes:
● write_file(vendor/lib.py)
! blocked by a hook: vendor/ is not ours to edit
post_tool fires once the call has run, including when it failed: "the write
did not happen" is exactly what a hook watching writes needs to hear. turn_end
fires once, however the turn stopped.
Context reaches a hook through the environment rather than the command line,
because a command line means quoting and quoting means a hook that silently does
the wrong thing on a path with a space in it. CODER_PATH is lifted out of the
arguments JSON on its own, because every hook anybody actually writes wants that
one value.
Bounded, and asymmetrically. Everything is timed out at 30s. A pre_tool hook
that times out blocks — it is the one place failing open is worse than
failing loudly, because a gate nobody heard from is not a gate. So does one
whose script has gone missing, since the shell answered 127. Only a machine
with no shell at all fails open, where nothing was spawned to hear from.
The sub-agent behind task gets the parent's hooks. A gate is not a gate if
delegating the read is the way around it.
Hooks are arbitrary commands out of a config file that fire without anyone
asking, so they are never invisible: doctor names every one, /context counts
them, SECURITY.md says what they are, and --no-hooks runs a session with
none.
Fixed
A fresh session's context bar read a fifth full before anything was sent.
usage_ratio falls back to estimating from the payload when the backend has not
reported a token count, and the payload includes the system prompt — so with no
messages at all it answered with the size of a prompt the model had not been
given, and /clear could not put the bar back to zero. On this repository that
was 19% before a word had been typed. It now reads 0% until there is something
in the history.
Full notes in CHANGELOG.md.
Full Changelog: v0.6.0...v0.7.0
v0.6.0
Added
-
The project's own test command, run over what a turn wrote.
verify.py
has always argued that running the model's new code to find out whether the
model's new code is safe to run is not a check -- it is the thing the check
exists to avoid. That holds for the module just written. It does not hold for
a command the user chose, wrote down, and already runs by hand: the agent
running it is not the agent deciding what to run.It runs on the answered path, the one moment a turn is known to have stopped
writing. After every write it would put the test runner inside the edit loop
and spend the iteration budget on it; here a turn that edited costs one run
and a turn that only read costs none, which is most of them. A failure goes
back as a tool result the model corrects from -- the same path a malformed
call takes -- bounded at two runs, where the first is the check and the second
is the fix being checked. The second failure asks for an account rather than a
third attempt, because a turn that ends naming the failing test is worth more
than one that ends having tried again and run out mid-edit.Four outcomes, not two. A timeout and a command that could not start are
distinct from a failure: neither says anything the model could act on, so
neither is fed back. Esc cannot reach a blockedwaitpid, which is why the
timeout is 120 seconds rather than generous -- what bounds the wait here is
the timeout, not the key.Nothing runs until
verify_commandis set, and nothing infers its way into
it.doctorsuggests one from a marker file and prints the command that
would turn it on; a baretests/directory suggests nothing, because it says
a project has tests and not what runs them.--verify-commandsets it for one
run,--no-verifyturns it off for a session without costing what was
configured, and/contextsays which it is.Two things came out of running it rather than reasoning about it. A bounded
turn never reached the check at all -- it ends through_final_answer, and a
turn that ran out mid-edit is precisely the one most likely to have left the
tests broken; it now runs there too, reported and never fed back. And the
"did this turn write anything" flag meant at some point rather than since
the last check, so a model that read a failure, correctly judged it
unrelated, and answered without editing paid for a second identical run. -
verify_commandandverifysettings.verify_commandis the one text
setting permitted to be empty: for every other one an empty value is a
session that cannot start, and refusing it puts the error on the keystroke,
but empty is exactly how this one says "run nothing". -
scripts/benchmark.py-- what a turn costs, per task: seconds, iterations,
tool calls and how it stopped, with--outto save a run and--compareto
put two of them side by side. All of it was already recorded;Outcome
carries every field and every turn writes one to the session file, and
nothing read them back. Until something did, a change to what the model is
sent could only be argued about.The backend is whatever a session would use unless one is named, so it
measures what the user runs, fallback included. The tasks are read-only,
which is the one place this differs fromtraining/generate.py: a task that
edits the tree leaves a different repository behind than it found, so the
second run of a comparison is not measuring the same work as the first, and
the change under test gets credit or blame that belongs to the edit.
Changed
grephanded a glob where a path goes now says which argument the pattern
belongs in, and writes out the call that would have worked.path not found: .github/workflows/*.ymlis true and useless -- the string was never meant to
be a path, so the model saw nothing to change and resent the same call until
the loop's bounds ended the turn. Found in a real session that spent its
whole iteration budget that way and answered from vendored workflows it had
stumbled into. A path that is simply missing says only that, as before.- A pasted image is encoded once instead of once per round trip. The provider
base64s every image on the message it sends, and a turn sends its whole
history on each of up to twenty-five iterations, so one screenshot was read
off disk and encoded twenty-five times to produce twenty-five identical
strings. Keyed on the file's identity rather than its name, so an image
re-saved at the same path is encoded again.
Measured
The first thing the benchmark was pointed at was the scout, because its own
first run kept landing on it: two read-heavy tasks both came back
1 iteration, 0 tool calls, answered, the model having answered out of the
injected search snippet without opening a file. 0.4.0 recorded that shape as a
hazard and left it there. With --no-scout to compare against, on
qwen2.5-coder:14b:
task with scout without
what does the agent loop do when
a tool call is malformed? 112.6s 1 iter 167.6s 1 iter
which module decides whether a
tool call needs permission? 43.3s 1 iter 309.6s 3 iters, 2 calls
total 155.9s 477.2s (+206%)
So the snippet is not only a shortcut past reading -- it is the difference
between one round trip and three, and on the second task it saved four and a
half minutes. That is the opposite of what "hazard" suggests, and it is worth
having the number before anyone reaches for the lever.
Two limits on the reading, stated because the figure invites more weight than
it can carry. It is two tasks on one machine, and this one is spilling 1 GB of
KV cache to CPU, so the per-turn cost is high and its variance with it. And the
benchmark measures what a turn costs, never whether it was right -- the first
task answered a question about the agent loop without opening a file in either
arm, which is fast in both and only useful if the answer is true. Correctness
is a different instrument, and this is not it.
Two other candidates were built, measured and dropped, which is the more useful
half of the result:
- Running a round's tool calls concurrently. The protocol is one call per
reply and says so in the prompt; across 558 sessions on this machine, 187 of
189 replies carrying a call carried exactly one. Concurrency in the loop
would apply to 1% of rounds, so it was not added. - Caching the workspace read that scouting does before every turn. Built
and measured at 8% of scout on this repository -- 94 ms to 87 ms -- because
reading is not where scout's time goes; the per-line regex scan is, and that
depends on the terms, which change every turn. Seven milliseconds against an
eleven-second turn does not pay for a cache that can serve a stale file, so
it was reverted.
The image change was kept on the opposite reasoning: 4.2 ms to 0.012 ms on the
repeated call, and unlike the scout cache its saving grows with the file rather
than staying a fixed fraction of it.
v0.5.0
Added
-
An OpenAI-compatible backend, and it is now the default.
mlx_lm.server,
llama.cpp'sllama-server, vLLM and Ollama's own/v1all take
POST /v1/chat/completions, so one backend covers every way a model gets
served on hardware somebody owns -- including the fine-tune this project is
heading for, which Ollama cannot host without being taught about it first.
The promise was never Ollama; it is that the weights stay on a machine the
user controls, andlocalpoints at localhost, so it holds unchanged.
Pointing it at another machine on the network is the arrangement the
fine-tune needs: the Mac with the memory serves, everything else drives.Three places a naive port breaks, each with a test: the stream is SSE and
ends with a literal[DONE]that is not JSON; tool-call arguments arrive as
a string split across deltas keyed by index, so appending rather than
assigning is load-bearing; and usage appears at all only with
stream_options.include_usage. -
coder dataset-- a training corpus built out of the agent sessions
already on the machine. coder's own, Claude Code's and Codex's, read into one
shape and written asmlx_lm.loratakes it.Translation is the substance rather than the plumbing. A model trained on
Read(file_path=)learns a call coder has no tool for; mapped to
read_file(path=)it learns the one that exists. So the live registry
decides what an argument is, not a table; parallel calls are serialised into
coder's one-call-per-reply protocol; narration before a call is dropped,
because under a protocol that says a call reply is the JSON and nothing else
it is a worked example of the forbidden thing in the position a model
imitates most readily; and harness furniture goes with it. Length is handled
the way the loop handles it -- results capped at coder's own output budget,
and an over-long example elided bycontext.elide_tool_resultsitself, which
took the corpus from 33 examples to 148 without truncating one. Every
rendered call is parsed back throughparsing.parse_tool_calls, and one that
does not survive is dropped: a fine-tune whose calls coder cannot read is
worse than none. -
A training pipeline under
training/-- a LoRA on a 4-bit 14b, fused
into one directory and served on0.0.0.0. Every number inlora.yamlis a
memory decision before it is a quality one, and the README says which to turn
first when a run does not fit rather than leaving it to be discovered three
hours in.max_seq_lengthanddataset build --max-tokenshave to agree,
and the comment in both places says so.mlx-lmis an optional extra: the
machine that trains a model is not the machine that runs one. -
The prompt and the outcome are written to the transcript. A transcript is
only a training example if the input half survives, and the input half is the
system prompt -- assembled per session from the registry, the tree, the
instructions and the skills, and reconstructable from none of them later. A
resumed session appends a secondpromptrecord rather than replacing the
first, so a file spanning two tool sets says so in order. Beside it, an
outcomerecord per turn, because the message list cannot tell a turn that
answered from one that hit the iteration cap, and anything choosing
trajectories to imitate needs exactly that difference. Recorded, never
replayed: resume still rebuilds against the tools it has now. -
A fallback to Ollama when nothing is serving the default. A first session
that fails to connect to a server nobody was told to start teaches nothing
except that this does not work. Only the built-in default falls back --
--provider localagainst a dead server stays an error, and so does one
pinned in a config file, because quietly answering with a different model
than the one somebody typed is the worse failure. Announced on every path,
never silent.
Changed
-
A bare
pytestno longer runs the live tests. Thelivemarker already
existed and was already applied; what was missing was a default, so the
command CONTRIBUTING tells you to run before a commit collected the model-
backed suite along with everything else.pytest -m liveruns them, and
pytest reports the deselected count on every run, so nothing is skipped
quietly. -
doctorchooses its checks by what a backend is rather than by whether it
is the one listed first. The oldprovider != DEFAULT_PROVIDERtest read
correctly only for as long as the default happened to be Ollama; with the
default moved it inverted exactly, checking Ollama for a command on PATH and
asking the new default for/api/tags.localgets three checks where
Ollama gets four -- the missing one is placement, and it stays missing,
because the OpenAI API has no notion of where a model is resident and this
file already spent a release learning not to invent that number. -
for_reviewasks whether a backend can turn sampling off instead of what
type it is. Determinism is a property a backend either offers or does not,
and theisinstancecheck silently stopped applying the moment the default
moved. -
coder config's declared defaults for model and host now come from the same
table_follow_providerreads, so it cannot show a model the session is not
running.
Measured
Three full runs of the old default, on qwen2.5-coder:14b: 41, 46 and 49
minutes. The same tree with the live tests deselected: 9.1 seconds, 1372
passed. Coverage is identical -- 11 tests moved from "run by default" to "run
on request", and the slowest test remaining in the default arm takes 1.0 s.
Where the 46 minutes went, from --durations:
1118s test_review_corpus.py::test_recall_on_planted_bugs
787s test_review_corpus.py::test_precision_on_clean_code
297s test_live.py::test_reads_the_file_instead_of_asking_for_it
222s test_live.py::test_fixes_a_real_bug_and_the_fixed_code_runs
171s test_live.py::test_answers_a_question_by_reading_the_code
Five tests, 45 of the 46 minutes.
v0.4.0
Added
- A
plantool: a short numbered list the model writes and ticks off. It is
kept on the session rather than in the message history, so the two things
that free context — summarising and eliding — cannot take it, and it is
appended to every request. A turn whose history has just been compacted still
reads its own list before it decides what to do next. Persisted, so
--resumeresumes the plan; dropped by/clear; shown in full in the
transcript and by/context; and kept in plan mode's read-only tool set,
because producing a plan is what plan mode is for. - A
tasktool: one self-contained question handed to a second agent with its
own session, a read-only tool set, and its own clock — three minutes and
eight round trips. Only its prose comes back, so the files it read cost the
parent nothing. It cannot write, run commands, delegate further, or touch the
parent's plan. Its tool calls are shown as they happen; its prose is not, so
it cannot stream into the middle of the parent's answer. Esc reaches it. planninganddelegationsettings, both on, with--no-planningand
--no-delegationto match.
Measured
The tool set is small on purpose: the registry's standing claim is that every
extra tool measurably costs selection accuracy on a small model. Two were
added, so the claim was tested rather than waved at.
Twenty-four single-tool requests against qwen2.5-coder:14b at temperature
0.1, scoring the first call each one makes, with nine tools and then with
eleven. Both arms chose identically on all twenty-four — including the six
where both disagreed with the answer key, preferring list_files to glob
and codebase_search to grep. Neither arm produced an unparseable call, and
on a single-file request the two replies were byte-identical at 22 completion
tokens. The extra tools cost nothing in selection here.
What they do cost is prompt. The system prompt grows from 9,038 to 10,425
characters, about 347 tokens, or 15% — roughly 2% of a 16k window, paid on
every request. Wall-clock was not attributable to the tools: the per-call
spread on this machine, 3.5–11.4s for the same request, is far wider than any
difference between the arms.
Known: the opening search suppresses both tools
Delegation fires when the automatic workspace search does not run, and does not
fire when it does. Asked to summarise a module and say who calls it,
qwen2.5-coder:14b under --no-scout called task and got its answer from a
sub-agent that read the files; the identical request with the search block
present was answered straight out of the search snippet, with no file opened
and no tool called.
This is the scout's own long-standing hazard rather than something these tools
introduced — a 7b does the same thing without them, answering from the snippet
and reading nothing — but it is what decides how often either new tool is
reached for, so it is stated here rather than left to be discovered. --no-scout
is the lever today. A footer reworded to tell the model to read before it
answers, not only before it changes anything, was tried and did not shift the
behaviour; it was reverted rather than shipped unvalidated. Making the two
features agree is the next thing to look at.