Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514· AnthropicHugging Face LMArena Human Preference 140K

Why is my copilot using my global instruction instead of workspace instructions in vscode

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514’s answer.
  1. User

    Why is my copilot using my global instruction instead of workspace instructions in vscode

  2. Claude Assistant

    This sounds like a configuration issue where GitHub Copilot is prioritizing your global settings over workspace-specific ones. Here are the most likely causes and solutions:

    Check your settings hierarchy: VSCode follows a specific order: workspace settings should override user (global) settings. Make sure your workspace instructions are properly defined in your .vscode/settings.json file within your project folder, not just in your global settings.

    Verify the setting names: Ensure you're using the correct setting keys in your workspace configuration. For Copilot instructions, you'll typically want something like:

    {
      "github.copilot.chat.instructions": "your workspace-specific instructions here"
    }
    

    Restart the Copilot service: Sometimes Copilot needs a refresh to pick up new workspace settings. Try running the "GitHub Copilot: Restart Language Server" command from the Command Palette (Ctrl/Cmd+Shift+P).

    Check for conflicting extensions: Other AI coding assistants or extensions might be interfering with Copilot's configuration loading.

    Workspace trust: Make sure your workspace is trusted in VSCode, as some features (including custom configurations) may be restricted in untrusted workspaces.

    If the issue persists, you might want to temporarily disable your global instructions to test if the workspace ones are being read at all, which can help isolate whether it's a loading issue or a precedence problem.

  3. User

    I am referring to the copilot-instructions.md and I also have a global-copilot-instructions.md file. My workspace instructions are stored in workspace/.vscode directory

  4. Claude Assistant

    Ah, I see the issue now. GitHub Copilot has a specific hierarchy for how it reads instruction files, and it sounds like your global instructions are taking precedence over your workspace ones.

    File precedence order: Copilot typically reads instructions in this order (with later ones overriding earlier ones):

    1. Global instructions (global-copilot-instructions.md in your user settings directory)
    2. Workspace instructions (copilot-instructions.md in your project root or .vscode folder)

    Check your file locations:

    • Your workspace copilot-instructions.md should be either in your project root directory OR in the .vscode folder
    • Make sure the filename is exactly copilot-instructions.md (not workspace-copilot-instructions.md or similar)

    Troubleshooting steps:

    1. Verify file detection: Open the Command Palette and run "GitHub Copilot: Open Instructions" to see which instruction files Copilot is actually detecting
    2. Check file encoding: Ensure your workspace instructions file is saved as UTF-8
    3. Restart Copilot: Use "GitHub Copilot: Restart Language Server" after making changes
    4. Test isolation: Temporarily rename your global instructions file to see if workspace instructions take effect

    Common gotcha: If your global instructions are very comprehensive or end with broad directives, they might be effectively overriding your workspace-specific ones even when both are loaded. Try adding something distinctive to your workspace instructions to test if they're being read at all.

    Which directory structure are you using for your workspace instructions?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.