Skip to content

fix(opencode): reconcile agent selection during TUI startup#20674

Closed
sjawhar wants to merge 1 commit into
anomalyco:devfrom
sjawhar:fix/tui-agent-selection-reconcile
Closed

fix(opencode): reconcile agent selection during TUI startup#20674
sjawhar wants to merge 1 commit into
anomalyco:devfrom
sjawhar:fix/tui-agent-selection-reconcile

Conversation

@sjawhar
Copy link
Copy Markdown

@sjawhar sjawhar commented Apr 2, 2026

Issue for this PR

Fixes #16034

Type of change

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

What does this PR do?

Fix agent selection reconciliation during TUI startup to prevent stale/missing agent state. Ensures the agent selector reflects actual available agents after plugin loading completes.

How did you verify your code works?

  • Ran bun typecheck from packages/opencode
  • Ran targeted unit tests
  • Tested with custom binary build

Checklist

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

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

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

Based on my search, I found potential related PRs:

  1. PR Fix/issue 16982 agent current undefined #17015 - "Fix/issue 16982 agent current undefined"

    • May be related to similar agent state issues during initialization
  2. PR fix:Guard against missing agent, add warning & fallbacks, and fix dialog mouse selection handling #19685 - "fix: Guard against missing agent, add warning & fallbacks, and fix dialog mouse selection handling"

    • Addresses missing agent handling and agent selection in the TUI, which could overlap with agent selection reconciliation

These PRs deal with agent state management and selection in the TUI context. However, they appear to be addressing specific issues rather than the same reconciliation problem during startup that PR #20674 is targeting. The most relevant one is #19685 given its focus on agent selection handling.

@sjawhar sjawhar changed the title fix(tui): reconcile agent selection during startup fix(opencode): reconcile agent selection during TUI startup Apr 2, 2026
@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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

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

@sjawhar sjawhar closed this Apr 7, 2026
@sjawhar sjawhar deleted the fix/tui-agent-selection-reconcile branch April 7, 2026 23:00
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.

Non deterministic behaviour of variants passed into agents in the opencode.json config

1 participant