Repository navigation
Runner split seam 11: one module per provider run (#1447, stacked on #1459) - #1460
Merged
currentbits merged 7 commits intoOct 5, 2026
Merged
Conversation
Seam 11, provider 1. startMuseRun moves verbatim behind the factory's
`const {…} = ctx`; its muse.js / muse-guardrail-hook.js imports move with
it (runner.js no longer uses them). ctx gains the hub helpers every
provider run shares (abortIfCancelled, claimPreparingRun,
stampPreparingSteps, settleCancelledLaunch, the work-log trio,
notifyRunTerminal, noteToolSpan) and the module-level helpers
assertProviderBinary, crossesBoundary, resolveSpawn, formatRunExitError,
upsertThinkingCard and PUSH_THROTTLE_MS. startRun keeps calling
startMuseRun by name; the factory runs before the boot crew sweep and
refreshAllQuotaWaits, the only construction-time paths into startRun.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1447) Seam 11, provider 2. startOpencodeRun moves verbatim behind the factory's `const {…} = ctx`; the opencode.js and opencode-guardrail.js imports move with it (runner.js no longer uses them). ctx gains persistToolImages. startRun keeps calling startOpencodeRun by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seam 11, provider 3. startKimiRun moves verbatim behind the factory's
`const {…} = ctx`; the kimi.js import moves with it (runner.js no
longer uses it). ctx gains assignContextUsage and THINKING_TRUNCATE.
startRun keeps calling startKimiRun by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1447) Seam 11, provider 4. startCursorRun moves verbatim behind the factory's `const {…} = ctx`; the cursor.js, cursorPinTaskParent.js and cursor-guardrail.js imports, ensureCursorMcpConfig and insertBeforeLast move with it (runner.js no longer uses them). ctx gains cursorToolCardSummary in the literal, and ingestTaskNotifications / noteCursorSubagent through one Object.assign after the subagents factory, ahead of every provider factory. startRun keeps calling startCursorRun by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seam 11, provider 5. startCodexRun moves verbatim behind the factory's
`const {…} = ctx`; the codex.js, codex-guardrail.js and
codexWorkspaceWrite.js imports, isCodexChildThread, sessionIdForResume,
honouredEfforts, the Codex MCP args/env, guardrailsEnabled and
guardrailNotice move with it (runner.js no longer uses them). ctx gains
runCodexFn, savePlanSteps and trackLiveCodexPid in the literal, and
handleCodexServerRequest (runner-permissions.js) in the provider
Object.assign. startRun keeps calling startCodexRun by name;
createRunner's return still exposes handleCodexServerRequest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…generic.js (#1447) Seam 11, provider 6. startSimulatedRun, startGenericRun and their helpers notePhaseEvents and finishSuccessSim move verbatim behind the factory's `const {…} = ctx`; parseAgentCommand moves with them. The simulate clock seams (tickMs, setIntervalFn, clearIntervalFn) are passed through ctx unchanged, along with core, runAgentFn and capitalize in the literal and afterFailedTurn / afterSuccessfulTurn (runner-verify-gate.js) in the provider Object.assign. startRun keeps calling both by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1447) Seam 11, provider 7 (last). startClaudeRun, which also drives Grok, moves verbatim behind the factory's `const {…} = ctx`; runClaude, the grok.js / grok-guardrail-hook.js imports, the Claude/Grok MCP helpers, isMemoryConsolidateTool, extractImages, classifyTool, fs and createHash move with it (runner.js no longer uses them). ctx gains unwrapStreamEvent, isPhantomClaudeResult, claudeContextTokens, reportedModelUsageWindow, classifyClaudeResultError, trackLiveClaudeChild and launchWasCancelled in the literal, and askUser, addSubagentRow, setSubagentStatus, claudeSessions, CLAUDE_ACK_MS, disposeClaudeSession and scheduleClaudeIdleReap in the provider Object.assign. startRun keeps calling startClaudeRun by name. createRunner's return object and runner.js module.exports are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Closed
4 tasks
currentbits
changed the base branch from
coder/runner-split-steps-6-10-047408
to
main
October 5, 2026 11:04
currentbits
deleted the
coder/runner-split-seam-11-provider-runs-9a8e80
branch
October 5, 2026 11:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Round 3, seam 11: the last step of the
createRunnersplit (#1447). Each provider's run function moves into its own flat module, one commit per provider. Claude goes last because it has the most dependencies.Stacked on #1459. Full chain: #1457 → #1454 → #1456 → #1458 → #1459 → this.
runner-provider-muse.jsrunner-provider-opencode.jsrunner-provider-kimi.jsrunner-provider-cursor.jsrunner-provider-codex.jsrunner-provider-generic.jsrunner-provider-claude.jsrunner.js: 6,738 → 2,628 lines (9,321 before round 3). What's left is what the design note says stays: opts,active, the hub functions (pushDetail, appendMessage, work-log, run lifecycle, markRunFailed, notifyRunTerminal), thestartRundispatcher, workflow runs, steer/stop/stopAll, the public queries, the ctx wiring and the return object.Checked
Object.assign(ctx, {…}), and two adapter destructures (cursorParse,kimiParse) that the moved code needs at module scope, asrunner.jshad them.const {…} = ctxkey already on ctx (checked by script).refreshAllQuotaWaits().electron/*.js, sopackage-app.sh/package-cross.shinclude them.createRunner's return object andmodule.exports.npm run typecheckclean.npm run test:smoke(real Electron launch: threads, provider runs, a workflow to completion) passes A–E.🤖 Generated with Claude Code