feat(mcp): add detached consults and non-cancelling waits - #430
feat(mcp): add detached consults and non-cancelling waits#430oraclexing wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:33 AM ET / 11:33 UTC. ClawSweeper reviewWhat this changesThe branch adds opt-in detached MCP consults and a wait tool that observes durable session completion without cancelling the worker. Merge readinessKeep this PR open: it is the active candidate for the linked feature request, but the new MCP lifecycle contract needs maintainer sponsorship and inspectable real-behavior proof before merge. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOracle’s MCP server turns agent requests into durable local sessions. A detached CLI worker executes the session, while a separate MCP wait call observes the stored terminal state and returns its output and artifacts. flowchart LR
A[Agent MCP client] --> B[Consult request]
B --> C[Durable session metadata]
C --> D[Detached CLI worker]
A --> E[Wait request]
E --> F[Metadata watcher]
F --> C
C --> G[Final output and artifacts]
Decision needed
Why: This adds a new agent-facing execution model and API surface; no maintainer approval appears in the supplied discussion. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Sponsor a stable local-MCP lifecycle API, retain the shared CLI worker handoff, and attach redacted end-to-end stdio evidence for detached launch, waiter release, and terminal session recovery. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction. The supplied body claims a real smoke, but it contains no inspectable after-fix output or artifact for this review. Is this the best way to solve the issue? Unclear: reusing the gated CLI worker is a coherent implementation path, but maintainers must first accept the new MCP lifecycle contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa0e6fd669ad. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
consult(waitForCompletion:false)to start local API or browser runs in a detached worker and return a durable session id immediatelywaitMCP tool with optionaltimeoutMs, filesystem wakeups, durable metadata rereads, and a low-frequency fallbackwindowsHide:truefor Windows workersconsultas the compatibility defaultA bounded wait returns
waitStatus:"timed_out"while the session remains running. OmittingtimeoutMswaits indefinitely;0returns an immediate snapshot. Remote browser-service consults remain synchronous for now.Fixes #429.
Validation
pnpm run buildpnpm run lintpnpm run docs:checkwaitwoke on the worker's expected no-API-key error terminal state; worker exited independentlyWindowsTerminal.exeorOpenConsole.exeprocesses