Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Release v0.0.302.19

justrachd353c5eeecf2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4123a563..c39a04aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,29 @@ The release workflow uses a tag's section here as its release notes (a
hand-written `docs/releases/<tag>.md` wins if present), so keeping this file
current is part of cutting a release.
+## v0.0.302.19
+
+### Speed and cost
+
+- Tool results come back inline up to 64 KiB instead of 16 KiB, so a whole-file read of an ordinary module arrives in one piece instead of as a handle preview the model pages through. The threshold is still clamped to half the context window, `GRAFF_TOOL_HANDLE_BYTES` still overrides it, and the codedb small-read exemption follows the same number (ADR 0251, #1502).
+- A commentary heads-up no longer tightens the stall budget. The server holds such a heads-up open while the model composes a batch of tool calls and releases the calls together, so a long compose was cut off as a stall and generated again. Final-answer prose still tightens the budget, on the WebSocket and SSE readers alike (ADR 0248, #1497).
+- A spec task ends at its own tests. The work note no longer says a green public test is not the whole spec, a sentence that made the model write a second, ad-hoc check script after the task's tests passed (ADR 0249, #1498).
+- Logged in to Codegraff, graff asks Jev for a turn's effort itself, alongside the turn's first request, when the turn starts at the session's default effort on a model Jev serves; GPT-6 on the ChatGPT-plan sign-in is now one of them. The pick applies from the turn's next request, holds for that turn only, and never overrides an effort you chose. Jev sees a summary built locally with code, paths, file names and identifiers removed. `GRAFF_JEV_AUTO=0` turns it off (ADR 0246, #1494).
+
+### Terminal
+
+- Parked background work is named above the prompt: `↻ waiting on <work> — graff continues when it finishes` while a shell command or agent whose exit wakes the session runs, and `↻ <command> exited 0 — continuing` when it resumes. Before, the yield printed a generic line and a parked turn read as graff stopping mid-task (ADR 0247, #1496).
+
+### Pull requests
+
+- PR publication is no longer gated. `gh pr create` and `gh pr ready` run like any other command: no local-check, head-CI or claim-review preflight, no wait on pending CI, and a draft completes like any other task. A mutation of a branch, issue or PR that another live session has claimed is still refused. Sessions saved by earlier versions still load, and their recorded publication state is ignored (ADR 0250, #1500).
+
+### Build and tests
+
+- graff builds with the stable Zig 0.17.0 release: build.zig.zon, CI, `install.sh` and the cloud-agent installer all pin it. `graff learn init` no longer hangs on Windows (#1493).
+- `graff learn init` pins evaluator programs up to 256 MiB, which leaves room for the Linux debug build (#1501).
+- Two integration tests no longer race the removal of their temporary directories (#1499).
+
## v0.0.302.18
### Terminal UI
diff --git a/docs/releases/v0.0.302.19.md b/docs/releases/v0.0.302.19.md
new file mode 100644
index 00000000..dcd0cb94
--- /dev/null
+++ b/docs/releases/v0.0.302.19.md
@@ -0,0 +1,157 @@
+# Codegraff v0.0.302.19
+
+This release cuts the time graff spends on real repository work. Tool results
+come back inline up to 64 KiB, a heads-up before a batch of tool calls no
+longer trips a false stall, and a spec task ends at its own tests. It also
+names parked background work above the prompt, removes the PR readiness gate,
+and builds with the stable Zig 0.17.0.
+
+## Evals
+
+Measured with this release's binary against v0.0.302.18 and Pi 1.0 with its
+codemode, on a ChatGPT plan, with graff logged in to Codegraff as it is for its
+users. Arms are interleaved. Cost is the list price of each run's tokens; Jev's
+own charge is added at its real price.
+
+### Real fixes in the graff repository
+
+Two merged graff pull requests (#195 and #726) replayed from their parent
+commits on gpt-6.1-sol, one run at a time: three runs of #195 and two of #726
+per arm. Every run ends with the repository's full `zig build test`, so most
+of the time is the build.
+
+| | Pass | Wall per run | Median | List cost per run | Cache hit |
+| --- | ---: | ---: | ---: | ---: | ---: |
+| **v0.0.302.19** | 5/5 | **180.8s** | 171.5s | $0.064 | **85%** |
+| Pi 1.0 + codemode | 5/5 | 197.5s | **160.2s** | **$0.046** | 56% |
+
+One graff run was graded a second time because its first grading hung in an
+unrelated test of the repository; its fix matched the other runs and passed.
+graff was faster on #726 (201.6s against 262.6s) and Pi on #195 (154.1s
+against 167.0s). graff reads whole source files into its context, so it costs
+more here. In #1502's own comparison on these tasks, the 64 KiB threshold took
+graff from 191.8s to 172.3s per run.
+
+### Standard tasks
+
+11 tasks (five MCP tasks, a git digest and five solo coding tasks), 3 runs each,
+8 at a time. Every arm passed every run.
+
+**gpt-6.1-sol**
+
+| | Pass | Wall per task | Median | List cost per task | Cache hit | Output tokens per task |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: |
+| v0.0.302.18 | 33/33 | 36.1s | 29.2s | $0.0204 | 88.1% | 692 |
+| **v0.0.302.19** | 33/33 | **35.8s** | **27.8s** | **$0.0191** | **89.4%** | 710 |
+| Pi 1.0 + codemode | 33/33 | 39.4s | 33.2s | $0.0292 | 45.6% | 624 |
+
+**gpt-6-astra**
+
+| | Pass | Wall per task | Median | List cost per task | Cache hit | Output tokens per task |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: |
+| v0.0.302.18 | 33/33 | 43.0s | 36.2s | **$0.109** | **92.5%** | 778 |
+| **v0.0.302.19** | 33/33 | **41.8s** | **33.3s** | $0.117 | 90.1% | 750 |
+| Pi 1.0 + codemode | 33/33 | 42.4s | 34.7s | $0.138 | 57.1% | 659 |
+
+### Spec tasks
+
+Seven tasks graded by hidden spec checks, 3 runs each, 8 at a time. No arm
+passes `json-stream`, so 18/21 is every arm's score.
+
+**gpt-6.1-sol**
+
+| | Pass | Wall per task | Median | List cost per task | Cache hit | Output tokens per task |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: |
+| v0.0.302.18 | 18/21 | **38.8s** | 38.6s | **$0.0220** | **90.8%** | 751 |
+| **v0.0.302.19** | 18/21 | 40.0s | **35.8s** | $0.0247 | 88.8% | 777 |
+| Pi 1.0 + codemode | 18/21 | 41.4s | 40.6s | $0.0245 | 41.7% | 777 |
+
+**gpt-6-astra**
+
+| | Pass | Wall per task | Median | List cost per task | Cache hit | Output tokens per task |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: |
+| v0.0.302.18 | 18/21 | 48.0s | 46.5s | $0.125 | **93.5%** | 877 |
+| **v0.0.302.19** | 18/21 | **43.2s** | **39.1s** | $0.128 | 91.7% | 761 |
+| Pi 1.0 + codemode | 18/21 | 48.3s | 42.1s | **$0.111** | 60.5% | 921 |
+
+This release has the lowest median in every suite. Jev chose the default
+effort in every standard-task run. On the spec tasks it chose high effort for
+`config-parse` in five of six runs and for `map-conflict` in three. The
+`map-conflict` runs were no slower, but on gpt-6.1-sol the `config-parse` runs
+took 57s against 41s at the default effort with the same result, which accounts
+for this release's gap to v0.0.302.18 on that suite.
+
+## Large files arrive in one read
+
+A tool result over the inline threshold comes back as a handle with a preview,
+and the model reads the rest in pages. The threshold was 16 KiB, so a
+whole-file read of an ordinary 600-line module (20 to 35 KB) came back as a
+preview, and the model spent extra round trips paging through it. The default
+is now 64 KiB. It is still clamped to half the context window, so small
+windows keep their bound, and `GRAFF_TOOL_HANDLE_BYTES` still overrides it
+([ADR 0251](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0251-tool-results-inline-up-to-64-kib.md)).
+
+## No false stalls before a batch of tool calls
+
+v0.0.302.18 gave the full stall budget back once a heads-up's output item
+closed (ADR 0241). The server holds a commentary heads-up open while the model
+composes a batch of tool calls and then releases the close and all the calls
+together, so the item closed only after the compose. A batch that took longer
+than the tightened budget was cut off as a stall and generated again.
+Commentary prose now counts as visible text but leaves the full budget in
+place; final-answer prose tightens it as before, on the WebSocket and SSE
+readers alike
+([ADR 0248](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0248-commentary-prose-does-not-tighten-the-stall-budget.md)).
+
+## A spec task ends at its own tests
+
+The work note told the model that a green public test is not the whole spec.
+On spec tasks the model then wrote a second, ad-hoc check script after the
+task's own tests passed. Paired runs passed the same tasks without the
+sentence, so it is gone
+([ADR 0249](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0249-a-spec-task-ends-at-its-own-tests.md)).
+
+## Jev picks each turn's effort
+
+Logged in to Codegraff, graff offered GPT-6 and MiMo v2.6 models the
+`jev_effort` tool, and in eval runs they never called it. graff now asks Jev
+itself when a turn starts at the session's default effort, alongside the
+turn's first request, so it adds no wait; the pick applies from the turn's
+next request. GPT-6 on the ChatGPT-plan sign-in is now eligible. The pick
+holds for that turn only, is never saved, and never overrides an effort you
+chose. Jev sees a summary built locally from the request with code, paths,
+file names, URLs, emails and identifiers removed. `GRAFF_JEV_AUTO=0` turns it
+off
+([ADR 0246](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0246-jev-picks-each-turns-effort-alongside-the-first-request.md)).
+
+## Parked work is named above the prompt
+
+A shell command that outlives the interactive wait parks and hands the prompt
+back; its exit wakes the session, which continues on its own. The prompt used
+to come back under a generic line, and a parked turn read as graff stopping
+mid-task. While such work runs, the prompt now shows
+`↻ waiting on <work> — graff continues when it finishes`, and a wake prints
+`↻ <command> exited 0 — continuing` before the turn resumes
+([ADR 0247](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0247-parked-work-is-named-above-the-prompt.md)).
+
+## PR publication is not gated
+
+`gh pr create` and `gh pr ready` used to go through a readiness preflight:
+successful local checks, passing head CI with a wait on a pending run, a model
+review of the PR body's claims, and an obligation that held back completion
+until the head's checks passed. They now run like any other command, and a
+draft completes like any other task. Whether a PR may merge with red or
+pending CI is the repository's call, made by its branch protection and review.
+A mutation of a branch, issue or PR that another live session has claimed is
+still refused
+([ADR 0250](https://github.com/justrach/codegraff/blob/v0.0.302.19/docs/adr/0250-pr-publication-is-not-gated.md)).
+
+## Build and tests
+
+- graff builds with the stable Zig 0.17.0 release; `build.zig.zon`, CI,
+ `install.sh` and the cloud-agent installer all pin it. `graff learn init` no
+ longer hangs on Windows (#1493).
+- `graff learn init` pins evaluator programs up to 256 MiB, which leaves room
+ for the Linux debug build (#1501).
+- Two integration tests no longer race the removal of their temporary
+ directories (#1499).
diff --git a/src/cli.zig b/src/cli.zig
index 87696976..2123a71a 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -23,6 +23,13 @@ const update_target = @import("update_target.zig");
pub const changelog_text =
\\What's new
\\──────────
+ \\0.0.302.19
+ \\ • tool results inline up to 64 KiB: large files read in one piece
+ \\ • no false stalls while the model composes a batch of tool calls
+ \\ • parked work is named above the prompt; graff says it will continue
+ \\ • PR commands run like any other command (no readiness gate)
+ \\ • logged in, Jev picks each turn's effort alongside the first request
+ \\
\\0.0.302.18
\\ • graff tui launches the separate fullscreen client; terminals get the line REPL
\\ • shorter turns: one-line heads-ups, no recomputed answers, fewer false stalls