Repository navigation
feat(agent): cap rendered skills list and harden system prompt injection - #761
Merged
Merged
Conversation
- add agent.skills.max_chars (default 4000): skills past the budget are listed by name only instead of growing the system prompt unbounded - truncate the injected memory index at a line boundary so no partial entry survives the max_chars cut - use a date-only timestamp in the system prompt; minute resolution changed the prompt every turn and busted provider prompt-prefix caching
3 tasks
Contributor
Author
|
Docs follow-up filed: inference-gateway/docs#352 (on Roadmap 2026, Status: Todo). |
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Jul 6, 2026
## [0.133.0](v0.132.1...v0.133.0) (2026-07-06) ### 🚀 Features * add nvidia provider support ([#753](#753)) ([e9ea883](e9ea883)), closes [#751](#751) * **agent:** cap rendered skills list and harden system prompt injection ([#761](#761)) ([cb0f36e](cb0f36e)) * scope memory entries by project ([#759](#759)) ([cabda08](cabda08)), references [#758](#758) * **chat:** show session continuation instructions on exit ([#757](#757)) ([8d04a3a](8d04a3a)), closes [#756](#756) ### 🐛 Bug Fixes * **chat:** add --session-id flag and fix exit message ([#760](#760)) ([a2202ba](a2202ba)) * **ci:** release notes are not being generated ([32b7acf](32b7acf)) * replace /compact with /new when plan is accepted ([#755](#755)) ([30304ed](30304ed)), closes [#754](#754) ### ♻️ Code Refactoring * **agent:** remove comments about skill description capping ([e50aa30](e50aa30)) ### 🧹 Maintenance * **deps:** bump claude-code-action v1.0.161 -> v1.0.165 ([#752](#752)) ([44d1985](44d1985)) * **deps:** update flox packages ([8a35d5e](8a35d5e))
Contributor
|
🎉 This PR is included in version 0.133.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
Audit of the memory/skills context-injection path confirmed the design is sound (index/frontmatter-only, one ephemeral system message per request, no history accumulation). This PR closes the three small gaps it surfaced:
agent.skills.max_chars(default 4000,0disables, envINFER_AGENT_SKILLS_MAX_CHARS). Skills past the budget are listed by name only instead of growing the system prompt unbounded; whole entries only, never a truncated description, so every skill stays discoverable.memory.max_charscut previously left a broken half-entry in the prompt.Current date and time:line changed the system prompt every turn, invalidating provider-side prompt-prefix caching for the whole conversation. NowCurrent date:at day resolution; the model can rundatewhen it needs the time.Testing
TestBuildSkillsInfo_CapsRenderedList,TestBuildMemoryInfo_TruncatesAtLineBoundary; updated the timestamp assertions.task testandtask lintpass.infer debug agent system_prompt: capped skills block, clean memory-index tail, date-only line.Cross-repo impact
New user-facing config key
agent.skills.max_chars→ needs a[DOCS]issue forinference-gateway/docs(configuration reference).