| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found#26535 - feat(opencode): add model parameter to task tool for subagent model override
This is intentional, not a conflict—#29447 is the forward port to replace #26535. |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
…erride-port # Conflicts: # packages/core/src/v1/config/permission.ts # packages/opencode/src/tool/task.ts # packages/opencode/test/tool/task.test.ts
…erride-port # Conflicts: # packages/opencode/test/tool/task.test.ts
|
Refreshed this PR against latest dev (commit 4ddfa7c). Current PR checks are passing, and the diff is still scoped to the Task tool model override implementation. Ready for maintainer review when you have a chance. |
Sorry, something went wrong.
|
Friendly bump for maintainer review when someone has bandwidth. This PR has been refreshed onto latest dev, is mergeable, and the current PR checks are passing. Happy to adjust anything that would make it easier to land. |
Sorry, something went wrong.
|
Hey @kobicovaldev , what is the merge plan for this PR, when can we expect this change to be in dev ? |
Sorry, something went wrong.
|
Thanks for the interest @Sufyan31. I’m the PR author, but I don’t have merge permissions on this repo, so this is waiting on maintainer review/merge. The PR is currently mergeable, checks are passing, and maintainerCanModify is enabled. @thdxr / @adamdotdevin, would one of you be able to review or let me know if anything else is needed to land this? |
Sorry, something went wrong.
|
Thanks for carrying this forward. A strong +1 from a multi-model independent sampling / review convergence use case: the important part for us is being able to have one orchestrator delegate the same role/prompt to different models in the same run, then compare agreement/disagreement and converge on the result. That is useful for review-consensus and second-opinion loops, and it breaks down if we have to duplicate agent definitions per model. We want agents to stay role-centric, with the caller choosing the model per invocation when needed. So this feels directly aligned with #17595 and #29984, and it would also help unblock downstream review flows like #30289. Not asking for a separate fallback mechanism here — just first-class runtime model selection for Task/subagent calls. |
Sorry, something went wrong.
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds per-dispatch controls to the Task tool: - model override (provider/model), permission-gated via model_override (default deny), supersedes anomalyco#29447 - resumed tasks keep their last-used model and variant instead of reverting to the agent default - human-readable slug task_ids with deterministic child session ids and agent-chosen session slug, supersedes anomalyco#32122 - per-dispatch variant override - structured dispatch metadata persisted on the child session - explicit resume consent: resuming an idle/completed task session requires resume: true - timeout (ms) per attempt and fallback_model retried once on timeout or typed failure, never on parent abort; runner-only cancelRun avoids self-cancelling the enclosing background job
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an optional `model` parameter to the task tool (provider/model format) that overrides the subagent's model, gated behind a new `model_override` permission that defaults to deny. Selection precedence is the `model` parameter, then the subagent's configured model, then the parent assistant message model. Ported from anomalyco#29447 (adapted for the Effect layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an experimental subagent-interrupt capability (behind OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a turn-boundary consume in the prompt loop that injects an escaped steer/cancel frame plus a visible transcript marker. Cancel records a terminal reason and force-breaks after a grace window; abort writes a marker, records the terminal, and cancels the BackgroundJob immediately. The TUI gains an esc-with-reason flow, footer button, and distinct interrupt markers. Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #17595
Type of change
What does this PR do?
This adds an optional model parameter to the Task tool so a primary agent can choose a subagent model at runtime using provider/model format.
The model selection order is explicit Task model, then the configured subagent model, then the parent assistant message model. Explicit overrides are gated behind a new model_override permission, which defaults to deny. The implementation validates malformed model strings early, asks model_override before the normal task permission, and uses exact-model approval scope.
This is a refreshed forward-port of #26535 onto current dev. Credit to @funkybooboo for the original implementation and design. I opened this separately because #26535 is conflicted and far behind the base branch.
How did you verify your code works?
Full local test commands were blocked in my checkout because required local tooling/dependencies were missing:
Screenshots / recordings
Not applicable. This is not a UI change.
Checklist