Repository navigation
Commit 144bc1d
committed
fix(opencode): OpenCode 2 threads see T3 Code's MCP tools on their first turn
OpenCode before 2.2.6 loads a newly connected MCP server's tools into its
tool registry 100 ms after the connection, and its pre-request flush does
not wait for that reload. T3 adds the per-thread MCP server right before
the first prompt, so that prompt was built without T3's tools. After an
add that newly registers the server, wait past that reload on those
versions before prompting.
Fixes #22945
AI-assisted; verified with the tests and tools listed above.1 parent b68aedf commit 144bc1d
2 files changed
Lines changed: 39 additions & 18 deletions
File tree
- apps/server/src/orchestration-v2/Adapters
- packages/provider-opencode/src/server/v2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4150 | 4150 | | |
4151 | 4151 | | |
4152 | 4152 | | |
| 4153 | + | |
4153 | 4154 | | |
4154 | | - | |
4155 | | - | |
4156 | | - | |
4157 | | - | |
4158 | | - | |
4159 | | - | |
4160 | | - | |
4161 | | - | |
4162 | | - | |
4163 | | - | |
4164 | | - | |
4165 | | - | |
4166 | | - | |
4167 | | - | |
4168 | | - | |
4169 | | - | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
4170 | 4174 | | |
4171 | 4175 | | |
4172 | | - | |
| 4176 | + | |
| 4177 | + | |
| 4178 | + | |
| 4179 | + | |
| 4180 | + | |
| 4181 | + | |
| 4182 | + | |
| 4183 | + | |
4173 | 4184 | | |
4174 | 4185 | | |
4175 | 4186 | | |
| |||
4230 | 4241 | | |
4231 | 4242 | | |
4232 | 4243 | | |
4233 | | - | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
4234 | 4249 | | |
4235 | 4250 | | |
4236 | 4251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
4060 | 4061 | | |
4061 | 4062 | | |
4062 | 4063 | | |
| 4064 | + | |
4063 | 4065 | | |
4064 | 4066 | | |
4065 | 4067 | | |
| |||
4081 | 4083 | | |
4082 | 4084 | | |
4083 | 4085 | | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
4084 | 4090 | | |
4085 | 4091 | | |
4086 | 4092 | | |
| |||
0 commit comments