Skip to content

fix: preserve early conversation context — slice(0,maxChars)#738

Open
ether-btc wants to merge 1 commit intoCortexReach:masterfrom
ether-btc:fix/slice-head-truncation
Open

fix: preserve early conversation context — slice(0,maxChars)#738
ether-btc wants to merge 1 commit intoCortexReach:masterfrom
ether-btc:fix/slice-head-truncation

Conversation

@ether-btc
Copy link
Copy Markdown
Contributor

Summary

Fixes Bug 1 from #574.

The bug

conversationText.slice(-maxChars) always kept the last 8000 chars and discarded everything earlier. An agent establishing context at the start of a long session lost it entirely — despite the README marketing "learns from every conversation".

The fix

conversationText.slice(0, maxChars) keeps the first maxChars chars instead.

Testing

  • Unit test: verify long conversation (20k chars) truncates at start, not end
  • Integration: confirm early session context is included in extraction prompt

Related

#574 — 3 bugs + 4 hardening items found during code review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant