fix: wire worker model from preferences through to lane runner#522
Merged
HenryLach merged 4 commits intoMay 4, 2026
Merged
Conversation
Mirrors the existing reviewer model pipeline (buildReviewerEnv) for workers.
4 files, 62 insertions, 6 deletions
- types.ts: Add worker?: { model, thinking, tools, excludeExtensions } to TaskRunnerConfig
- config-loader.ts: Add worker field to toTaskRunnerConfig() return value
- execution.ts: Add buildWorkerEnv(), add workerConfig param to executeWave(),
wire into extraEnvVars, read workerModel/workerTools/workerThinking from env vars
- engine.ts: Pass worker config in executeWave() calls, wire buildWorkerEnv()
into executeLaneV2 retry call sites
Tests: project-config-loader 95/95 pass
Fixes: worker model from preferences.json being ignored
There was a problem hiding this comment.
Pull request overview
Fixes worker agent configuration propagation so taskRunner.worker.* in preferences.json (and project config) actually affects Runtime V2 lane execution, mirroring the existing reviewer model pipeline.
Changes:
- Extends
TaskRunnerConfigto includeworkermodel/thinking/tools (+ excludeExtensions) configuration. - Adds
buildWorkerEnv()and wires worker env vars throughexecuteWave()intoexecuteLaneV2()/LaneRunnerConfig. - Updates engine wave execution and retry paths to pass worker config through to execution.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
extensions/taskplane/types.ts |
Adds TaskRunnerConfig.worker shape for worker agent configuration. |
extensions/taskplane/config-loader.ts |
Adapts unified config → legacy task-runner config to include worker fields. |
extensions/taskplane/execution.ts |
Adds buildWorkerEnv(), extends executeWave() signature, and reads worker model/tools/thinking from env when building LaneRunnerConfig. |
extensions/taskplane/engine.ts |
Passes worker config into executeWave() and includes worker env vars in certain retry env injections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3763b3e to
d319e27
Compare
1. resume.ts: add workerConfig param to executeWave call 2-3. execution.ts: remove excludeExtensions from buildWorkerEnv (sole owner: buildWorkerExcludeEnv) 4. engine.ts: no buildWorkerEnv in modelFallbackRetry (preserves fallback semantics) 5. tests/worker-model.test.ts: 11 tests for buildWorkerEnv
Merged
5 tasks
…test window - Retag @SInCE TP-183 → @SInCE TP-181 in types.ts, execution.ts, worker-model.test.ts (PR author guessed at the task ID; this work is tracked as TP-181 in taskplane-tasks/CONTEXT.md). - Widen lane-runner-v2.test.ts test 3.6's executeLaneV2 source slice from 5000 to 6000 chars. The new TASKPLANE_WORKER_{MODEL,THINKING,TOOLS} env reads pushed runGit( past the 5000-char window. Both target calls (commitTaskArtifacts, runGit) are still present in the function — the test was brittle to function body growth, not detecting a real regression. - CHANGELOG: add Unreleased/Fixed entry crediting @NerfEko (HenryLach#522).
This was referenced May 4, 2026
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.
Summary
Mirrors the existing reviewer model pipeline (
buildReviewerEnv→TASKPLANE_REVIEWER_MODEL→extraEnvVars→LaneRunnerConfig) for workers, sotaskRunner.worker.modelinpreferences.jsonactually takes effect.Type of Change
Problem
The reviewer model flows through a dedicated pipeline:
No equivalent exists for workers. Three specific gaps:
TaskRunnerConfighasreviewer?: { model, thinking, tools, … }but workers only getworkerExcludeExtensions?: string[]— no model fieldbuildReviewerEnv()exists but nobuildWorkerEnv()LaneRunnerConfighardcodesworkerModel: ""whilereviewerModelreads from envChanges
types.tsworker?: { model, thinking, tools, excludeExtensions }toTaskRunnerConfigconfig-loader.tsworkerfield totoTaskRunnerConfig()return valueexecution.tsbuildWorkerEnv(), addworkerConfigparam toexecuteWave(), wire intoextraEnvVars, readworkerModel/workerTools/workerThinkingfrom env varsengine.tsexecuteWave()calls, wirebuildWorkerEnv()intoexecuteLaneV2retriesKey before/after
execution.ts— LaneRunnerConfig builder:engine.ts— executeWave call:Validation
npm test— config-loader: 95 pass / 0 fail, lane-runner: 47 pass / 1 fail (pre-existing, fails on clean branch too)taskRunner.worker.model: "openrouter/moonshotai/kimi-k2.6"in preferences.json, verified kimi-k2.6 usage appears in OpenRouter dashboard. Reviewer model continues to work as before.taskplane doctor— all checks passedDocumentation
CHANGELOG.mdupdated (for release-relevant changes)Checklist
Related Issues
None (new bug discovered)