# Changelog Versioning: **MAJOR** for API-breaking changes, **MINOR** for features that do not break the interface, **PATCH** for bug fixes. "Interface" means: CLI flags and their meaning, the session file format, the config file, and the tool schemas the model sees. Anything a script or a resumed session could depend on counts as API. ## 0.6.2 ### Fixed - Resizing the terminal duplicated the prompt: the terminal had already reflowed the block, and the editor then drew a second copy below it. The editor now emits nothing on resize and only recomputes where the caret sits, so the next redraw lands on the reflowed block. - `scripts/ux-check.sh` now also covers narrowing a pane while typing. ## 0.6.1 ### Fixed - The redraw moved up by the number of rows the prompt block occupied, but the caret can be on any of those rows. With a two-line prompt and the caret moved up (Home, Left, Up-history), the next redraw overshot by a row and cleared the line above the prompt — usually the model's previous output. The editor now tracks which row the caret is on and moves up by that. - Added `scripts/ux-check.sh`: drives the editor inside tmux and asserts on the rendered screen. Byte-level tests could not see this class of bug. ## 0.6.0 ### Added - `--show [ID]`: renders a transcript — user turn, reasoning, assistant text, every tool call with its arguments, and each result — instead of requiring `cat` on the JSONL. Reads without locking, so it works while a session is open. - The status line now summarises the turn: writes, commands and denials. - Sessions record the harness version that wrote them and the model in use; a model switch appends a record so `--list` shows the current model rather than the one the session started with. Resuming with a different binary warns that the prompt and tool schemas may differ. ### Changed - `--yolo` is refused in `$HOME` and `/` unless `AGENT686_ALLOW_HOME=1` is set. The documented undo is git, and neither of those is a checkout. ## 0.5.3 ### Fixed - Two processes could append to the same session and interleave messages, which corrupts a transcript permanently. A session now takes an exclusive `flock` and the second process is told the session is already open. - `edit` on a file that is not valid UTF-8 failed with a raw codec error after reading it; it now says so up front and points at `bash`. Files over 64 MiB are refused the same way, instead of failing mid-rewrite on the 32-bit target. - The line editor counted every character as one column, so CJK text, combining marks and pasted tabs put the caret in the wrong place. Widths now come from `unicode-width`, with tabs expanded to the next multiple of eight. - A terminal resize during editing left the redraw's row count stale and could erase output above the prompt; the editor now starts a fresh prompt line. ## 0.5.2 ### Fixed - A prompt that exactly filled a terminal row made the next redraw move up one row too many and erase the line above it, which is usually the model's previous output. Terminals wrap lazily: filling the last column leaves the cursor in that column until the next character. The layout now models that, and is unit-tested at the boundary. - Reasoning and the answer could be written on the same line, because a reasoning stream does not always end with a newline. The renderer now closes the reasoning block on its own line, and does not add a blank line when the reasoning already ended with one. The renderer is generic over its writer, so this is tested. ## 0.5.1 ### Fixed - Every start on the target printed `weak version 'GLIBC_2.39' not found`. Rust's std references glibc 2.39's `pidfd_spawnp`/`pidfd_getpid` weakly; the dynamic linker still warns. They are now defined as absolute zero for the i686 target, which removes the version need and leaves the fallback path unchanged. ## 0.5.0 ### Added - The step number is printed on every tool line (`● [3] bash …`), so the progress of a long turn is visible while it runs rather than only at the end. - `docs/KNOWN-ISSUES.md` records the defects found in review that are understood and deliberately deferred. ### Changed - One HTTP client per turn instead of one per step, avoiding a TLS handshake on every request. - Documentation corrected where it had drifted: binary size, test count, `grep` semantics, input handling, instruction scope, and the settled API questions. ## 0.4.5 ### Fixed - `--session ../escape` wrote outside the sessions directory; ids are now validated as 1-64 characters of `A-Za-z0-9._-`. - A flag with no value was silently ignored, and `--session` with an empty value quietly created a new session. Both are usage errors (exit 2) now. - `--` ends option parsing, so a prompt can start with `-`. - `--continue` with `--session`, and `--list` with `--doctor`, are rejected instead of one silently winning. - Unknown-flag output went to stdout; usage now goes to stderr. - `--doctor` sent an empty `x-opencode-session`, which the gateway rejects, so a healthy key could look broken. It now sends a throwaway id. - Resuming a session from a different directory gave the model the old `cwd` and branch without saying so; the session records its starting directory and now warns when it does not match. - `AGENTS.md` was read all the way to `/`, so a stray file in a shared parent would be injected into every project. Reading now stops at the git root, and outside a repository only the working directory itself is read. - Typeahead typed during streaming could answer the following approval prompt. - Colour is now disabled by `NO_COLOR` and `TERM=dumb`. - Ctrl-C during an approval prompt now denies instead of appearing to hang. ## 0.4.4 ### Fixed - `read` refused only directories; a FIFO or device would block the single-threaded harness forever. It now requires a regular file. - `read`'s `offset` was cast from `u64` to `usize`, which wrapped on 32-bit builds and produced wrong line numbers. Out-of-range values are now an error. - `write` truncates in place, so a crash or full disk could destroy the original. It now writes a temporary file and renames, and preserves the file mode. - `edit` applied the snapshot taken before the approval prompt, silently discarding anything written in between. It now re-reads and re-checks at apply time and refuses if the text is no longer unique. - `edit` reported "not found" for CRLF files, because the carriage returns are invisible in `read` output. Matching now retries with normalised line endings and writes back in the file's own style. - `grep` on a nonexistent path said "no matches", implying the symbol was absent; it now errors. It also reports how many files it skipped as too large or binary. - `glob` now includes symlinked files (symlinked directories are still skipped, to avoid loops). ## 0.4.3 ### Fixed - `bash` timeouts killed only the direct `sh`, leaving `make`, `cargo` or `sleep` running on the 2-core box. The command now runs in its own process group and the whole group is killed on timeout or on Ctrl-C. - `bash` output was unbounded on disk while being truncated on read; the child now has a 64 MiB file-size limit and reports when it hit it. - A long-running command can now be stopped with Ctrl-C instead of waiting out the 120 s timeout. - `OPENCODE_API_KEY` was inherited by every command, so a failing build that dumped the environment would put the key in the transcript and send it back to the provider. It is removed from the child environment. - Session files are created `0600` and their directories `0700`; older `0644` files are tightened on open. History is `0600` and its file is trimmed. - `--doctor` warns when the key file is readable by other users. ## 0.4.2 ### Fixed - A stream that ends without `[DONE]` or a `finish_reason` is now an error, not an empty or truncated answer. A provider returning ordinary JSON to a streaming request used to be recorded as an empty assistant message; a dropped connection mid-answer used to be recorded as a finished one. - A tool-call delta without `index` no longer loses the whole call, and non-contiguous indexes no longer invent an empty call. - A final `data:` frame with no trailing newline is processed instead of dropped. - Malformed frames are counted and reported instead of silently swallowed. ## 0.4.1 ### Fixed - Aborting a step that announced several tool calls used to leave the remaining calls unanswered, which the provider rejects and which made the session permanently unresumable. Remaining calls now get an "aborted" result, and sessions opened in that state are repaired by appending the missing results. - A Ctrl-C pressed after a turn finished could abort the next prompt; the flag is cleared when a turn starts. - `run_turn` cleared the global cancel flag rather than the one it was given. - One-shot mode now exits 130 when aborted and 3 when a tool call was denied, instead of 0 for both. - `bash` approval offered `[y/N/a]` but treated `a` as "no"; it now offers `[y/N]`, matching its documented every-call behaviour. - A non-terminal stdin now says up front that writes and commands will be denied. ## 0.4.0 ### Changed - `grep` takes a regular expression instead of a literal string, matching what coding agents expect from a search tool. An invalid pattern explains itself and points at `fixed`. - `grep` accepts `fixed: true` to match literal text, e.g. when searching for `a+b` or `foo(`. ## 0.3.0 ### Added - `--version`. - `--doctor`: reports the version and target, where the key came from, whether the sessions directory is writable, the provider and model, and then checks the key against `GET /models` and confirms the model id is actually listed. Exits non-zero if any check fails, so it can gate a deployment. It tolerates a missing key so the report is the thing that tells you the key is missing. ## 0.2.0 ### Added - `read` streams instead of loading the whole file. It seeks to `offset` with a buffered reader and consumes long lines without keeping them, so memory stays flat: 16 MB RSS reading a 200 MB file at any offset, 0.8 s to reach line 999,000. - Single lines longer than 4 KiB are clipped and marked `…(line truncated)`. ### Changed - The truncation marker is now `… more lines; continue with offset=N`. ## 0.1.0 Baseline: the harness as first built, before versioning was defined here. - Streaming provider client for OpenCode Go (`chat/completions`), stable `x-opencode-session` header, retry with backoff. - Append-only JSONL sessions, `--continue`, `--session`, `--list`. - Six tools: read, write, edit, bash, grep, glob. - Approval: first edit of a session with a diff, every bash call. - Line editor with history and bracketed paste. - i686 release gate: `GLIBC_2.34` required, verified on `linux/386 debian:12`.