From c3fa2c88f349aea890b385e6eecc801cb2956fc5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 00:44:11 +0000 Subject: [PATCH 1/2] Initial plan From 719c8d70a8f629d9881537b34f412a3a5e58025a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 00:51:18 +0000 Subject: [PATCH 2/2] Skip skills discovery in resume mode Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --- pkg/codingcontext/context.go | 6 ++++++ pkg/codingcontext/context_test.go | 35 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/pkg/codingcontext/context.go b/pkg/codingcontext/context.go index da68d54..49d3973 100644 --- a/pkg/codingcontext/context.go +++ b/pkg/codingcontext/context.go @@ -574,6 +574,12 @@ func (cc *Context) runBootstrapScript(ctx context.Context, path string) error { // discoverSkills searches for skill directories and loads only their metadata (name and description) // for progressive disclosure. Skills are folders containing a SKILL.md file. func (cc *Context) discoverSkills() error { + // Skip skill discovery if resume mode is enabled + // Check cc.resume directly first, then fall back to selector check for backward compatibility + if cc.resume || (cc.includes != nil && cc.includes.GetValue("resume", "true")) { + return nil + } + var skillPaths []string for _, path := range cc.downloadedPaths { skillPaths = append(skillPaths, skillSearchPaths(path)...) diff --git a/pkg/codingcontext/context_test.go b/pkg/codingcontext/context_test.go index be74aa9..a0c5063 100644 --- a/pkg/codingcontext/context_test.go +++ b/pkg/codingcontext/context_test.go @@ -2244,6 +2244,41 @@ description: %s taskName: "test-task", wantErr: true, }, + { + name: "resume mode skips skill discovery", + setup: func(t *testing.T, dir string) { + // Create task + createTask(t, dir, "test-task", "", "Task content") + + // Create skill directory with SKILL.md + skillDir := filepath.Join(dir, ".agents", "skills", "test-skill") + if err := os.MkdirAll(skillDir, 0o755); err != nil { + t.Fatalf("failed to create skill directory: %v", err) + } + + skillContent := `--- +name: test-skill +description: A test skill that should not be discovered in resume mode +--- + +# Test Skill + +This is a test skill. +` + skillPath := filepath.Join(skillDir, "SKILL.md") + if err := os.WriteFile(skillPath, []byte(skillContent), 0o644); err != nil { + t.Fatalf("failed to create skill file: %v", err) + } + }, + opts: []Option{WithResume(true)}, + taskName: "test-task", + wantErr: false, + checkFunc: func(t *testing.T, result *Result) { + if len(result.Skills.Skills) != 0 { + t.Errorf("expected 0 skills in resume mode, got %d", len(result.Skills.Skills)) + } + }, + }, } for _, tt := range tests {