Repository navigation
v0.44.3
This patch release fixes a 0.44.2 regression that broke the historian and the sidebar for home-directory sessions with allow_home_project: true (#570). It also declares Pi's host packages the way Pi 0.90 and later expect (#571), lets OpenCode 2 run the historian and dreamer from a second directory of the same project (#566), keeps the host's error when an OpenCode 2 hidden run fails (#568), stops historian admission from reserving output room twice on models with a separate input limit (#567), removes repeated writes after each history write (#569), and keeps the host responsive while a turn waits for a busy database.
Upgrading
- No schema change. The database stays at v91, so hosts on 0.44.0, 0.44.1, 0.44.2 and 0.44.3 can share it and no coordinated restart is needed.
- OpenCode 2 does not install plugin updates on its own. Open
/plugins, select Magic Context and press ctrl+u, or runopencode plugin update. - Rust transform mode: the historian input-limit fix (#567) and the module's token log lines are in the
ck-mcmodule and apply after a module update and restart. Update the module as usual. The rest of this release is in the npm package.
Home directory sessions (#570, @dhaern)
allow_home_project: trueworks again outside the session path. 0.44.2 added the home-directory check to every project identity lookup, but only the session path passed your setting. With OpenCode started in the home directory, the historian, memory promotion, recomp, the sidebar and some status views failed with "Home project memory is disabled; set allow_home_project to opt in", and the historian wrote no new compartments. The setting is now read once from config at startup on OpenCode 1, OpenCode 2 and Pi, and every identity lookup uses it, includingdoctor's checks.- With the setting off, home sessions skip memory features quietly. The historian, the sidebar and the status views skip the home directory and log one line, instead of logging an error on every attempt and every sidebar refresh.
Pi (#571, @aredridel)
- No more peer dependency warning on Pi 0.90 and later. Pi warns when a package it provides to extensions is not declared as a
"*"peer dependency.@earendil-works/pi-coding-agent,@earendil-works/pi-tuiandtypeboxare now declared that way (typeboxas optional). TypeBox is still bundled into the extension, so Oh My Pi keeps working.
Hidden sessions on OpenCode 2 (#566, #568, @chrisolszewski)
- A second directory of the same project can run the historian and dreamer (#566). Hidden child sessions were stored per project but each plugin instance tracks the runs it started per directory. When two directories shared one project, for example two git worktrees, the second directory reused the first one's child session, and its run was refused with
hidden_prompt_unrecognized. Hidden child sessions are now stored per directory. Entries stored per project by earlier versions are moved to cleanup only once they are stale, so a run still in progress in another directory is left alone. - A failed hidden run records the host's error (#568). OpenCode 2 reports a failed run through its
session.execution.failedevent, which Magic Context did not read, so the run was recorded as "Hidden completion failed without a provider error" even when the provider had returned a clear error. That error is now recorded with its type and message. A failure that is not from the provider is reported as "Hidden completion failed", not as a provider error.
Historian (#567, @chrisolszewski)
- A model's separate input limit is no longer reduced again for output. Some models declare an input limit next to their context window, for example 400,000 context, 272,000 input and 128,000 output. The historian treated the input limit as a shared window and subtracted room for the output from it, so in that example it admitted prompts up to 197,880 tokens instead of 263,840. Admission now uses the smaller of the input limit and the context window minus the output room, with the same 3% margin. This applies in TypeScript mode and in Rust mode (Rust:
ck-mc; an older module keeps the old limit). On Pi, the fallback model limits keep the input limit separate the same way.
Fewer writes after history writes (#569, @null-axiom)
- Project registration is a read when nothing changed. After each history write, registration ran a repair
UPDATEover the whole embeddings table inside a write transaction, even with nothing to repair. It now checks through the table's indexes first and writes only when the recorded embedding identity changed or a row actually needs repair. - The config is loaded once for registration and reused until one of the config files changes.
- The last-good-request slot isn't rewritten when it hasn't changed. Each rewrite replaced the whole stored request, often megabytes. An unchanged slot is now skipped.
- Slots for sessions idle for over a week are pruned by the existing maintenance tick. The pruning gives way to other writers instead of waiting for them.
Busy database (#554, @morpheus9393)
- Waiting for a lock no longer holds up the host. In 0.44.2 a turn that found the database locked by another instance retried for up to about 16 seconds on the host's main thread, so OpenCode stopped responding while it waited. Before a turn starts its work, it now checks that it can take the lock, with attempts of at most 25 ms and pauses of 0.5 and then 1 second in between, during which the host keeps running. After the same limit of about 16 seconds it replays the last good request or stops with the busy notice, as before. OpenCode 2's write tools check the lock the same way.
- A brief lock during a pass is waited out. A write inside a pass, where the turn can't pause, now waits up to 250 ms for a lock another instance holds. A longer hold falls back to the last good request or the busy notice instead of stalling the host. This applies on OpenCode 1, OpenCode 2 and in Rust mode.
- Background writes give up quickly. Message indexing, the dreamer's lease heartbeat and Rust mode's memory embedding catch-up try the lock for 25 ms and pick the work up on their next run, instead of waiting up to 5 seconds. The historian's final write retries with pauses for up to about 16 seconds without holding up the host. Tool writes, migrations and the CLI keep their normal wait of up to 5 seconds.
Historian and dreamer logs (#560, @Sugaroverdose)
- Run logs show the token breakdown. Historian and dreamer runs now log input, output, reasoning and cache read and write tokens, the output cap that was sent, and the finish reason, on OpenCode 1, OpenCode 2, Pi and in Rust mode (Rust:
ck-mc). A field the host or provider doesn't report is shown asnull, not zero. When a run hits its output cap, the error includes the same numbers, so it shows whether reasoning used up the budget.
Other
- The busy-database refusal log line names the underlying SQLite error ("database is locked") again. Tests no longer write storage into the package tree when XDG variables are unset.
Credits
Thanks to @dhaern (#570), @aredridel (#571), @chrisolszewski (#566, #567, #568), @null-axiom (#569), @morpheus9393 (#554) and @Sugaroverdose (#560) for the reports.