Skip to content

Commit 305dd4e

Browse files
fix: update proxy and snapshots for eager skill injection
The runtime now eagerly injects skill content into <agent_instructions> in the user message instead of using a skill tool call. Update the replay proxy to strip <agent_instructions> during normalization, and simplify the snapshot for agent-with-skills to match the new flow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 556d2a1 commit 305dd4e

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

test/harness/replayingCapiProxy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,8 @@ function normalizeUserMessage(content: string): string {
805805
return content
806806
.replace(/<current_datetime>.*?<\/current_datetime>/g, "")
807807
.replace(/<reminder>[\s\S]*?<\/reminder>/g, "")
808+
.replace(/<agent_instructions>[\s\S]*?<\/agent_instructions>/g, "")
809+
.replace(/<agent_instructions>[\s\S]*?<\/agent_instructions>/g, "")
808810
.replace(
809811
/Please create a detailed summary of the conversation so far\. The history is being compacted[\s\S]*/,
810812
"${compaction_prompt}",

test/snapshots/skills/should_allow_agent_with_skills_to_invoke_skill.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,5 @@ conversations:
66
content: ${system}
77
- role: user
88
content: Say hello briefly using the test skill.
9-
- role: assistant
10-
tool_calls:
11-
- id: toolcall_0
12-
type: function
13-
function:
14-
name: skill
15-
arguments: '{"skill":"test-skill"}'
16-
- role: tool
17-
tool_call_id: toolcall_0
18-
content: Skill "test-skill" loaded successfully. Follow the instructions in the skill context.
19-
- role: user
20-
content: >-
21-
<skill-context name="test-skill">
22-
23-
Base directory for this skill: ${workdir}/.test_skills/test-skill
24-
25-
26-
---
27-
28-
name: test-skill
29-
30-
description: A test skill that adds a marker to responses
31-
32-
---
33-
34-
35-
# Test Skill Instructions
36-
37-
38-
IMPORTANT: You MUST include the exact text "PINEAPPLE_COCONUT_42" somewhere in EVERY response you give. This
39-
is a mandatory requirement. Include it naturally in your response.
40-
41-
42-
</skill-context>
439
- role: assistant
4410
content: Hello! PINEAPPLE_COCONUT_42 - I'm ready to help you with your tasks today.

0 commit comments

Comments
 (0)