You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine --status-all: an idle window reads as 'working … in flight', and one terminal counts as two windows #1778
2026-10-05, staging-20261005-7e30335645c8 (no code change from dev@f81638787). Found in the v0.7.1 staging happy-path pass.
A single codeaf window sits idle after its turn ended. Its status line says idle, and logs/calls.jsonl has no call in flight. From a second terminal:
$ codeaf engine --status-all
… is held by an engine: this build
windows 2 attached · 1 conversation open
working yes — a turn, a task or a question is in flight
It stayed that way for more than two minutes. After /quit it reads 0 attached and the working line is gone. Two things are wrong: one terminal is counted as two windows, and an open window is reported as work in flight. The working line is there to help a person decide whether engine --stop would cut something, and here it says yes when nothing is running.
Replication
Deterministic (no model). Not yet written. An enginehost test can attach one surface to a host whose only session is idle and assert the status reply's Busy is false and its Surfaces is 1.
Field.OPENROUTER_API_KEY. Run git init -b work x && cd x && codeaf and send one message. Once the status line says idle, run codeaf engine --status-all in another terminal. Cost is under a cent.
Where
idleWithWatchGraceLocked in internal/enginehost/host.go: if h.live-h.probes > 0 { return false } makes any attached connection count as not idle. The Busy field the status reply carries is read from it, and printed as working yes — a turn, a task or a question is in flight in cmd/codeaf/engine.go. The surface count in the same reply should also be checked.
The fix
Status reports working only when a turn, task or question is actually in flight, the same reading remote.Session.IdleSince gives per conversation. Attached windows are already reported on their own line. The surface count counts each terminal once.
Acceptance
e2e: one idle window attached gives windows 1 attached and no working line.
e2e: the same with a turn streaming gives the working line.
Activity