Skip to content

fix(cloud-agent-next): report an incomplete worktree restore - #6630

Merged
iscekic merged 5 commits into
mainfrom
kwf/28572-b-worktree-restore-d2e6
Sep 24, 2026
Merged

iscekic merged 5 commits into
mainfrom
kwf/28572-b-worktree-restore-d2e6

Conversation

@iscekic

@iscekic iscekic commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog for users

  • A runtime replacement that restores only part of the worktree now shows a failed "Session restore incomplete" step naming how many files were not restored, the reason, and the missing paths.
  • The agent is told the worktree is incomplete before it continues, and not to assume the missing paths are present.
  • The preparation group opens automatically on an incomplete restore, so the missing-file detail is visible without a tap.
  • A restore that applies every diff still shows the normal completion title and no "incomplete" text.

Changelog for maintainers

  • Each skipped restore diff now carries a named reason and file, capped at 100; the skipped count stays the true total. Check the new strict restore-telemetry schema on the attach result first: older wrappers omit the field and must still parse.
  • Cold, backup, and runtime-replacement restores report through one helper: a greppable wrapper log line, the agent rules note, and a failed restore_incomplete preparing step emitted as started-then-failed (the materializer drops an unmatched step event).
  • Skip reasons are preserved end to end (patch_apply_failed, outside_workspace, missing_content, index_reset_failed, unlink_failed, write_failed) and unknown reasons pass through. The restore never retries as a whole; a targeted retry must act on the named reasons and paths.
  • A complete restore deletes a stale rules note and emits no step; the old "incomplete, N/M files restored" progress line is gone, so only the named outcome reports a short restore.
  • The worker emits cloud_agent_restore_incomplete from both the session-ready telemetry and the attach path. The app reuses the existing preparation step stream, so no new UI channel is added; the web drawer line now derives from the shared attempt summary so the row and the panel cannot disagree.
  • Incomplete outranks completion in the UI, while a terminal attempt failure outranks the incomplete step so a real failure is not masked.
  • Review the mobile and web summary helpers together: both fall back to the step label when the step carries no error text.
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts:94 — rejected, no change: the rules note already appends the same "and N more" truncation hint as the message when the affected-path cap omits paths, at restore-outcome.ts:96-104, and restore-outcome.test.ts:100-120 asserts it. The cited line belongs to the pre-patch revision, so no code changed.

Evidence refresh: the repair changed no code, so the full-feature captures below still stand. The earlier log-only proof lines are superseded by these named captures, and the re-run suite logs replace them as regression evidence (cloud-agent-next passed; mobile typecheck and mounted tests passed).

Production report: all three runtime replacements in the session route through the restore paths this change instruments, so each replacement that skipped a diff would have been visible; before this change none was, because the count survived only in a progress line.

E2E proof

[e12] ux-check: Web: trigger a replacement whose restore skips at least one diff; the chat row under the message shows 'Session restore incomplete: N of M files were not restored (). — Android (emulator-5604) mobile equivalent of the web row: the session chat row under the user message renders the group header 'Session restore incomplete: 2 of 5 files were not restored (the patch did not apply). Missing: src/a.ts, src/b.ts' and stays so with the attempt status=completed, 'Preparation complete' absent (e12-scene.log digest; attempt/step rows in e12-fixture.log; alert glyph left to the visual reviewer in e12.png).

[e12] ux-check: Web: trigger a replacement whose restore skips at least one diff; the chat row under the message shows 'Session restore incomplete: N of M files were not restored (<reason>). — prior/e12.png

[e4] web [needs:fault]: with a session whose restore skipped a diff, the transcript row for the triggering message reads 'Session restore incomplete' with the count and the missing paths instead of… — android emulator-5554: after leaving and re-opening the session the transcript row reads (e4-transcript.txt) text="Session restore incomplete: 2 of 5 files were not restored (the patch did not apply). Missing: src/a.ts, src/b.ts" with the named step text="Session restore incomplete" in the expanded details and no 'Preparation complete' (grep -c = 0); state created by the throwaway fixture e4-inject-fixture.sh (v2 preparing step_snapshot materialized into the session DO stream, mirrors the wrapper event), still e4-transcript.png for the visual reviewer; no UX-DEFECT observed.

[e4] web [needs:fault]: with a session whose restore skipped a diff, the transcript row for the triggering message reads 'Session restore incomplete' with the count and the missing paths instead of… — prior/e4-transcript.png

[p5] web empty/happy — completed preparation without a restore_incomplete step (android emulator-5554) — android emulator-5554; SCENE p5 OK (p5-scene.log:1); the completed preparation row reads 'Preparation complete' (p5-scene.log:12) with steps 'sandbox boot' (:14), 'workspace setup' (:16), 'cloning' (:18) and 'kilo session' (:20), and the scripted absent checks for 'Session restore incomplete', 'not restored' and 'incomplete' all passed; 'Preparation complete' is the mobile surface's copy for the web 'Environment prepared' row and the expanded group is the mobile row+drawer equivalent; captures p5.png / p5.replay.json.

[p5] web empty/happy — completed preparation without a restore_incomplete step (android emulator-5554) — prior/p5.png

[p6] backend — a runtime replacement whose restore applies every diff (and a warm reuse) writes no 'bootstrap restore incomplete' line, emits no cloud_agent_restore_incomplete event, and leaves no… — android emulator-5604 (backend surface, proved by logs). Harness leave-and-return passed at 04:15Z (p6-harness.log 'leave-and-return/echo:hi (642044ms) … replacement=20461f465d1b'); the replacement runtime's uploaded wrapper log (p6-wrapper.log) reads 'restore-session: diffs applied=2 skipped=0 total=2' and 'restore-session: completed successfully' with 'session_attach_result … ok:true', 'bootstrap restore incomplete' count 0; the session-home files.tar.gz members (p6-archive-members.txt) contain no restore-incomplete.md; the worker log since the pre-run offset (p6-worker-delta.log, 178 hits…

[p6] backend — a runtime replacement whose restore applies every diff (and a warm reuse) writes no 'bootstrap restore incomplete' line, emits no cloud_agent_restore_incomplete event, and leaves no… — prior/p6.png

[e5] web [needs:seed]: a completed preparation whose restore applied every diff still reads 'Environment prepared' and shows no 'incomplete' text anywhere in the transcript (happy path, no regression). — Platform android/emulator-5554, session ses_f355800b9ffcY5rTpoopFA11uU: e5-scene.log shows 'android.widget.Button Preparation complete tappable [40,1445][1042,1546]' over the expanded rows sandbox boot / workspace setup / cloning / kilo session and 'SCENE e5 OK', with zero occurrences of 'incomplete' in the digest; e5-do-steps.log reports 'preparing step_snapshot rows: 4' and 'events mentioning restore_incomplete: 0'. The Android title for the completed state is 'Preparation complete' (the web copy is 'Environment prepared') — same completed-preparation fact. No UX-DEFECT observed.

[e5] web [needs:seed]: a completed preparation whose restore applied every diff still reads 'Environment prepared' and shows no 'incomplete' text anywhere in the transcript (happy path, no regression). — prior/e5.png

[e13] ux-check: Web: click that row to open the details panel; the panel's own summary must agree with the row and must not read 'Environment prepared' while the timeline shows the failed 'Session restore… — Platform android/emulator-5554, session ses_f355d695bffed6CUNP3pX6wxrI: e13-scene.log ('SCENE e13 OK') shows the group's own summary line 'android.widget.Button Session restore incomplete: 2 of 5 files were not restored (the patch did not apply). Missing: src/a.ts, src/b.ts' and the expanded step's own detail 'android.widget.TextView Session restore incomplete: 2 of 5 files were not restored (the patch did not apply). Missing: src/a.ts, src/b.ts', identical, with zero 'Preparation complete' lines; the collapse/re-expand taps both kept it. The toggled step key=restore_incomplete status=failed…

[e13] ux-check: Web: click that row to open the details panel; the panel's own summary must agree with the row and must not read 'Environment prepared' while the timeline shows the failed 'Session restore… — prior/e13.png

Owner request

Fix: a sandbox runtime replacement restores the worktree from a snapshot, and an incomplete restore is invisible to the agent and to the user.

Production evidence, Pylon issue 28572, session ses_f39900bddfffUK9xomduMB1zP7, workspace workspace_920df027-f52b-484e-9db6-4b447fd4cb40:

  • Axiom native_fence_transition records for this workspace: retire ba242198-7f45-4714-bd35-be682e84c6b8 at 04:33:58Z; rebind ba242198 to c2443cad-2e51-4a83-85d5-93b862ec8595 at 05:06:37Z; retire c2443cad at 05:20:31Z; rebind c2443cad to 8e9145b2-b276-49dc-a016-fcff9f3b1492 at 07:06:09Z; retire 8e9145b2 at 07:24:17Z.
  • The runtime was therefore replaced three times inside one session.
  • Each replacement calls restoreOrBootstrapKiloSession at services/cloud-agent-next/wrapper/src/session-bootstrap.ts:1368, which reports diffsApplied, diffsSkipped and diffsTotal at :761-790.
  • services/cloud-agent-next/wrapper/src/session-bootstrap.ts:1372-1381 turns a skipped diff into a progress line only: " incomplete, N/M files restored". Nothing else reads diffsSkipped.
  • The user reported it as: "the work tree had been reset multiple times and it had to recreate the changes from the conversation".

Requirements:

  1. An incomplete restore must be a named, observable outcome, not a progress line. Name the count and the affected paths.
  2. The agent must learn that the worktree is incomplete before it continues. Put the fact where the agent reads it, using the runtime skill or rules path the wrapper already writes.
  3. The user must see the same fact in the app when a restore is incomplete. If that needs the cloud-agent-next session state, expose it; if it needs only existing progress, reuse it. Do not build a new UI channel without need.
  4. Do not retry the whole restore blindly. Name the reason the diffs were skipped, and keep that reason in the report.
  5. Add a test that fails a restore diff and asserts the incomplete outcome is reported.

Report how many of the three replacements in this session would have been visible under the new behaviour.

Production record (automatic, 2026-09-22):

Production record for ses_f39900bddfffUK9xomduMB1zP7

Axiom, last 72 h

vercel

  • 2026-09-22T00:07:02 [info] [CloudAgentNextClient.prepareSession] Request completed { elapsed: 1938, kiloSessionId: 'ses_f39900bddfffUK9xomduMB1zP7', cloudAgentSessionId: 'workspace_920df027-f52b-484e-9db6-4b447fd4cb40' }
    cloudflare-logpush
  • 2026-09-22T14:53:49 [ok] session-ingest {"event":"kilo_sdk_history_read","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","limit":50,"hasCursor":false,"outcome":"ok","messageCount":50,"omittedItemCount":0,"hasNextCursor":true,"durationMs":686}
  • 2026-09-22T14:50:38 [ok] session-ingest {"event":"kilo_sdk_history_read","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","limit":50,"hasCursor":false,"outcome":"ok","messageCount":50,"omittedItemCount":0,"hasNextCursor":true,"durationMs":638}
  • 2026-09-22T07:25:41 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"846335ba-2a29-4f42-8a78-30f7ce0260ec","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":23,"items":1,"metadataChanges":0}
  • 2026-09-22T07:25:41 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"88a70b4f-4e59-4c40-8033-e314797adeac","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":66,"items":1,"metadataChanges":1} | {"event":"remote_session_attention_outcome","sessionId":"ses_f39900
  • 2026-09-22T07:25:41 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"168cfd2b-af31-4c5b-834f-187a0717e0b7","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":719,"actualBytes":719,"durationMs":24,"items":1,"metadataChanges":0}
  • 2026-09-22T07:25:41 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"95198bd5-e7de-425f-9990-c40cebe1e028","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":26954,"actualBytes":26954,"durationMs":456,"items":1,"metadataChanges":0}
  • 2026-09-22T07:19:10 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"b8a11940-eaa8-408e-865f-0802886a9bc5","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":27696,"actualBytes":27696,"durationMs":215,"items":3,"metadataChanges":1} | {"event":"remote_session_attention_outcome","sessionId":"ses
  • 2026-09-22T07:19:10 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:16:58.956Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:18:11 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:16:34.422Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:18:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"68e878f9-4db4-48f4-b514-67171bb15d5d","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":32632,"actualBytes":32632,"durationMs":202,"items":3,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"c3c819e0-c2c9-4b23-907f-15224b9430e0","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":705,"actualBytes":705,"durationMs":24,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"13f458f8-c260-414b-8075-095b61f791ed","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":698,"actualBytes":698,"durationMs":19,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"cca74e34-043c-41b9-9123-df7f1e5c36f6","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":223,"actualBytes":223,"durationMs":21,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"4ad3666b-6b34-40c6-aa0f-79afb98d10ba","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":183,"actualBytes":183,"durationMs":21,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"9b801d5f-6507-4e4c-bff4-d5753cce1e44","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":18,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"4918330a-7029-4c35-9bab-dfab4008ad6c","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":521,"actualBytes":521,"durationMs":40,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"0702cc73-2401-404d-83a4-d441a9ee36d0","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":778,"actualBytes":778,"durationMs":15,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"421714ba-12b4-461e-80d9-37a6fbb509f3","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":26871,"actualBytes":26871,"durationMs":22,"items":1,"metadataChanges":0}
  • 2026-09-22T07:18:09 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"3ff9f380-19a3-4c64-b0b6-2f58ed6e96e4","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":32152,"actualBytes":32152,"durationMs":24,"items":1,"metadataChanges":0}
  • 2026-09-22T07:17:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:16:06.219Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:17:00 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"06713d14-7dda-4f57-8912-4bbc356901c3","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":450,"actualBytes":450,"durationMs":147,"items":2,"metadataChanges":0}
  • 2026-09-22T07:17:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:15:59.724Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:17:00 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"238e2c9a-2a38-430c-aa92-90c7882d7b05","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":14863,"actualBytes":14863,"durationMs":209,"items":10,"metadataChanges":0}
  • 2026-09-22T07:10:13 [ok] cloud-agent-next {"message":"Control-plane child session creation failed","level":"warn","time":"2026-09-22T07:08:45.527Z","tags":{"$logger":{"level":"debug"}},"rootKiloSessionId":"ses_f39900bddfffUK9xomduMB1zP7","eventKiloSessionId":"ses_f380ec6f2ffegLzooSenPmKZEO","status":500}
  • 2026-09-22T07:10:12 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"705ef593-f48e-4a81-9400-2a93e692d986","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":4123,"actualBytes":4123,"durationMs":21,"items":1,"metadataChanges":0}
  • 2026-09-22T07:10:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"a8946712-f92d-46af-8453-effe982d6732","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":4736,"actualBytes":4736,"durationMs":161,"items":2,"metadataChanges":0}
  • 2026-09-22T07:10:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"a4d8b585-5b85-41cc-9c70-0a6b9e9b7a42","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":120262,"actualBytes":120262,"durationMs":495,"items":5,"metadataChanges":0}
  • 2026-09-22T07:09:20 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:07:50.911Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:09:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"aa90dd7b-3ed7-489c-b3f9-ee29d68de766","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":623,"actualBytes":623,"durationMs":25,"items":1,"metadataChanges":0}
  • 2026-09-22T07:09:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"46bc28fb-20d7-442e-8347-921751d57971","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":3921,"actualBytes":3921,"durationMs":21,"items":1,"metadataChanges":0}
  • 2026-09-22T07:09:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"28ece5fc-504f-4e25-b2b4-a361b6c9c02c","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":3816,"actualBytes":3816,"durationMs":20,"items":1,"metadataChanges":0}
  • 2026-09-22T07:09:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"926dc9bf-2e5c-4eb6-959e-a6ebe93a08af","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":45214,"actualBytes":45214,"durationMs":27,"items":1,"metadataChanges":0}
  • 2026-09-22T07:09:08 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:07:45.056Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:09:08 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"04f6c1f3-196f-411a-8e5c-ea399683ba4f","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":223,"actualBytes":223,"durationMs":18,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"f3b7f480-bf99-4ff8-a25f-27d319278213","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":2282,"actualBytes":2282,"durationMs":175,"items":5,"metadataChanges":0}
  • 2026-09-22T07:08:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"a89d0e2a-f703-4ef0-81f6-434b44d8525e","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":2210,"actualBytes":2210,"durationMs":160,"items":5,"metadataChanges":0}
  • 2026-09-22T07:08:11 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"19dae7d9-8871-4459-bc59-41c23fd84202","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":2420,"actualBytes":2420,"durationMs":162,"items":6,"metadataChanges":0}
  • 2026-09-22T07:08:10 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:06:47.532Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"7a59d1d2-ed68-4b27-9506-56794e58d5e0","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":698,"actualBytes":698,"durationMs":19,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"96fad18c-f5c3-4815-b61a-d96153650cbe","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":19,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"47d89011-9cf8-4b2c-ae2b-5beeb08db1fb","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":278,"actualBytes":278,"durationMs":20,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"f127e18a-e845-429d-afe5-cf71d66f73dd","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":278,"actualBytes":278,"durationMs":20,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"8a18e12c-49d1-41bb-8590-266f1836f020","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":625,"actualBytes":625,"durationMs":21,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"6f1ef126-a7f2-45b8-8066-b8d4f651c380","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":22,"items":1,"metadataChanges":1}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"82b84d16-6e20-48ee-aee8-0f856e75b09f","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":698,"actualBytes":698,"durationMs":20,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:10 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"f84c2c19-1c25-4ff2-bab6-edc4f556414e","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":1241,"actualBytes":1241,"durationMs":22,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:01 [ok] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"197a8948-9b7a-4d00-b12f-0f7b8f7950aa","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":450,"actualBytes":450,"durationMs":162,"items":2,"metadataChanges":0}
  • 2026-09-22T07:08:01 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"90a57d28-2906-443a-b7f0-8ce9e1efc584","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":183,"actualBytes":183,"durationMs":32,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:01 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"bdfae19f-3dc2-41ca-9c3a-151cfa43adb9","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":254,"actualBytes":254,"durationMs":37,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:01 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"32973d27-9e5b-4a63-b639-a8b91f42618c","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":277,"actualBytes":277,"durationMs":17,"items":1,"metadataChanges":0}
  • 2026-09-22T07:08:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:06:15.938Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:08:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:06:14.650Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:08:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:06:13.598Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/title","$logger":{"level":"debug"}}}
  • 2026-09-22T07:08:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:06:12.584Z","tags":{"source":"worker-entry","method":"POST","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/ingest","$logger":{"level":"debug"}}}
  • 2026-09-22T07:08:00 [ok] cloud-agent-next {"message":"Handling request","level":"info","time":"2026-09-22T07:05:59.918Z","tags":{"source":"worker-entry","method":"GET","path":"/api/session/ses_f39900bddfffUK9xomduMB1zP7/export","$logger":{"level":"debug"}}}
  • 2026-09-22T06:48:58 [ok] session-ingest {"event":"kilo_sdk_history_read","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","limit":50,"hasCursor":false,"outcome":"ok","messageCount":50,"omittedItemCount":0,"hasNextCursor":true,"durationMs":324}
  • 2026-09-22T05:13:02 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"130fe3c9-998a-4560-8ab9-0b07003971a3","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":238,"actualBytes":238,"durationMs":9,"items":1,"metadataChanges":0}
  • 2026-09-22T05:12:04 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"7a713491-058d-4bd1-837c-4a287fae9d1e","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":277,"actualBytes":277,"durationMs":17,"items":1,"metadataChanges":0}
  • 2026-09-22T05:12:04 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"efdd786b-bd10-4c5e-8601-743914d658ac","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":61,"actualBytes":61,"durationMs":25,"items":1,"metadataChanges":1} | {"event":"remote_session_attention_outcome","sessionId":"ses_f39900
  • 2026-09-22T05:12:04 [canceled] session-ingest {"event":"direct_ingest_ok","ingestRequestId":"c37c0e6f-68fe-4020-ac91-17fd1108cc4d","sessionId":"ses_f39900bddfffUK9xomduMB1zP7","ingestVersion":2,"declaredBytes":698,"actualBytes":698,"durationMs":19,"items":1,"metadataChanges":0}
    No line carries this term in: supabase-production.

The session row, read replica

session_id | status | created_at | updated_at

  • ses_f39900bddfffUK9xomduMB1zP7|idle|2026-09-22 00:07:01.414358+00|2026-09-22 07:24:06.324171+00

Log archives, R2 kilocode-sessions

NOT READ: R2 keys are indexed by the agent id, not the session id; take the agent_* from the worker logs above and query that.

Sentry, last 72h

No Sentry issue carries this term.

E2E proof — log excerpts

     ✓ renews near-expiry and expired cloudflare grants through authenticated terminal activity  406ms
     ✓ renews near-expiry and expired vercel grants through authenticated terminal activity  441ms
     ✓ exposes a wrapper instance only for the ready current connection  309ms
     ✓ ends PTYs after control replacement by the same wrapper and fences late invalidation  375ms
     ✓ ends PTYs after control replacement by the different wrapper and fences late invalidation  378ms
     ✓ resolves grouped auto-commit true before first attach and prompt delivery  321ms
     ✓ resolves grouped auto-commit false before first attach and prompt delivery  315ms
     ✓ resolves grouped auto-commit undefined before first attach and prompt delivery  318ms
     ✓ persists and dispatches initial command turns with their agent and arguments  327ms
     ✓ dispatches signed prompt attachments and preserves follow-up agent overrides  372ms
     ✓ dispatches 'legacy' queued auto-commit true with persisted false without changing the frozen intent  326ms
     ✓ dispatches 'legacy' queued auto-commit false with persisted true without changing the frozen intent  332ms
     ✓ dispatches 'legacy' queued auto-commit undefined with persisted false without changing the frozen intent  334ms
     ✓ dispatches 'legacy' queued auto-commit undefined with persisted true without changing the frozen intent  358ms
     ✓ dispatches 'frozen' queued auto-commit true with persisted false without changing the frozen intent  340ms
     ✓ dispatches 'frozen' queued auto-commit false with persisted true without changing the frozen intent  398ms
     ✓ persists and streams exactly one sent event per accepted sibling prompt  587ms
     ✓ settles only the matching root once from a fenced outcome without generic terminals  393ms

Review follow-up: snapshot path escaping in the restore rules note (PRRT_kwDORD_mN86lpeBO)

Verdict: valid. The incomplete-restore note at services/cloud-agent-next/wrapper/src/restore-outcome.ts:144 interpolated each affected path raw into a Markdown bullet, and the path is snapshot-supplied (restore-session.ts:1271 -> extractDiffs, restore-session.ts:1241), so a path carrying a newline or Markdown syntax could add a bullet, a section, or an instruction to a file the agent reads as rules. Fixed in 620a4737 by rendering each path as data (renderPathAsData, restore-outcome.ts:56): control characters and Unicode line separators become visible \uXXXX escapes, Markdown/HTML syntax is backslash-escaped, and each rendered path is capped at 200 characters.

Test command:

cd services/cloud-agent-next/wrapper && bun test src/restore-outcome.test.ts

Decisive output:

(pass) buildRestoreIncompleteRules > renders a snapshot path with line breaks and instruction-like Markdown as data
(pass) buildRestoreIncompleteRules > escapes Markdown syntax in a snapshot path and caps its length

 11 pass
 0 fail

Review follow-up: code-point path truncation in the restore rules note (PRRT_kwDORD_mN86lp9X8)

Verdict: valid. renderPathAsData at services/cloud-agent-next/wrapper/src/restore-outcome.ts:58 truncated with file.slice(0, MAX_RENDERED_PATH_LENGTH), which counts UTF-16 code units. A path longer than the 200-unit cap with a non-BMP character at the cut point kept a lone high surrogate, and the code-point loop below emitted it raw into the rules note.

Fixed in 90ef609830: the path is spread into code points ([...file]), that array's length is compared against the cap, and the array is sliced and joined before the … marker is appended, so the whole function is code-point based. The MAX_RENDERED_PATH_LENGTH doc comment now says code points. The escaping behaviour, the 200 cap, and everything else are unchanged.

Test command:

cd services/cloud-agent-next/wrapper && bun test src/restore-outcome.test.ts

Decisive output:

(pass) buildRestoreIncompleteRules > cuts a long path by code point so an emoji at the cap is not split

 12 pass
 0 fail
 34 expect() calls

The new test fails against the old file.slice(0, MAX_RENDERED_PATH_LENGTH) (expect(loneSurrogates(rules)).toEqual([]) receives a lone U+D83C high surrogate) and passes with the fix. bun test src → 1632 pass, 0 fail; bun run typecheck and oxfmt --check are clean.

Merge proof — head a9408fb892

origin/main (aa1daf3990) merged into the branch as a9408fb892, no conflicts.

Why: the cloud-agent-next check failed twice at 90ef609830 on test/integration/sandbox-control.test.ts:11613 — it expected accepted and observed queued, reproducibly in CI while the same commit passed 328/328 locally. The branch was 57 commits behind, and main reworked that exact behaviour (#6660) with a withoutQueuedDispatch normaliser documented as "A queued follow-up now dispatches behind an accepted row, so it gains a queued state transiently".

Verification at a9408fb892:

cd services/cloud-agent-next && pnpm exec vitest run --config vitest.workers.config.ts test/integration/sandbox-control.test.ts
 Test Files  1 passed (1)
      Tests  346 passed (346)

The two review fixes survive the merge — renderPathAsData and the code-point truncation are still in services/cloud-agent-next/wrapper/src/restore-outcome.ts, and its tests pass:

cd services/cloud-agent-next/wrapper && bun test src/restore-outcome.test.ts
 12 pass / 0 fail

Comment thread services/cloud-agent-next/wrapper/src/restore-outcome.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts - code-point truncation fix verified correct
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts - regression test verified
Previous Review Summaries (5 snapshots, latest commit 620a473)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 620a473)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The new snapshot-path escaping for the agent rules note is correct and test-backed; the only finding is a minor truncation edge case that can split a surrogate pair at the 200-unit cut.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
services/cloud-agent-next/wrapper/src/restore-outcome.ts 58 Path truncation slices by UTF-16 code units and can keep a lone surrogate
Files Reviewed (2 files)
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts - 1 issue
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts

Resolved since the previous review (834cd05): the unescaped snapshot-path injection finding is fixed at HEAD (620a4737) by renderPathAsData, with tests for newline/instruction injection, Markdown syntax, and length capping.

Fix these issues in Kilo Cloud

Previous review (commit 834cd05)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The two open findings from the previous review are resolved at HEAD (834cd05): the wrapper now reserves record slots so every distinct skip reason reaches the report and derives the omitted-path remainder from the true skipped total, and /session/ready restore telemetry is schema-validated before formatting so malformed telemetry cannot turn a successful ready response into a failure. No new issues were found in the 6 files changed since the prior review SHA.

Files Reviewed (6 files)
  • services/cloud-agent-next/src/kilo/wrapper-client.test.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts
  • services/cloud-agent-next/wrapper/src/restore-session.ts

Previous review (commit a392d9c)

Status: No Issues Found | Recommendation: Merge

Executive Summary

History was rewritten (the prior review SHA is no longer an ancestor), so this is a full re-review of the squashed change; the incomplete-restore outcome is wired consistently through the wrapper log line, the agent rules note, the restore_incomplete preparation step, and the worker telemetry, and no new blocking issues were found.

The previously raised truncation note on restore-outcome.ts is resolved: RestoreIncompleteReport.omittedPaths now carries the remainder and buildRestoreIncompleteRules appends - and N more, so the agent note and the user-facing message can no longer disagree.

Files Reviewed (26 files)
  • apps/mobile/src/components/agents/preparation-group-state.test.ts
  • apps/mobile/src/components/agents/preparation-group-state.ts
  • apps/mobile/src/components/agents/preparation-group.mounted.test.tsx
  • apps/mobile/src/components/agents/preparation-group.tsx
  • apps/web/src/components/cloud-agent-next/PreparationDrawer.tsx
  • apps/web/src/components/cloud-agent-next/PreparationRow.tsx
  • apps/web/src/components/cloud-agent-next/preparation-summary.test.ts
  • apps/web/src/components/cloud-agent-next/preparation-summary.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.test.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/src/shared/wrapper-bootstrap.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.test.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.ts
  • services/cloud-agent-next/wrapper/src/control/file-log-uploader.test.ts
  • services/cloud-agent-next/wrapper/src/control/file-log-uploader.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts
  • services/cloud-agent-next/wrapper/src/restore-incomplete.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts
  • services/cloud-agent-next/wrapper/src/restore-session.ts
  • services/cloud-agent-next/wrapper/src/session-bootstrap.test.ts
  • services/cloud-agent-next/wrapper/src/session-bootstrap.ts

Previous review (commit d9928b7)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental changes since the previous review only add the omittedPaths remainder to the restore report and rules note; the change is correct, tested, and resolves the prior truncation finding, with no new issues introduced.

Files Reviewed (3 files)
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts

Previous review (commit 3cecfd8)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The incomplete-restore feature is implemented consistently across wrapper, worker, DO, and both clients; the only finding is that the agent-facing rules note truncates its affected-path list without the and N more hint the user-facing message includes.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
services/cloud-agent-next/wrapper/src/restore-outcome.ts 94 Rules note omits the truncation hint that the message includes for >50 affected paths
Files Reviewed (26 files)
  • apps/mobile/src/components/agents/preparation-group-state.test.ts
  • apps/mobile/src/components/agents/preparation-group-state.ts
  • apps/mobile/src/components/agents/preparation-group.mounted.test.tsx
  • apps/mobile/src/components/agents/preparation-group.tsx
  • apps/web/src/components/cloud-agent-next/PreparationDrawer.tsx
  • apps/web/src/components/cloud-agent-next/PreparationRow.tsx
  • apps/web/src/components/cloud-agent-next/preparation-summary.test.ts
  • apps/web/src/components/cloud-agent-next/preparation-summary.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.test.ts
  • services/cloud-agent-next/src/kilo/wrapper-client.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/src/shared/wrapper-bootstrap.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.test.ts
  • services/cloud-agent-next/wrapper/src/control/apply-attach.ts
  • services/cloud-agent-next/wrapper/src/control/file-log-uploader.test.ts
  • services/cloud-agent-next/wrapper/src/control/file-log-uploader.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts
  • services/cloud-agent-next/wrapper/src/restore-incomplete.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.test.ts
  • services/cloud-agent-next/wrapper/src/restore-outcome.ts - 1 issue
  • services/cloud-agent-next/wrapper/src/restore-session.test.ts
  • services/cloud-agent-next/wrapper/src/restore-session.ts
  • services/cloud-agent-next/wrapper/src/session-bootstrap.test.ts
  • services/cloud-agent-next/wrapper/src/session-bootstrap.ts

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic marked this pull request as draft September 23, 2026 07:57
@iscekic
iscekic force-pushed the kwf/28572-b-worktree-restore-d2e6 branch from fe37294 to d9928b7 Compare September 23, 2026 09:08
@iscekic
iscekic marked this pull request as ready for review September 23, 2026 09:33
@iscekic
iscekic marked this pull request as draft September 23, 2026 10:13
@iscekic
iscekic force-pushed the kwf/28572-b-worktree-restore-d2e6 branch from 6abfa46 to a392d9c Compare September 23, 2026 11:50
@iscekic
iscekic marked this pull request as ready for review September 23, 2026 12:11
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 23, 2026
@iscekic iscekic self-assigned this Sep 23, 2026
Comment thread services/cloud-agent-next/wrapper/src/restore-session.ts
Comment thread services/cloud-agent-next/src/kilo/wrapper-client.ts Outdated
@iscekic
iscekic requested a review from pandemicsyn September 24, 2026 14:49
Comment thread services/cloud-agent-next/wrapper/src/restore-outcome.ts Outdated
Comment thread services/cloud-agent-next/wrapper/src/restore-outcome.ts Outdated
Truncating with file.slice cut by UTF-16 code unit, so a path longer than
the 200-unit cap with a non-BMP character at the cut point kept a lone high
surrogate, which reached the rules note unpaired. Slice the code-point array
instead and pin it with a regression test.
@iscekic
iscekic merged commit 37966e9 into main Sep 24, 2026
28 checks passed
@iscekic
iscekic deleted the kwf/28572-b-worktree-restore-d2e6 branch September 24, 2026 16:58
iscekic pushed a commit to Kilo-Org/kilocode that referenced this pull request Sep 26, 2026
…4554)

## Automated docs sync — 2026-09-25

This PR keeps kilo.ai/docs in sync with features merged to [Kilo-Org/cloud](https://github.com/Kilo-Org/cloud) and [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode). Every change below links to the merged PR it documents.

- Window: `2026-09-24T07:08:33.639Z` → `2026-09-25T07:05:29.302Z`
- Verification (docs build + tests): **passing**

### Surface: `cloud-mobile`

- Assignees / requested reviewers: @iscekic and @eshurakov
- Derivation: Derived from the repository layout. A product surface is a package under packages/ that ships a distinct client, plugin, backend, or hosted service: cli = packages/opencode/ + packages/tui/ + packages/server/ + packages/sdk/ + packages/plugin/; vscode = packages/kilo-vscode/ + packages/kilo-web-ui/ + packages/kilo-ui/; jetbrains = packages/kilo-jetbrains/; gateway = packages/kilo-gateway/; web = packages/kilo-console/ + packages/kilo-indexing/ + packages/kilo-memory/ + packages/kilo-sandbox/. Docs route from the IA tree packages/kilo-docs/pages/ plus docs/jetbrains-vscode-settings-parity.md: each surface lists the pages sections that document it, and the per-platform pages under packages/kilo-docs/pages/code-with-ai/platforms/ map to the matching extension surface (the vscode/ directory to vscode, jetbrains.md to jetbrains). A doc path belongs to the surface with the longest matching prefix; a path that matches none of those prefixes falls to `other` (the explicit other prefixes are listed under other.docs). The cloud surfaces are derived the same way from the Kilo-Org/cloud layout: cloud-mobile = apps/mobile/, cloud-web = apps/web/, cloud-extension = apps/extension/, and cloud-agent = the cloud-agent packages under packages/ (packages/cloud-agent-sdk/ + packages/cloud-agent-profile/). A cloud source names its repository while a bare string still means this repository. The pages under packages/kilo-docs/pages/collaborate/ document the cloud web app (app.kilo.ai: teams dashboard, billing, SSO, adoption dashboard), so they route to cloud-web. No page under packages/kilo-docs/pages/ documents the browser side-panel extension yet, so cloud-extension lists no docs prefix.
- Map: `.github/docs-sync/surfaces.json`
- Surface map: `cli`, `vscode`, `jetbrains`, `gateway`, `web`, `cloud-mobile`, `cloud-web`, `cloud-extension`, `cloud-agent`, `other`
- Source prefixes: `apps/mobile/` (Kilo-Org/cloud)
- Doc prefixes: `packages/kilo-docs/pages/code-with-ai/platforms/mobile.md`
- Paths that fall to `other`: `packages/kilo-docs/pages/community/`, `packages/kilo-docs/pages/kiloclaw/`, `packages/kilo-docs/pages/contributing/`, `packages/kilo-docs/LEARNINGS.md`, `docs/`
- Reviewers are ranked from `Kilo-Org/cloud`; the workflow needs a token with `contents: read` on that repository (repository secret `CROSS_REPO_ACCESS_TOKEN`, exposed to the upsert step as `CLOUD_REPO_TOKEN`).
- How the two were computed: Reviewers for `cloud-mobile` are ranked from `Kilo-Org/cloud` git history over `apps/mobile/` (a commit 180 days old counts half as much, half-life 180 days). Bots (author type "Bot" or a login matching /\[bot\]$/i) and people without admin, write, or maintain permission are excluded.

### Changes

<!-- docs-sync:changes:start -->
| Docs change | Source |
| --- | --- |
| updated pages/code-with-ai/platforms/mobile.md | [Kilo-Org/cloud#6386](Kilo-Org/cloud#6386) |
| updated pages/ai-providers/openai-chatgpt-plus-pro.md | [Kilo-Org/cloud#6702](Kilo-Org/cloud#6702) |
| updated pages/code-with-ai/platforms/cloud-agent.md | [Kilo-Org/cloud#6683](Kilo-Org/cloud#6683) |
| updated pages/getting-started/byok.md | [Kilo-Org/cloud#6692](Kilo-Org/cloud#6692) |
<!-- docs-sync:changes:end -->

### Pending — will retry

<!-- docs-sync:pending:start -->
_None._
<!-- docs-sync:pending:end -->

### Considered, no docs change needed

<!-- docs-sync:skipped:start -->
| PR | Reason |
| --- | --- |
| [Kilo-Org/cloud#6658](Kilo-Org/cloud#6658) | Internal sandbox lifecycle fix with no user-visible workflow or setting. |
| [Kilo-Org/cloud#6673](Kilo-Org/cloud#6673) | Internal container CA trust plumbing, no user-facing behavior. |
| [Kilo-Org/cloud#6672](Kilo-Org/cloud#6672) | Internal sandbox launch/recovery fix with no documented workflow change. |
| [Kilo-Org/cloud#6660](Kilo-Org/cloud#6660) | Internal cloud-agent queue delivery fix; no new command, setting, or workflow for users. |
| [Kilo-Org/cloud#6226](Kilo-Org/cloud#6226) | Internal gateway alias-routing change, not user-visible. |
| [#14490](#14490) | Tool-call animation and streaming UI polish; users do not need to learn a new workflow. |
| [#14530](#14530) | Bug fix restoring intended worktree-pool behavior, no doc change needed. |
| [#14529](#14529) | Bug fix restoring tab/panel state across project switches. |
| [#14531](#14531) | Reconnect recovery bug fix, restores already-documented behavior. |
| [#14532](#14532) | Bug fix keeping session tab title in sync on rename. |
| [Kilo-Org/cloud#6088](Kilo-Org/cloud#6088) | Removes internal/admin model-experiment surfaces, not public product docs. |
| [Kilo-Org/cloud#6682](Kilo-Org/cloud#6682) | Internal control-socket reconnect race fix, no user-facing change. |
| [#14534](#14534) | Transcript re-render performance bug fix. |
| [#14535](#14535) | Bug fix preserving the loaded browser page across context switches. |
| [Kilo-Org/cloud#6684](Kilo-Org/cloud#6684) | Reverted by Kilo-Org/cloud#6685. |
| [Kilo-Org/cloud#6678](Kilo-Org/cloud#6678) | Dead-code constant removal, no user-visible effect. |
| [Kilo-Org/cloud#6687](Kilo-Org/cloud#6687) | Removes internal model-experiment maintenance and retains tables, no user-facing change. |
| [#14515](#14515) | JetBrains plugin unload crash fix, no documented behavior change. |
| [#14520](#14520) | JetBrains transcript/list rendering performance work. |
| [Kilo-Org/cloud#6614](Kilo-Org/cloud#6614) | Mobile PR Review header and session title bug fix, no doc change needed. |
| [Kilo-Org/cloud#6625](Kilo-Org/cloud#6625) | Internal mobile secure-store error-handling refactor. |
| [Kilo-Org/cloud#6624](Kilo-Org/cloud#6624) | Mobile auth bug fix that stops a retry loop; restores expected sign-in behavior with no new setting or workflow. |
| [#14310](#14310) | Contributor/CI fix making the kilo-v2 checkout installable; not user-visible product behavior. |
| [Kilo-Org/cloud#6611](Kilo-Org/cloud#6611) | Mobile notification-tap fix that selects the session's organization; restores correct behavior rather than adding a learnable feature. |
| [Kilo-Org/cloud#6644](Kilo-Org/cloud#6644) | Mobile sign-in layout/alignment polish; no change to what a user must do. |
| [Kilo-Org/cloud#6601](Kilo-Org/cloud#6601) | Mobile layout fix keeping empty states clear of the tab bar; purely visual. |
| [#14543](#14543) | CI/release infrastructure adding Windows binary code signing; no public docs impact. |
| [Kilo-Org/cloud#6616](Kilo-Org/cloud#6616) | Mobile visual defect fixes and a session-title fallback; no new user workflow or setting. |
| [Kilo-Org/cloud#6630](Kilo-Org/cloud#6630) | Reports an edge-case partial worktree restore; failure-path plumbing with no new user-facing workflow, target setting, or config. |
| [Kilo-Org/cloud#6699](Kilo-Org/cloud#6699) | Cloud Agent e2e stabilization plus internal idle-sandbox capacity handling; not user-visible. |
| [#14545](#14545) | Automated JetBrains release/changelog PR; underlying user-facing changes are triaged from their own PRs. |
| [Kilo-Org/cloud#6708](Kilo-Org/cloud#6708) | Internal AI-gateway request-logging policy change in the admin panel; no existing public docs surface and no change to how users run Kilo Code. |
| [#14533](#14533) | Documentation already shipped with the merged PR. The experimental.task_model_selection flag is gone from the current source, and pages/code-with-ai/agents/model-selection.md, pages/code-with-ai/agents/context-mentions.md, and pages/getting-started/settings/index.md already describe per-task selection as default-on with no stale experiment references. |
| [#14510](#14510) | Documentation already shipped with the merged PR. Marketplace companion-skill support is present in the current source (packages/opencode/src/kilocode/marketplace/companions.ts and installer), and pages/customize/marketplace.md already documents installing, publishing, and removing MCP servers with companion skills. |
<!-- docs-sync:skipped:end -->

---

(bot) Generated by the docs-sync workflow. Humans review and merge; while this PR stays open, the next daily run appends new changes here. Branch: `docs/auto-sync-2026-09-25`.
<!-- docs-sync: processed-through 2026-09-25T07:05:29.302Z -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants