Missions Tab Overhaul And Fixes#257
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds mission CLI/MCP mode, run-graph waiting, coordinator message queueing, resume via AI orchestrator, expanded phase/validation policy, coordinator tools updates, IPC compaction/redaction, embedding gating/defer, logging refactor, lane linking, OpenCode ADE MCP config, Codex schema strictification, and tests. ChangesEnd-to-end mission and runtime orchestration
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
|
@copilot review but do not make fixes |
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
Reviewed the current PR changes through commit |
|
@copilot review but do not make fixes |
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
Reviewed the branch through commit |
077eb53 to
1070291
Compare
|
@cursor review |
|
@copilot review but do not make fixes |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
Reviewed the branch through commit |
|
@cursor review |
|
@copilot review but do not make fixes |
Reviewed the branch through commit |
|
@copilot review but do not make fixes |
|
@cursor review |
0f8f8c4 to
918a4cd
Compare
|
@copilot review but do not make fixes |
|
@cursor review |
| method: "ade-cli/sleep", | ||
| params: { ms: Math.min(30 * 60 * 1000, Math.max(0, Math.floor(ms))) }, | ||
| }; | ||
| } |
There was a problem hiding this comment.
Dead code: sleepStep defined but never called
Low Severity
sleepStep creates an InvocationStep with method: "ade-cli/sleep" and a runtime handler exists for that method (line 6595), but no call site in buildMissionsPlan or any other plan builder ever invokes sleepStep. If a deliberate pause between plan steps was intended (e.g., before polling after launch), the delay is silently skipped.
Reviewed by Cursor Bugbot for commit 918a4cd. Configure here.
|
@copilot review but do not make fixes |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fe0b741. Configure here.


Summary
Describe the change.
What Changed
Key files and behaviors.
Validation
How you tested.
Risks
Anything to watch.
Note
Medium Risk
Touches mission orchestration/RPC routing (resume, worker messaging, worker-state reporting) and introduces new headless RPC/MCP servers, which could affect run control and inter-agent communication if regressions occur.
Overview
Adds a typed
missionscommand surface toade-cli(create/launch/start/watch/graph/runs/pause/resume/cancel), including optional wait-for-run-graph polling to keep headless runtimes alive and richer text formatters for mission outputs.Extends the CLI to run as a stdio MCP server via
ade mcp, with tool-name normalization and optional scoping to coordinator tools; headless mode now also spins up local TCP + mirror socket RPC servers (withADE_RPC_URL/ADE_RPC_SOCKET_PATHoverrides) to support worker/tool callers.Improves mission-runtime RPC behavior: routes
resume_missionthroughaiOrchestratorService.resumeRun, exposesmessage_workerto agent callers with enforced worker ownership and a queued-for-polling fallback when live delivery fails, and expandsget_worker_statesto include persistedrunWorkersderived from the run graph while filtering out non-worker/task/system steps.On the desktop side, tightens embedding usage by gating hybrid search + embedding worker processing when there are active runs/sessions, and makes Codex task execution more robust by converting structured output schemas into stricter Codex-compatible JSON Schemas (with accompanying tests).
Reviewed by Cursor Bugbot for commit fe0b741. Configure here.
Greptile Summary
This PR adds a typed
missionsCLI surface (create/list/launch/start/watch/graph/runs/pause/resume/cancel) with text formatters and a headlesswait-run-graphpolling loop, and introducesade mcpmode that exposes ADE tools over stdio MCP with optional coordinator-only scoping.message_workeris exposed to agent callers with strict caller-context enforcement; when live delivery fails the message is queued to the DB poll path (only on failed delivery);resume_missionis rerouted throughaiOrchestratorService.resumeRunso coordinator restart and resume-message injection occur correctly.get_worker_statesenriched: Response now includes arunWorkersarray derived from the run graph viaisRunWorkerStepfiltering, correctly excluding planner, system-managed, and display-only task steps from peer discovery.spawnWorkerStepnow fuzzy-matches reusable task shells by name/token overlap, applies phase hints, propagatesreadOnlymetadata, and threadsretryLimitfrom delegation contracts into step creation and task-shell conversion.Confidence Score: 4/5
Safe to merge with review of the intervention_required status handling in missionService and the run-view subscription resilience; the core RPC and MCP plumbing is sound.
The isRunWorkerStep filter, the conditional DB queue write in message_worker, and the rerouting of resume_mission through aiOrchestratorService.resumeRun are all correct. The riskier areas are the ACTIVE_MISSION_STATUSES change that drops intervention_required from the concurrency cap and the active dashboard query, and the removal of the periodic polling fallback in the run view — both are live behavioral changes affecting mission coordination and UI state during user-input pauses that deserve targeted validation.
apps/desktop/src/main/services/missions/missionService.ts (intervention_required concurrency and dashboard filtering), apps/desktop/src/renderer/components/missions/useMissionRunView.ts (subscription-only refresh with no safety fallback), apps/desktop/src/renderer/components/missions/MissionChatV2.tsx (load-older path is now dead code)
Important Files Changed
Sequence Diagram
sequenceDiagram participant CLI as ade CLI participant ADE as ADE RPC Server participant ORC as aiOrchestratorService participant DB as DB / KV Store participant AGENT as Worker Agent Note over CLI,AGENT: missions launch --wait-ms 30000 CLI->>ADE: "mission.create (autostart=false)" ADE->>DB: INSERT mission CLI->>ADE: orchestrator.startMissionRun ADE->>ORC: ensureCoordinatorAgentV2 ORC-->>AGENT: start coordinator CLI->>ADE: ade-cli/wait-run-graph (poll 1s) loop until terminal or deadline CLI->>ADE: orchestrator_core.getRunGraph ADE-->>CLI: "{run.status, steps, attempts}" end CLI-->>CLI: format mission-watch output Note over CLI,AGENT: resume_mission RPC tool AGENT->>ADE: "resume_mission {runId}" ADE->>ORC: aiOrchestratorService.resumeRun ORC->>ORC: ensureCoordinatorAgentV2 ORC->>AGENT: injectMessage [RUN RESUMED] ORC-->>ADE: OrchestratorRun Note over AGENT,DB: message_worker (agent caller) AGENT->>ADE: "message_worker {toWorkerId, content}" ADE->>ADE: normalizeAgentDelegationToolArgs (enforce fromWorkerId) ADE->>ORC: coordinatorTool.execute alt live delivery succeeds ORC-->>AGENT: "{delivered:true, queuedForPolling:false}" else live delivery fails ADE->>DB: maybeSendInterAgentMessage (polling queue) ADE-->>AGENT: "{delivered:false, queuedForPolling:true}" end Note over CLI,DB: ade mcp (stdio MCP server) CLI->>CLI: runMcpServer (headless) CLI->>CLI: startJsonRpcServer over stdin/stdout loop MCP requests CLI->>ADE: ade/actions/call (scoped by ADE_MCP_TOOL_SCOPE) ADE-->>CLI: result CLI-->>CLI: MCP tools/call response endReviews (6): Last reviewed commit: "fix: address headless drain review" | Re-trigger Greptile
Summary by CodeRabbit
New Features
Bug Fixes
Improvements