Skip to content

fix(agent): cap recent history section in system prompt#3414

Merged
chengyongru merged 1 commit into
nightlyfrom
fix/history-context-cap
Apr 23, 2026
Merged

fix(agent): cap recent history section in system prompt#3414
chengyongru merged 1 commit into
nightlyfrom
fix/history-context-cap

Conversation

@chengyongru
Copy link
Copy Markdown
Collaborator

Cherry-pick of the context.py guard from #3412.

Truncate the "Recent History" section injected by build_system_prompt() to 32K chars. Without this, many accumulated history.jsonl entries could still bloat the system prompt even with per-entry truncation in place.

Truncate the "Recent History" section injected by build_system_prompt()
to 32K chars. Without this, many accumulated history.jsonl entries could
still bloat the system prompt even with per-entry truncation in place.
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