You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 93f89b1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sequentialthinking): cap the thought history each connection keeps
A server instance lives as long as its client's connection and appended
every thought and branch entry for that whole time, so a long-lived
connection grew memory without bound (#2912). State was already per
connection on both eras; nothing was shared across connections.
Retain at most MAX_THOUGHT_HISTORY thoughts (default 1000), dropping the
oldest. The dropped thought leaves its branch too, and a branch left
empty is no longer listed, so the branches never hold more than the
history. The result shape is unchanged: thoughtHistoryLength and
branches now describe the retained thoughts. An invalid value is
reported on stderr and replaced by the default.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
"@modelcontextprotocol/server-sequential-thinking": minor
3
+
---
4
+
5
+
Bound the thought history each connection keeps: at most `MAX_THOUGHT_HISTORY` thoughts (default 1000) are retained, the oldest dropped first and from its branch too, so a long-lived connection no longer grows memory without bound.
Copy file name to clipboardExpand all lines: src/sequentialthinking/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,8 @@ On Windows, use `cmd /c` to launch `npx`:
134
134
135
135
To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `true`.
136
136
137
+
To bound memory use, the server retains at most `MAX_THOUGHT_HISTORY` thoughts per connection (a positive integer; default `1000`). Past the cap the oldest thought is dropped, from its branch too, so `thoughtHistoryLength` in the result stops at the cap and a branch whose thoughts have all been dropped is no longer listed in `branches`.
138
+
137
139
### Usage with VS Code
138
140
139
141
For quick installation, click one of the installation buttons below...
0 commit comments