fix(cli,hub): wire Cursor --existing-session-id for ACP remote resume (#991) (#1128)

Hub already passes access.sessionId on resume (#1088); Cursor CLI still ignored
it (Codex-only). Parse/pass the flag for cursor and lock in reuse-without-ready-wait tests.

Co-authored-by: Debian <heavygee@oos-linux.in.lockhouse>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
HeavyGee
2026-07-24 10:52:55 +08:00
committed by GitHub
co-authored by Debian Cursor
parent fee853766a
commit 40314237ae
4 changed files with 176 additions and 2 deletions
+4 -1
View File
@@ -1115,7 +1115,10 @@ export function buildCliArgs(
}
}
args.push('--hapi-starting-mode', 'remote', '--started-by', 'runner');
if (agent === 'codex') {
// Codex import/resume (#1088) and Cursor ACP remote resume (#991) both reuse
// the original HAPI row via --existing-session-id so the hub does not depend
// on session-ready over a remote socket before merge.
if (agent === 'codex' || agent === 'cursor') {
const existingSessionId = options.existingSessionId ?? options.sessionId;
if (existingSessionId) {
args.push('--existing-session-id', existingSessionId);