From 7b70e8f4381c8f2aab11f9981149c80577d27f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catriel=20M=C3=BCller?= Date: Mon, 1 Jun 2026 16:20:41 -0300 Subject: [PATCH] fix(cli): clean background process port env --- packages/opencode/src/kilocode/background-process/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/kilocode/background-process/index.ts b/packages/opencode/src/kilocode/background-process/index.ts index 9811cbb4f3..9339b1f026 100644 --- a/packages/opencode/src/kilocode/background-process/index.ts +++ b/packages/opencode/src/kilocode/background-process/index.ts @@ -206,7 +206,7 @@ export namespace BackgroundProcess { emit(active) } - function done(active: Active) { + function finished(active: Active) { if (active.disposed) return true if (!infer()) return true if (terminal(active.info.status)) return true @@ -215,7 +215,7 @@ export namespace BackgroundProcess { } function scan(active: Active) { - if (done(active)) return + if (finished(active)) return if (active.scan) return active.scan = refresh(active) .then((changed) => { @@ -235,7 +235,7 @@ export namespace BackgroundProcess { } function poll(active: Active, ms = PORT_MS) { - if (done(active)) return + if (finished(active)) return if (active.poll) return active.poll = setTimeout(() => { active.poll = undefined @@ -365,6 +365,7 @@ export namespace BackgroundProcess { } delete result.KILO_SERVER_PASSWORD delete result.KILO_SERVER_USERNAME + delete result.KILO_BACKGROUND_PROCESS_PORTS return result }