Skip to content

fix(skills): fallback to prompt injection for custom workspaces#1717

Merged
piorpua merged 1 commit intomainfrom
fix/custom-workspace-skill-fallback
Mar 25, 2026
Merged

fix(skills): fallback to prompt injection for custom workspaces#1717
piorpua merged 1 commit intomainfrom
fix/custom-workspace-skill-fallback

Conversation

@kaizhou-lab
Copy link
Copy Markdown
Collaborator

Summary

  • Fix skills being completely lost for non-assistant ACP sessions using custom workspaces with enabledSkills

Changes

src/process/task/AcpAgentManager.ts

  • Add customWorkspace check to first-message skill injection logic
  • When customWorkspace is true, always fallback to prepareFirstMessageWithSkillsIndex (prompt injection) regardless of native skill support
  • This is necessary because setupAssistantWorkspace (symlinks) is intentionally skipped for custom workspaces to avoid polluting user directories

Before: native-support backends only injected presetContext → skills lost when no presetContext
After: checks both native support AND non-custom workspace → custom workspace always gets prompt injection fallback

Related Issue

Closes #1716

Test Plan

  • Create ACP session with custom workspace + enabledSkills + no presetContext → verify skills are injected via prompt
  • Create ACP session with temp workspace + enabledSkills → verify skills still use symlink discovery
  • bun run test — all existing tests pass

Custom workspaces skip symlink setup to avoid polluting user directories.
When a non-assistant ACP session uses a custom workspace with enabledSkills
but no presetContext, skills were completely lost because:
1. No symlinks created (customWorkspace skips setupAssistantWorkspace)
2. Native-support branch only injected presetContext, not skills

Now checks both native support AND non-custom workspace before relying
on symlink discovery; otherwise falls back to prompt injection.
@piorpua piorpua merged commit 3ae231c into main Mar 25, 2026
15 of 17 checks passed
@piorpua piorpua deleted the fix/custom-workspace-skill-fallback branch March 25, 2026 13:52
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.

fix(skills): custom workspace ACP sessions lose skills

2 participants