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
A failed background job can be reported as exited with code 0 #15080
A persistent background job whose command fails can be stored as exited with code 0. The background_process tool then shows status: exited instead of failed for that job
When the liveness watch of a persistent job no longer finds the process, it finalizes the job with exited(active, 0, null) (packages/opencode/src/kilocode/background-process/index.ts:897 on main). The ChildProcess exit handler first awaits output and ownership checks and only then passes the real code or signal to the same finalizer. The first terminal write wins, so when the watch is first the real outcome is lost
Plugins
None
Kilo version
7.8.8, and the same code is on current main
Steps to reproduce
Start a persistent background job whose command exits with code 1
Let the liveness watch notice the exit before the exit handler finishes its output and ownership checks
Read the job. It reports status exited and exit code 0
A local probe on main 6c1596e4f8 held only the persistent exit finalizer and left the watch unchanged. The child exited with code 1, and the stored exit code was 0 before and after the finalizer completed
It also happened without any hold. In a local test run on 2026-10-12 at 19:10 UTC a job whose own outcome file recorded code 1 was stored with exit code 0. That run used an earlier version of an unconfirmed stop is reported before its guarded runner ends, which still asserted the stored code; the test on main reads the outcome file instead
Expected behavior is that a job owned by the manager's ChildProcess keeps that process's real exit code or signal, whichever observer finishes first
Screenshot and/or share link
Not applicable, there is no UI. The probe and the test run used synthetic jobs and no user data
Activity