Repository navigation
Commit 521c37c
Jonathan Rehem
fix(guild): register capitalized subagent_type alias for all builtin agents
ConfigHandler.applyAgentConfig only registered each builtin agent under
its lowercase config key and full display name (e.g. "ranger" and
"Ranger (Specialist)"). When an LLM-driven agent capitalized the value
(e.g. Task(subagent_type="Ranger")), OpenCode's case-sensitive agent
lookup failed with "Unknown agent type", silently falling back to the
generic "general" agent instead of the intended Guild specialist.
Confirmed via a real Fighter execution session (SQLite-backed OpenCode
session history): 3 consecutive "Ranger" delegation failures before the
model gave up and routed all 6 plan tasks through "general".
- config-handler.ts: register a third capitalized-first-letter alias key
per agent, guarded against colliding with the display-name key.
- bard/fighter prompt-composer.ts: harden delegation instructions with an
explicit case-sensitivity warning and correct/incorrect example.
Runtime interception (normalizing subagent_type case in
plugin-adapter.ts's tool.execute.before hook) was considered and is
tracked as deferred technical debt in
.guild/plans/subagent-type-case-fix/state.md — blocked on an upstream
OpenCode bug (anomalyco/opencode#31680 / PR #31693) where args mutations
in that hook are currently discarded.1 parent b554ec3 commit 521c37c
6 files changed
Lines changed: 42 additions & 1 deletion
File tree
- packages/guild/src
- agents
- bard
- fighter
- managers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
232 | 240 | | |
233 | 241 | | |
234 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
0 commit comments