Skip to content

[FEATURE]:Add temperature parameter to task tool for dynamic subagent control #18379

@huyusong10

Description

@huyusong10

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description

When using the task tool to delegate work to subagents, there's currently no way to dynamically control the temperature parameter on a per-task basis. The temperature is fixed by the agent configuration, which limits flexibility when the main LLM needs to adjust behavior based on task requirements.

Use Case

In dynamic subagent delegation scenarios, the main LLM may want to:

  • Use lower temperature (e.g., 0.2) for deterministic tasks like code analysis, data extraction, or fact-finding
  • Use higher temperature (e.g., 0.8) for creative tasks like brainstorming, content generation, or exploratory research
    Currently, the LLM cannot adjust these parameters dynamically during task delegation, reducing the effectiveness of subagent orchestration.

Proposed Solution

Add an optional temperature parameter to the task tool that:

  • Accepts values from 0.0 to 2.0
  • Overrides the agent's default temperature when provided
  • Follows the priority: task temperature > agent temperature > provider default

Example Usage

task({
description: "Analyze code patterns",
prompt: "...",
subagent_type: "explore",
temperature: 0.2 // More deterministic for analysis
})
task({
description: "Generate creative ideas",
prompt: "...",
subagent_type: "general",
temperature: 0.9 // More creative for ideation
})

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions