fix(agents): pass custom agent summaries instead of client object to createBuiltinAgents#2424
Open
MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
Open
fix(agents): pass custom agent summaries instead of client object to createBuiltinAgents#2424MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
…createBuiltinAgents (code-yeongyu#2386)
There was a problem hiding this comment.
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: Corrects a type mismatch where a client object was passed instead of an array. Moving agent loading logic earlier is safe and necessary for the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #2386
Plugin agents (from OpenCode plugins) and user-installed agents (
~/.claude/agents/*.md) are not injected into the Sisyphus system prompt. This is becausecreateBuiltinAgents()receivesparams.ctx.client(an OpenCode SDK client object) as its 8th parameter (customAgentSummaries) instead of the expected array of agent summaries.parseRegisteredAgentSummaries()checksArray.isArray(input), getsfalsefor the client object, and silently returns[]. Result: Sisyphus has zero awareness of any non-builtin agents.Root Cause
In
agent-config-handler.ts, user/project/plugin agents were loaded aftercreateBuiltinAgents()was called, so the summaries weren't available. The client object was passed as a placeholder that never worked.Changes
src/plugin-handlers/agent-config-handler.ts:createBuiltinAgents()customAgentSummariesarray with{ name, description }from all non-builtin agentsparams.ctx.clientmigrateAgentConfig) in its original position since it's only needed for the final agent mergeImpact
task(subagent_type="some-plugin-agent")works without the agent needing to guess the exact nameSummary by cubic
Fixes agent discovery by loading user, project, and plugin agents before
createBuiltinAgentsand passing realcustomAgentSummaries, so Sisyphus includes all non-builtin agents in its system prompt. Enables correct routing to custom agents without changing behavior for users without them.createBuiltinAgents.customAgentSummaries: { name, description }[]instead ofparams.ctx.client.migrateAgentConfigposition unchanged for the final merge.Written for commit 46c3bfc. Summary will update on new commits.