Repository navigation
Loki Mode v11.157.0
Finished work is kept, the console redraws in place, and a text task with its own checklist is proved
Checked without a model, on the merged tree: scope-and-fix 857 passed, 0 failed; engine10-e2e-stub 218 passed, 0 failed; run-safety 220 passed, 0 failed; decompose-and-intake 162 passed, 0 failed; context-pack 201 passed, 0 failed; host-guard 147 passed, 0 failed; cli-entrypoints 72 passed, 0 failed; auto-route 47 passed, 0 failed; issue-action 35 passed, 0 failed; issue-context 17 passed, 0 failed; one-line-goal 36 passed, 0 failed; stacks 92 passed, 0 failed. Combining the branches exposed an import cycle (44 tournament legs read empty output) and two test pins; both are fixed here, the stash-rule pin by measurement.
Not measured yet: no real run on this build. --verified only records its bounds; the closure rounds are not built. The git stash deny rule has not been seen on a real model session. The draft pull request path was tested against a local origin only. The o key and a real browser opening were not exercised in a live run.
- A run that produced a change no longer ends with "PR: none". Two endings used to keep the branch local in pull request mode: a run that stopped on a question (outcome BLOCKED, a spec conflict) and a run whose engine was killed or crashed before it sealed a receipt. Both now open a draft pull request for the change that exists. A blocked run's pull request leads with the question and the command that answers it (
loki answer <run> --text "..."), then what is done and what is open; its run branch also stays local so the answer resumes on it. A run with no receipt leads with "This run stopped before it finished", why, that nothing in it is proven, and the command that runs the task again. A sealed run that stopped at the cost or time cap says why it stopped and how to go on. None of these drafts is titled or labelled as mergeable: the title carries[NEEDS ANSWER],[FAILED]or[PARTIAL], the label is always "loki: needs you", and no deep verify is started for a failed or blocked draft. Unchanged: every label and outcome, a usage-limit pause (no pull request, resumable, the work committed on its branch), a cancelled run, and a security-scan secret match (never pushed).LOKI_E10_DELIVER_UNSEALED=0restores the previous rule. - Finished work is never lost to a set-aside change. In a recorded run (opencode issue 63310, Loki 11.152.0) the model had written a complete, correct change; a later fix session ran
git stash, looked at the base, and was stopped before itsgit stash pop. The checkout was clean, nothing was committed, and the run was labelled FAILED with the whole change sitting in the stash. Three things change. A Loki session is now refusedgit stash, alone or inside a longer command, and is told why and what to use instead (git diff,git show HEAD:<file>, or a temporary copy). Whenever a session ends, however it ends, and again before the commit, Loki compares the stash list with the one it recorded at the start of the run: an entry made on the run's own branch during the run is put back on the work tree, checked against the stash, and only then dropped; the receipt says so. An entry that existed before the run, or was made on any other branch, is never applied or dropped. One that cannot go back cleanly is kept and the receipt names it with the command that restores it. If a session left the checkout on another branch, the run's branch is brought back (commits the session made during the run are fast-forwarded into it; no other branch is moved; commits older than the run are left alone and named). A restored file counts as checked only when the last verify hashed it with the bytes it has at the commit; when work comes back after the last check ran, the change is still delivered but the label is held at PARTIAL and the receipt names the files no check saw, so a run is never sealed VERIFIED on them.LOKI_E10_SESSION_RECOVERY=0turns off the restore at session start and end (the commit stage and the run end still restore). - A task you describe in text or hand over as a file takes the same road as
loki start owner/repo#Nwhen it carries its own acceptance list (a list under an Acceptance criteria, Requirements or Definition of done heading, or open checkboxes): the lines are read from the task, the session is asked to leave a proof script, Loki runs that proof itself, hands failures back, counts each line as met only on its own run, and the run gets the issue time cap rule (at least 2400 s instead of 900 s). Such a task is never VERIFIED without a run of Loki's own: with no proof script it is PARTIAL with the reason, even if the acceptance check reads every line as met. A task in prose stays on the road it had, unchanged, as do a goal of 600 characters or fewer, a file that sizes large by structure and--spec FILE; everything that needs GitHub stays issue only. Claude provider only, and not underLOKI_E10_PROVE_BY_RUNNING=0, as for an issue.LOKI_E10_ONE_ROAD=0turns it off;LOKI_E10_ONE_ROAD=allalso puts prose tasks on the road, for measuring. What it costs such a run in model calls, counted from the stub's log (the plain road makes 2): 5 when the session leaves a proof script that passes (one review session and two acceptance check calls more), 4 when it leaves none (one more implement turn and one check call), 6 when a check keeps failing (three hand-back turns and one check call).run.startednow says which road a run took (road: issue, work, spec or text). No model run has measured this yet. - A run on the proof road whose task has no acceptance list (an issue written in prose) used to give Loki's own proof run nothing to count: on a recorded run two passing checks counted for no line. The task's title line now stands in as the one item, taken from the intake record, so the session cannot change it; the plan's
Acceptance:lines still come first when a plan ran. The line is the first line of the task text, whole. No plan session is added. What it adds to a prose issue run, counted from the stub's log: one acceptance check call when the session leaves no proof script, and one review session plus two check calls when it leaves one.LOKI_E10_TITLE_ACCEPTANCE=0turns the stand-in off. - An issue supplied as a file in
LOKI_E10_ISSUE_JSONnow gets the issue time cap rule; before, only an issue fetched from GitHub did. - Loki no longer takes back a test the session edited for its change when that test reaches the changed package through one of its own helper files. On playwright 44124 the Haiku run's edit to
tests/page/page-aria-snapshot.spec.tswas reset as "outside the change's packages" because the file imports the changed package only throughtests/config/utils.ts, while the Sonnet run's edit to a sibling file that imports it directly was kept. One hop only;LOKI_E10_TEST_REACH_HELPERS=0restores the old rule. Checked by replaying the rule on the recorded repository; not measured on a model run yet. - The live console of
loki starthas a key for the dashboard:oopens this run's page in your browser. The keys line readsd details o dashboard q or Ctrl-C stop (loki start resumes it). A running dashboard is used; with none running, one is started (in the run's repository, so the run shows up in it) and waited on for about 5 seconds. If the dashboard does not hold the run yet, the repository's page or the home page is opened instead and the panel says which. Where no browser should be opened (LOKI_NO_BROWSER=1, SSH, CI, no display) the link is shown under the keys instead. If the dashboard cannot be started the panel shows one line,could not start the dashboard: <reason>; run \loki control serve`, and the run goes on. The final summary carriesDashboard:when a dashboard is running, inside the same 8-line cap. Tested with stand-ins for the server and the browser (tests/min/one-line-goal.sh`); a real browser opening on macOS, Linux or Windows was not exercised. loki control openopens the dashboard (the Control Plane) in your browser and prints its URL, starting it first when it is not running;loki dashboardnow runs the same code. It does not open a browser underLOKI_NO_BROWSER=1, in CI, over SSH, without a terminal or (on Linux) without a display: it prints the URL only.- A dashboard left running by an install that no longer exists is replaced instead of reused. Seen on a real machine: a Control Plane started by a test install in a temp directory kept answering
/healthfor 26 hours after that directory was deleted, so nothing replaced it and every page failed with a rawENOENT ... ui/dist/index.htmlerror. A running Control Plane is now reused only when the install it was started from still exists, still holds the dashboard page, and is the same version as the caller (so an upgrade is not served by the old server); otherwise it is stopped by the PID in~/.loki/control/instance.json, after/healthconfirms it is a Control Plane, and the caller's own is started. An explicitLOKI_CONTROL_URLis never judged or stopped. The server also answers a page request with one plain sentence when its page or install is gone, and stops itself when its install directory is gone (on that request, and on a 30 second timer). Tested with stand-in servers on free ports in a throwaway home (tests/min/cli-entrypoints.sh); the 30 second timer itself is not exercised by a test. An install in a temp directory (a test or CI install) never stops or reuses the dashboard of another install and never rewrites itsinstance.jsonrecord, whatever its version: it starts its own on a free port and keeps its own record in~/.loki/control/instance.throwaway.json, so itsloki control stopstops only that one. - The live console of
loki startno longer leaves part of an old panel on screen above the current one in four cases, each reproduced in a terminal emulator test that failed before the change (tests/min/one-line-goal.sh, drivertests/min/fixtures/live-console.js). A line printed by theloki startprocess itself while the panel is up is now written above the panel (the code for this existed but was switched off whenever the caller passed its own writer, andloki startdid); the same now holds forconsole.logandconsole.warn, which under Bun write to the terminal without going through the wrapped stream. A panel with more lines than the window has rows is shortened to fit, and says how many acceptance lines or detail entries it left out; the final panel still lists every line. The panel now uses the window's real width and height on every redraw (it was always drawn 80 columns wide), so a narrower window no longer wraps its lines, and a window made narrower mid-run is redrawn over the rows the old lines wrapped to. Characters two cells wide count as two. A window made shorter leaves the rows that scrolled off in the scrollback. - What the engine's stages print to stderr during a run (the intent card with one line per acceptance line, warnings, a crash trace) now appears once, above the live console, instead of under it. The engine worker is a child process whose stderr was the terminal itself, so its text went past the console and the next redraw left that many rows of the old panel behind: the likely cause of the two panels seen on a real run about 45 seconds in, when the intent card is printed (the terminal bytes of that run were not captured, so this is the matching mechanism, not a replay). While the console owns the terminal, and only then, the worker's stderr is a pipe that
loki startreads line by line and prints above the panel; the worker is told its stderr is a terminal (LOKI_E10_STDERR_TTY=1, read by one helper at the four places that asked), so it decides as before. With--json,--verbose, a piped stderr or2>filenothing changes: the worker's stderr is still the process's own. Still not covered: a program the run starts that opens the terminal device directly. - The independent reviewer's findings are counted beside the label and read first. A run whose reviewer filed findings now prints, for example,
Outcome: VERIFIED, 5 reviewer flags open, and those findings lead the NOT PROVEN line instead of sitting among the disclosures. The label rule is unchanged, and a run with no finding prints what it printed before. loki start --verified(orLOKI_VERIFIED=1) is accepted and recorded: the start line says verified mode is on and the receipt carries averified_modeblock with its bounds (3 closure rounds, 2 hours, 5.00 dollars, 3 million new tokens;LOKI_VERIFIED_ROUNDS,LOKI_VERIFIED_MAX_S,LOKI_VERIFIED_MAX_USD,LOKI_VERIFIED_MAX_TOKENSoverride each). In this version the flag changes nothing else: the closure rounds that use those bounds are not built yet, and the start line says so.