Repository navigation
fix #441: preserve long user prompts in event stream - #527
Draft
rohantiwari9573 wants to merge 1 commit into
Draft
rohantiwari9573 wants to merge 1 commit into
rohantiwari9573 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Rohan <rohantiwari166@gmail.com>
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.
What
Why
Long user messages exceeding the event stream's 16,000-character threshold were replaced with file-pointer instructions.
Established sessions send only newly added events to the LLM. Consequently, the model could receive the pointer rather than the actual user request, even though the complete message remained visible in the chat interface.
This change preserves the actual request and improves context-overflow recovery.
How to test
pytest tests/test_long_user_messages.py tests/test_context_overflow_run_end.py -qruff check .ruff format --check .python -m compileall -q app agent_core agents decorators skillsAutomated validation reported:
The nine full-suite failures were reproduced against the original upstream/dev implementation and are documented as pre-existing issues.
Screenshots / Logs
This is a backend and agent-execution change, so automated test results and execution-path evidence are provided instead of UI screenshots.
Known limitations
Real-model behaviour has not yet been independently verified. The complete prompt was verified at the provider interface using a fake LLM.
The lower-level LLM logging system still records full prompts and responses; that privacy concern is outside this change.
🤖 Generated with Claude Code