feat(tool-results): raise the house inline cap 5000 → 24000 - #101
Merged
Conversation
The 5000 default (#91) is tuned for conversation, not for code. Mica is the first residence to actually run it -- 23h, 48 spills, and 71% of them are ordinary shell output from source review: git diff, test runs, `sed -n '450,590p'`-style excerpts, which routinely land at 5-15k. Under a 5000 cap a resident doing code work round-trips almost every file read through a spill file. Measured on that corpus: 20000 keeps 76% inline, 24000 keeps 88%, 32000 only reaches 90%. 24000 is the elbow -- ordinary excerpts and test summaries stay inline while genuinely large payloads (full channel histories, registry dumps, broad greps) still spill, which is the point. Nothing about the mechanism changes: spill target, provenance, the hard clamp to the strategy bound (#94), and the explicit no-workspace fallback are all untouched. Residences and residents can still override in either direction. Also replaces the hardcoded `< 6_000` assertion bounds in the spill suite with a CAPPED constant derived from DEFAULT_TOOL_RESULT_INLINE_MAX_CHARS. Those magic numbers silently pinned the 5000-era default -- three tests that only meant to assert "something capped this" failed on the raise. Deriving them means the next change to the default doesn't have to chase them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises
DEFAULT_TOOL_RESULT_INLINE_MAX_CHARSfrom 5000 to 24000, per antra's call in #upkeep.Why — production evidence, not taste
Mica is the first residence to actually run the 5000 default (restarted 08-06 11:52:55, six minutes after
b4fca7alanded). In 23 hours she produced 48 spills, classified by content shape:runCommandfetch_historytool-results/Those 34 are ordinary source review —
git diff, test runs,sed -n '450,590p'andnl -ba …excerpts. A 140-line source excerpt is 5–15 kB, so it clears 5000 as a matter of course. A 5000-char cap turns nearly every file read into a spill round-trip for a resident doing code work.Mica's own measurement on that corpus picked the number: 20000 keeps 76% inline, 24000 keeps 88%, 32000 only reaches 90%. 24000 is the elbow. Genuinely large payloads — full channel histories, registry dumps, broad greps — still spill, which is the point.
What does not change
The mechanism is untouched: spill target and naming, provenance quartet, the #94 hard clamp to the strategy bound, and the explicit no-writable-workspace fallback. Residences (
FrameworkConfig.toolResultInlineMaxChars) and residents (agent_settings tool_result_inline_max_chars) can still override in either direction.Worth stating plainly: this weakens the #89 protection by ~5×. The original bug was a 42k blob going inline whole; 24000 still bounds that, and 42k remains the canonical test fixture. But a residence that wants the tighter old value should set it explicitly.
Test-quality fix included
Three spill tests asserted
stored.content.length < 6_000— magic numbers derived from the 5000 era that silently pinned the old default. They only ever meant "something capped this payload", but they failed on the raise. Replaced with aCAPPEDconstant derived fromDEFAULT_TOOL_RESULT_INLINE_MAX_CHARS, so the next change to the default doesn't have to chase them.Verification
tsc --noEmitclean;npm run buildclean.npm test, the realdist/test/*.jspath): 542 tests / 540 pass / 1 fail / 1 skipped.startup globally gates channels/incoming with heartbeat-first configinmcpl-awareness-barrier— the known af#80 full-suite-load flake. Verified: that suite passes 25/25 in isolation, and nothing in this change touches MCPL startup choreography.🤖 Generated with Claude Code