fix(cursor): persist resume id early and return 409 for resume_unavailable (#745)

Remote cursor launcher now mirrors local launcher by writing cursorSessionId
to hub metadata as soon as --resume is known, before the agent init event.
POST /sessions/:id/resume maps resume_unavailable to 409 with clearer guidance.

Fixes tiann/hapi#744

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
HeavyGee
2026-05-31 09:40:05 +08:00
committed by GitHub
co-authored by Cursor
parent 6200ae1370
commit c58e8cea9e
5 changed files with 70 additions and 4 deletions
+3
View File
@@ -82,6 +82,9 @@ class CursorRemoteLauncher extends RemoteLauncherBase {
};
let cursorSessionId: string | null = session.sessionId;
if (cursorSessionId) {
session.onSessionFound(cursorSessionId);
}
while (!this.shouldExit) {
const waitSignal = this.abortController.signal;