Skip to content

fix(agents): include config agents and migrated plugin agents in customAgentSummaries#2585

Merged
acamq merged 1 commit intocode-yeongyu:devfrom
acamq:fix/custom-agent-summaries-completeness
Mar 15, 2026
Merged

fix(agents): include config agents and migrated plugin agents in customAgentSummaries#2585
acamq merged 1 commit intocode-yeongyu:devfrom
acamq:fix/custom-agent-summaries-completeness

Conversation

@acamq
Copy link
Copy Markdown
Collaborator

@acamq acamq commented Mar 15, 2026

Summary

Follow-up to #2424 which fixed the critical customAgentSummaries bug (passing client object instead of array). That fix covered user, project, and raw plugin agents but missed two sources:

  • OpenCode native config agents (params.config.agent) — agents defined directly in OpenCode's config were not included in Sisyphus's summaries
  • Plugin agent migrationmigrateAgentConfig was not applied to plugin agents before summary extraction, so legacy field names could produce empty descriptions

Changes

In src/plugin-handlers/agent-config-handler.ts:

  1. Move pluginAgents (with migrateAgentConfig) and configAgent extraction before customAgentSummaries construction
  2. Include all 4 agent sources in summaries: configAgent, userAgents, projectAgents, pluginAgents
  3. Add null guard (.filter(([, config]) => config != null)) for safety
  4. Remove duplicate declarations that were previously below createBuiltinAgents

Context

Three PRs attempted to fix #2386:

This PR cherry-picks the completeness improvement from #2392's analysis. Supersedes #2392.

Related Issues

Co-authored-by: @davincilll


Summary by cubic

Include config-defined agents and migrated plugin agents in customAgentSummaries so Sisyphus sees all registered agents and descriptions. Fixes missing summaries from params.config.agent and legacy plugin plugin configs.

  • Bug Fixes
    • Build summaries from four sources: configAgent, userAgents, projectAgents, pluginAgents.
    • Apply migrateAgentConfig before extracting summaries and add null guards.
    • Reorder extraction to run before customAgentSummaries and remove duplicates.

Written for commit e8a3e54. Summary will update on new commits.

…omAgentSummaries

PR code-yeongyu#2424 fixed the critical bug (passing client object instead of agent
summaries array), but only included user, project, and raw plugin agents.

This adds the two missing sources:
- OpenCode native config agents (params.config.agent)
- Plugin agents with migrateAgentConfig applied before summary extraction

Ensures Sisyphus has complete awareness of all registered agent sources.

Closes code-yeongyu#2386

Co-authored-by: NS Cola <[email protected]>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Correctly reorders logic to include migrated plugin agents and config agents in summaries. Reordering is safe as dependencies are available. Includes safety null checks.

@acamq acamq merged commit e03d0e0 into code-yeongyu:dev Mar 15, 2026
8 checks passed
@acamq acamq deleted the fix/custom-agent-summaries-completeness branch March 15, 2026 23:48
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.

[Bug]: Plugin/user agents not injected into Sisyphus system prompt (customAgentSummaries type mismatch)

1 participant