Agents: add skill API rate-limit guardrail (#38452)

* Agents: add rate-limit guardrail for skill API writes

* Changelog: note skill API rate-limit awareness
This commit is contained in:
Vincent Koc
2026-03-06 20:20:00 -05:00
committed by GitHub
parent 75981b05c3
commit bf623a580b
4 changed files with 8 additions and 1 deletions

View File

@@ -144,6 +144,9 @@ describe("buildAgentSystemPrompt", () => {
expect(prompt).toContain("## Skills (mandatory)");
expect(prompt).toContain("<available_skills>");
expect(prompt).toContain(
"When a skill drives external API writes, assume rate limits: prefer fewer larger writes, avoid tight one-item loops, serialize bursts when possible, and respect 429/Retry-After.",
);
});
it("omits skills in minimal prompt mode when skillsPrompt is absent", () => {

View File

@@ -29,6 +29,7 @@ function buildSkillsSection(params: { skillsPrompt?: string; readToolName: strin
"- If multiple could apply: choose the most specific one, then read/follow it.",
"- If none clearly apply: do not read any SKILL.md.",
"Constraints: never read more than one skill up front; only read after selecting.",
"- When a skill drives external API writes, assume rate limits: prefer fewer larger writes, avoid tight one-item loops, serialize bursts when possible, and respect 429/Retry-After.",
trimmed,
"",
];