graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Prepare v0.302.57 release
Rach Pradhan7aa7c309f2ad
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b868fa82..d484c2eb 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,17 @@ The release workflow uses a tag's section here as its release notes (ahand-written `docs/releases/<tag>.md` wins if present), so keeping this filecurrent is part of cutting a release.+## v0.302.57++- Images are typed by their bytes rather than their file extension. A WebP saved as `.png` is sent as WebP, and a file that is not PNG, JPEG, GIF, or WebP is refused before it reaches the transcript instead of failing every later turn (#1762).+- A turn that fails before any reply records the failure in history, so resending the same prompt makes a new request instead of being skipped as a duplicate. The boundary is saved with the session (#1729).+- Streams that carry only an error event surface the provider's error type and message on every wire instead of being retried as truncated bodies; deterministic invalid-request errors are no longer retried (#748).+- Checklist items the user withdrew or delegated can be marked `cancelled` with a required, visible reason, and the completion gate accepts them without counting them as verified. An `ask_user` answer counts as the user's scope change (#1520).+- ACP clients receive `session_info_update` as soon as `workspace use` moves the session, with the new folder as `_meta["graff/cwd"]`, so client-served tools can follow the switch within the same turn (#1737).+- Retained workers remember the folder their checkpoint was saved under, so `subagent_resume` still finds it after a workspace switch; refusals now explain what happened and what to do (#1724).+- The repeated-tool-call guard no longer counts polls of a background subagent that is still running (#1706).+- Retains all changes from v0.302.56.+## v0.302.56- Native file tools can follow dependency symlinks whose targets remain inside their selected tool root. Reads, directory listings, edits, and writes share the same confinement policy.diff --git a/docs/releases/v0.302.57.md b/docs/releases/v0.302.57.mdnew file mode 100644index 00000000..60a48e61--- /dev/null+++ b/docs/releases/v0.302.57.md@@ -0,0 +1,13 @@+# v0.302.57++Reliability fixes for images, failed requests, streamed errors, and long-running sessions.++- **Images are typed by their bytes.** `read_image`, `/image`, paste, ACP and MCP image blocks, and JSON image input detect PNG, JPEG, GIF, and WebP from the file's contents. A WebP saved as `.png` is sent as WebP. A file that is none of these is refused before it is queued, so a mislabelled screenshot can no longer leave a block in the transcript that fails every later turn (#1762).+- **Retrying after a failed request works.** A turn that fails before any reply now ends with a `[request failed: …]` marker in history, saved with the session. Resending the same prompt makes a new request; a genuine duplicate submission of a pending prompt is still skipped (#1729).+- **Streamed error events surface as errors.** An SSE body holding only an error event is reported with the provider's error type and message on chat-completions, Anthropic Messages, OpenAI Responses, and Gemini Interactions, instead of failing reassembly and being retried as a truncated response. Invalid-request errors are not retried; overload and server errors keep their bounded retry (#748).+- **Withdrawn checklist items can be closed.** `todo_write` accepts `cancelled` with a required `reason` for work the user withdrew or delegated. The item stays visible as `[-] item (cancelled: reason)`, is never counted as verified, and no longer blocks completion. A verification item can be cancelled after a newer user message or an `ask_user` answer (#1520).+- **Workspace switches reach ACP clients immediately.** `session_info_update` is sent right after the `workspace` tool moves the session, and carries the session's absolute folder as `_meta["graff/cwd"]` (#1737).+- **Retained workers survive a workspace switch.** `subagent_resume` finds a retained worker's checkpoint under the folder it was saved in, and refusals explain whether the id is malformed, the checkpoint is missing, or the worker is still running (#1724).+- **Polling a running subagent is not a repeat.** The identical-tool-call guard skips `agent_output` snapshots that report a subagent still running (#1706).++Includes all changes from v0.302.56.diff --git a/scripts/eval/tier1-manifest.json b/scripts/eval/tier1-manifest.jsonindex 802ab73d..420c54f8 100644--- a/scripts/eval/tier1-manifest.json+++ b/scripts/eval/tier1-manifest.json@@ -14,7 +14,7 @@"src/main.zig","src/repl.zig"],- "test_count_baseline": 3517,+ "test_count_baseline": 3542,"test_count_slack": 25,"required_invariants": [{diff --git a/src/agent_ws_test.zig b/src/agent_ws_test.zigindex eb0aee73..5ec85476 100644--- a/src/agent_ws_test.zig+++ b/src/agent_ws_test.zig@@ -95,9 +95,9 @@ test "the codex .responses arm refreshes auth and re-anchors before resending (#try std.testing.expect(std.mem.indexOf(u8, src[arm_end..], "retryAfterAuthRefresh(self, msg, &auth_refreshed)") != null);// response.failed uses the shared transient retry, then the gateway-artifact retry.- try std.testing.expect(std.mem.indexOf(u8, arm, "policy.afterServerErrorOrParseReject(self, \"\", failure.code, msg, &server_retries, &gw_retry)") != null);+ try std.testing.expect(std.mem.indexOf(u8, arm, "policy.afterServerErrorOrParseReject(self, failure.etype, failure.code, msg, &server_retries, &gw_retry)") != null);const overflow_at = std.mem.indexOf(u8, arm, "recoverContextOverflow(self, msg, failure.code, &context_retried)") orelse return error.ResponsesPathHasNoOverflowRecovery;- try std.testing.expect(overflow_at < std.mem.indexOf(u8, arm, "policy.afterServerErrorOrParseReject(self, \"\", failure.code, msg, &server_retries, &gw_retry)").?);+ try std.testing.expect(overflow_at < std.mem.indexOf(u8, arm, "policy.afterServerErrorOrParseReject(self, failure.etype, failure.code, msg, &server_retries, &gw_retry)").?);const gate = @embedFile("agent_gateway_retry.zig");try std.testing.expect(std.mem.indexOf(u8, gate, "retryTransientServerError(self, etype, code, msg, server_retries)") != null);diff --git a/src/cli_text_source.zig b/src/cli_text_source.zigindex 3ec0dacf..ad3906c6 100644--- a/src/cli_text_source.zig+++ b/src/cli_text_source.zig@@ -5,6 +5,12 @@pub const changelog_text =\\What's new\\──────────+ \\0.302.57+ \\ • images are typed by their bytes, so a mislabelled file no longer wedges a chat+ \\ • resending a prompt after a failed request makes a new request+ \\ • stream error events surface the provider's error instead of retrying+ \\ • withdrawn checklist items can be cancelled with a reason+ \\\\0.302.56\\ • native file tools follow dependency symlinks that stay inside the workspace\\ • escaping, dangling, and cyclic links remain blocked