API discovery: Kilo Code’s public OpenAPI contract defines POST /kilocode/migrate/sessions. Its fresh server-side migration change removes the awkward older pattern of sending transcript bytes and a target session from the client. Instead, the configured Kilo server rediscovers Claude Code or Codex sources it can read, creates one Kilo session per source, and records migration provenance so an ordinary rerun can return skipped: true.
Try it
Build a small migration concierge for a team changing agent clients. Let a developer select a prior Codex session, then have the configured Kilo service migrate only that source and return the new Kilo session ID for a review screen. The useful part is not bulk import; it is a retry-safe handoff that never asks a browser or remote client to upload transcript bytes merely because the server needs to do the import.
POST /kilocode/migrate/sessions
Content-Type: application/json
{
"cwd": "/workspace/atlas",
"formats": ["codex"],
"ids": ["selected-session-uuid"],
"agent": "build"
}
The public contract also allows a model and an explicit force flag. Leave force off for a normal retry: the integration tests show that a second identical migration points back to the existing session and is counted as skipped.
Copy-paste agent instruction
In a disposable, authenticated Kilo Code server that is authorized to read the selected machine's Claude Code or Codex session directories, inspect the public OpenAPI contract for POST /kilocode/migrate/sessions. Ask the user to select one session ID and one format, then call the configured server with filters only; do not upload transcript bytes. Surface each returned session ID, skipped flag, dropped-content notice, and per-session error. Treat a normal rerun as a no-op, and do not use force unless the user explicitly wants a new migration.
Test caveat
This reporting run did not call a live Kilo server. The inspected public sources describe the endpoint and its tests but do not publish a base URL, authentication recipe, rate limit, or permission model. The server must actually have authorized access to the relevant source directories; it cannot discover a developer’s files on another machine. Kilo’s public CLI documentation also says imports can skip content it cannot represent. Test against disposable transcripts, review the returned dropped entries, and do not treat server-side discovery as a privacy guarantee.