GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): Subtasks and task calls don’t inherit selected thinking level by dbpolito · Pull Request #20742 · anomalyco/opencode

Conversation

@dbpolito

@dbpolito dbpolito commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #20740

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When a non-default thinking level is selected, command-created subtasks and task sub-sessions can drop the current variant and fall back to the model default.

What's Happening

Some subtask/task paths lose the selected thinking level, always using default

Expected

  • Subtasks inherit the current thinking level
  • task inherits it unless an explicit variant is passed
  • ACP/Desktop command flows preserve it too

How did you verify your code works?

Added some tests and also did manual test as video below.

Screenshots / recordings

Cap 2026-04-02 at 16 57 22

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

danielsuguimoto reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dbpolito
fix: preserve subtask variants across commands
81ac41c
- pass the selected variant into command-created subtasks
- inherit the parent variant in the task tool when no override is provided
- add coverage for variant propagation and regenerate SDK schemas
@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Apr 2, 2026
@dbpolito
Merge branch 'dev' into fix/subtask-variant
4f00456
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 2, 2026
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR Found:

  • PR feat(task): pass variant to subagent so it inherits parent's thinking level #12567: "feat(task): pass variant to subagent so it inherits parent's thinking level"
    • URL: feat(task): pass variant to subagent so it inherits parent's thinking level #12567
    • This PR addresses a similar issue of passing the variant (thinking level) to subagents so they inherit the parent's thinking level settings.

However, PR #12567 appears to be a past feature implementation, while PR #20742 is a bug fix addressing the issue that subtasks and task calls are still not properly inheriting the selected thinking level. The current PR is likely fixing a regression or incomplete implementation of the variant inheritance mechanism.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dbpolito
test: simplify prompt effect variant test
82d4e95
- use MessageV2.filterCompactedEffect in the subtask variant inheritance test
- keep the test aligned with the compacted message helper API
@github-actions github-actions Bot mentioned this pull request Apr 3, 2026
fix(opencode): inherit thinking level (variant) in task tool subtasks #20811
Closed
3 of 6 tasks
dbpolito added 7 commits April 6, 2026 15:43
@dbpolito
Merge branch 'dev' of github.com:sst/opencode into fix/subtask-variant
806f637
@dbpolito
fix: align subtask variant handling
6e15a18
- source subtask variants from the last user message instead of task payloads
- remove the unused subtask variant field from the session schema
- regenerate SDK and OpenAPI artifacts to match the updated API shape
@dbpolito
fix: inherit parent variant for task subtasks
4b4732d
- remove task tool variant overrides from the prompt payload and schema
- ensure subtask sessions always use the parent message variant
- update prompt and task tests to assert inherited variant metadata
@dbpolito
fix: correct task variant test typing
8f66d00
- align the prompt-effect test input type with the task tool schema
- keep the inherited-variant assertion while removing the stale variant-only shape
@dbpolito
revert tests
475abfc
@dbpolito
fix: preserve subtask variants
6ba9f76
- pass the selected variant into command-created subtasks
- cover variant inheritance in task tool execution
- verify assistant task metadata keeps the inherited variant
@dbpolito
fix: satisfy subtask test metadata typing
e39f822
- include the optional variant field in the task mock metadata
- keep pre-push typechecking green for the new variant tests
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 2f2ed11 to 9f201d6 Compare April 16, 2026 21:55
@github-actions github-actions Bot mentioned this pull request Apr 29, 2026
fix(opencode): apply agent variant when no explicit model is configured #24962
Closed
3 of 6 tasks
@rekram1-node

rekram1-node commented May 15, 2026

Copy link
Copy Markdown
Member

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node rekram1-node closed this May 15, 2026
@rekram1-node rekram1-node added the automated-pr-cleanup label May 15, 2026
@jsheremeta-alt jsheremeta-alt mentioned this pull request Jun 4, 2026
subagent model variants are parsed but not applied at runtime in v1.4.0 #21632
Closed
@jsheremeta-alt

jsheremeta-alt commented Jun 4, 2026

Copy link
Copy Markdown

This PR was closed by automated cleanup due to insufficient reactions, but the bug it fixes is still present in v1.15.13.

I confirmed the same root cause via binary analysis and session database queries: the Task tool drops variant and agent options when calling SessionPrompt.prompt(). Every sub-agent session in my local database records variant: "default" regardless of what is configured in agent frontmatter.

Related evidence posted on #21632: #21632 (comment)

Any chance this can be reopened? The fix looked solid and had test coverage.

atiabbz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Subtasks and task calls don’t inherit selected thinking level

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dbpolito @rekram1-node @jsheremeta-alt
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.