qwen-code/packages/cli
易良 9163f3b61d
fix(cli): run periodic memory-pressure check in interactive UI to prevent OOM on quit (#6682)
The memory pressure monitor's performCheck() was only invoked after a tool
call completed, so a long interactive session with no tool calls never
triggered compact_history / cache eviction / GC. The heap could grow toward
the V8 limit and hard-OOM during the React unmount on quit (the 'Reached
heap limit Allocation failed' crash seen after /quit or Ctrl+C).

Add a 30s unref'd interval in startInteractiveUI that calls performCheck(),
cleared on cleanup. The quit/cleanup path also runs a final performCheck()
right before instance.unmount() so a near-limit heap is not pushed over the
edge by React reconciliation during unmount.

References: #5147, #4149, #4254.

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-07-11 01:25:33 +00:00
..
src fix(cli): run periodic memory-pressure check in interactive UI to prevent OOM on quit (#6682) 2026-07-11 01:25:33 +00:00
index.ts fix(cli): add bootstrap fast paths (#6188) 2026-07-02 22:28:11 +00:00
package.json chore(release): v0.19.9 (#6693) 2026-07-11 00:35:15 +00:00
test-setup.ts perf(cli): code-split lowlight to cut startup V8 parse cost (#4070) 2026-05-15 17:26:18 +08:00
tsconfig.json feat(channels): add WeCom intelligent robot channel (#6436) 2026-07-07 15:24:19 +00:00
vitest.config.ts feat(serve): Add cursor-paged transcript replay endpoint (#6525) 2026-07-10 16:34:43 +00:00