Skip to content

feat: add subAgent temperature configuration via config.yaml#460

Merged
avoidwork merged 9 commits into
mainfrom
feat/subagent-temperature-config
Jun 27, 2026
Merged

feat: add subAgent temperature configuration via config.yaml#460
avoidwork merged 9 commits into
mainfrom
feat/subagent-temperature-config

Conversation

@avoidwork

@avoidwork avoidwork commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Description

Adds configurable temperature for subAgent processes, allowing users to control LLM sampling randomness independently of the main process. Temperature follows the resolution hierarchy: per-call > env var > config default > provider default.

This change adds process.subAgent.temperature to config.yaml (default 0.7), passes it to spawned processes via SUB_AGENT_TEMPERATURE env var, overrides provider temperature in spawned processes, and adds an optional per-call temperature parameter to the subAgent tool schema.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

Unit tests added for config loader (subAgent temperature preservation), provider (temperature override via env var, invalid/empty/out-of-range handling), and full test suite passes.

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

@avoidwork

Copy link
Copy Markdown
Owner Author

Audit Results: SubAgent Temperature Configuration

Audit 1: Specs Against Goals

Coverage Audit

  • Goal 1 (config field): Covered by spec requirement "SubAgent temperature is configurable in config.yaml" with scenarios for default, custom, invalid (>2), negative values. Tasks 1.1-1.3 cover this.
  • Goal 2 (pass to spawned process): Covered by spec requirement "Temperature is passed to spawned subAgent process" with scenarios for env var passing and default. Tasks 3.2-3.3 cover this.
  • Goal 3 (override in spawned process): Covered by spec requirement "Spawned process overrides provider temperature" with scenarios for env var and fallback. Tasks 4.1-4.3 cover this.
  • Goal 4 (per-call override): Covered by spec requirement "Per-call temperature override in subAgent tool" with scenarios for override, env var override, default resolution, and invalid value rejection. Tasks 3.1, 3.4 cover this.

Fidelity Audit

Specs faithfully represent the original intent. The resolution hierarchy (per-call > env var > config default) is correctly captured in all relevant requirements.

Completeness Audit

All goals are covered. Added scenario for invalid per-call temperature values to address a minor gap. All edge cases (default, custom, invalid, negative, empty) are covered.

Consistency Audit

Tasks map well to spec requirements. All spec requirements have corresponding tasks. Testing tasks (5.1-5.4) cover all requirements.

Result: No errors found. Proceeding to Step 6.

@avoidwork avoidwork merged commit c2baafa into main Jun 27, 2026
2 checks passed
@avoidwork avoidwork deleted the feat/subagent-temperature-config branch June 27, 2026 23:45
@avoidwork avoidwork mentioned this pull request Jun 27, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant