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 8da06bc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sequentialthinking): bound the stderr thought box
#5205 padded every row of the box to the thought's longest line, so one
long line and many short ones logged their product: a 60 KB thought wrote
400 million characters. The box is now at most MAX_BOX_TEXT_WIDTH (100)
wide, wrapping longer lines and a longer header without splitting a
surrogate pair, and at most MAX_BOX_ROWS (1000) rows, ending with a row
that counts the lines left out. The box tops out near 107 KB; the stored
thought and the tool result are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Bound the thought box logged to stderr. Since the multi-line box, every row was padded to the thought's longest line, so a thought with one long line and many short ones logged their product: a 60 KB thought wrote 400 million characters and could exhaust the server's memory. The box is now at most 100 characters wide (longer lines wrap) and at most 1000 rows tall (it then says how many lines it left out), about 107 KB at most. The stored thought and the tool result are unchanged.
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
+
Each thought is logged to stderr as a box, one row per line of the thought. The box is at most 100 characters wide, with longer lines wrapped, and draws at most 1000 rows; past that it ends with a row saying how many lines it left out. Only the log is shortened: the thought itself is stored and returned whole.
138
+
137
139
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`.
0 commit comments