Repository navigation
fix(prompt): bind a command outcome to the custom OmO holding the session, not its SDK child (#1985) - #2186
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging bd70d95: omo-native-code-reviewer and Codex both pass this head. The four new cases fail on main, where the command is bound to the SDK child (#1985), and pass here. Other agents and Windows binding are unchanged. The required checks are green, and CodeRabbit did not review this head. Codex's two MEDIUMs need two session holders in one pane, or a pid reused in a microsecond window. They go to a follow-up issue with the LOW notes. |
Fixes #1985
#1985 had two halves. The first was the synchronous macOS
psbehindpaneProcessRoots,codexTranscriptPathandhermesTranscriptForPane, and #1980 already removed it on main. The second was that command outcomes picked a custom OmO without the session-holder rule. This PR fixes the second.What changes for the user
server/prompt.tsoutcomeProcess) found it throughagentProcessesalone. A/commandsent to it was therefore bound to its bundled Claude SDK child, which matches omo by itsomo-aipath and exits at the end of each turn. When the child exited, the row was never adopted into the session herdr then reported for the pane, and stayed out of it. Queued messages already preferred the holder (fix(pending): bind a queued message to the agent process as command outcomes do, and read its birth without blocking #1986).How
bindCommandProcess(paneId, command, seen, pane): for an OmO send it readsheldOmoProcessonce, the rule pending sends and typing use, and passes it toagentProcessInFront. The three callers (core/composer.tstwice,core/pending.ts) pass the pane.held, together with its start time, on macOS too. On macOS that start is the kernel'skinfo_procrecord from fix(server): read macOS process starts and terminals from the kernel, and await name lookups' git #1980, notps. The bound check (checkBoundProcess) accepts it while herdr lists it, even thoughagentProcessesdoes not name it, and reads no holders again on a poll.heldis only read foromo.The
pshalf (already on main)On eamac (macOS, Bun 1.4.3), in a
/tmpclone of maindbbaad5,processStartedAtandprocessStartedAtAsyncfor a live child return the same exact start in 2.2 ms with noBun.spawnSynccall, and a missing pid gives null.server/process-start.tshas nospawnSync.codex.tsandhermes.tsstill call the synchronousprocessStartedAt, which on macOS is now that kernel read, not a subprocess.How it was verified
server/outcome-omo-holder.test.tsdrives the realGET /api/pane/prompt(handlePromptRequest) with a custom OmO, its holder record and its SDK child, with no per-process cwd (as on macOS). It has four cases:heldOmoProcessis not called on any poll. This fails on the first commit.bun run check fastpasses on the final change before the last rebase (7937 unit tests, 0 fail). The rebase onto main brought in only plugin, Codex model and sidebar changes, and the 18 suites above pass again on it.core/pending-omo-holder.test.ts.heldOmoProcessran on every poll, 194 to 815 ms of synchronous reads with thousands of holder folders.