fix(#2697): skip the context-monitor spawn in-process when context_warnings disabled (#2824)

* test(#2697): failing-first regression for context-monitor spawn not hoisted behind toggle

* fix(#2697): skip the context-monitor spawn in-process when context_warnings disabled

* test(#2697): patch spawnSync before require (plugin destructures at load time)

* test(#2697): establish session before asserting on context-monitor spawn (review)

* docs(changeset): #2697 context-monitor spawn skipped when context_warnings disabled

* docs(changeset): backfill #2697 PR number to 2824
This commit is contained in:
Tom Boucher
2026-07-29 11:06:27 -04:00
committed by GitHub
parent 46e84d5e39
commit ddcf459c81
4 changed files with 206 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 2824
---
**OpenCode/Kilo no longer spawn the context-monitor subprocess on every tool call when context warnings are disabled** — the adapter now reads the existing `hooks.context_warnings` toggle in-process and skips the child-process spawn entirely when it is set to `false`, instead of paying a Node boot per tool call only to read the flag and exit inside the child. Behavior is unchanged when the toggle is absent or enabled (the default).