Skip to content

New Copilot agent harness doesn't load repo-scoped .github customizations (hooks, workspace context, instructions) #342022

Done

Description

Does this issue occur when all extensions are disabled?: Not applicable — the feature in question (the new Copilot "agent harness") is itself part of the GitHub Copilot Chat extension, so disabling all extensions removes Copilot entirely and the feature can't be exercised.

  • VS Code Version: 1.142.0 (commit 6d62b1d)
  • OS Version: macOS 26.6.2 (Build 25G83)
  • GitHub Copilot Chat extension version: 0.70.0

Steps to Reproduce:

  1. In a workspace with a .github/hooks/<name>.json chat hook registered for UserPromptSubmit (per the native chat.hooks setting), use the regular Copilot Chat — the hook fires on every prompt, shown as a "Warning from User Prompt Submit hook" step and its systemMessage is injected into context. The workspace's own custom instructions/skills/tooling are also visible to the agent.
  2. Opt into the new Copilot agent harness (banner: "You're using a new Copilot experience — This agent harness opens up new ways to work across windows and apps").
  3. Send any prompt in a chat session using the new harness, in the same workspace.

Expected: The UserPromptSubmit hook still fires (same "Warning from User Prompt Submit hook" step + injected systemMessage), and the agent still has access to the workspace's .github/instructions, .github/skills, and other repo-scoped customizations, same as the regular Copilot Chat surface.

Actual: No hook step appears and no systemMessage is injected — the hook does not fire at all. The agent also appears unaware of the workspace's own tooling (e.g. scripts under utility/), suggesting repo-scoped .github/ customizations are not being loaded in this harness.

Activity

  1. aeschli commented on Nov 29, 2026

    @aeschli
    Contributor

    I tried this in the current Insiders (1.149.0-insider, d7885d3) with a Copilot harness session. The workspace had a UserPromptSubmit hook in .github/hooks/, an instructions file in .github/instructions/ with applyTo: '**' that defines a codeword, and a skill in .github/skills/release-notes/.

    What I see now:

    • The hook runs on each prompt. Its command wrote to a log file.
    • The agent answers with the codeword from .github/instructions, and it lists the release-notes skill.
    • Chat Customizations lists all three items under Workspace.

    One part is different from the Local harness: a hook written in the Local format (UserPromptSubmit with systemMessage output) runs, but its systemMessage doesn't reach the agent. Chat Customizations > Hooks marks such a file: "This hook file uses the deprecated Local hook format and may not work in Copilot sessions." You can convert it with Migrations > Migrate Local-Format Hooks, which rewrites the hook and its script in the Copilot hook format.

    Closing this as fixed. Please reopen if you still see it.

    342022-chat-reply.png

    342022-hook-format-hover.png

    🤖 Authored with GitHub Copilot on behalf of Martin Aeschlimann (@aeschli).

  2. added
    agent-host
    bug
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions