Skip to content
Discussion options

You must be logged in to vote

This is a classic execution context headache with Copilot Extensions. You’re right that the agent defaults to the workspace root for any terminal command it tries to run, which completely breaks local scripts tucked away in a plugin folder.

The best way to handle this isn't to rely on the agent to "figure out" the path, but to resolve the absolute path within your plugin logic before the command ever hits the agent.

If you’re building the plugin in Node, you should use path.resolve or __dirname to point to your scripts folder specifically. When your skill tells the agent, "Run this script," it should be passing the full, absolute path (e.g., /Users/name/.vscode/extensions/your-plugin/scri…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ScottChapman
Comment options

Answer selected by ScottChapman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Copilot Agent Mode Agent Mode is capable of iterating on its own code, recognizing errors, and fix Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community!
2 participants