Repository navigation
Commit 2f7f794
fix(server): OpenCode 2 threads keep T3's tools after an idle project is evicted
OpenCode 2 keeps MCP servers added at runtime in the project Location and
drops them when it evicts a Location after 60 idle minutes. The adapter added
T3's MCP server once and cached that in `state.mcp`, so later turns ran
without T3's tools while the instructions still said they were there.
Add the server on every turn (OpenCode leaves an unchanged config connected)
and tell the model the tools are available only when this turn's add worked.
Fixes #16768
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>1 parent cd41c4a commit 2f7f794
2 files changed
Lines changed: 61 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2722 | 2722 | | |
2723 | 2723 | | |
2724 | 2724 | | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
2725 | 2777 | | |
2726 | 2778 | | |
2727 | 2779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
3260 | 3260 | | |
3261 | 3261 | | |
3262 | 3262 | | |
3263 | | - | |
3264 | | - | |
3265 | | - | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
3266 | 3269 | | |
3267 | 3270 | | |
3268 | 3271 | | |
| |||
3282 | 3285 | | |
3283 | 3286 | | |
3284 | 3287 | | |
3285 | | - | |
| 3288 | + | |
3286 | 3289 | | |
3287 | 3290 | | |
3288 | 3291 | | |
3289 | | - | |
| 3292 | + | |
3290 | 3293 | | |
3291 | 3294 | | |
3292 | 3295 | | |
| |||
0 commit comments