GitHub Copilot¶
Verified 2026-10-10
On macOS (arm64), with the compiled binary on examples/broken-app: inwards init --agent agents-md, and inwards mcp started the way the .mcp.json entry below starts it, answering tools/list and check_files. The setup workflow parses as YAML. No Copilot session was run, in VS Code or on GitHub, and the workflow hasn't run on GitHub. The Copilot settings, file names and limits on this page come from the VS Code and GitHub docs of that date; the Hooks section's facts about the Copilot CLI's hook files come from GitHub's hooks reference read on 2026-10-11.
Copilot has no hook that Inwards can plug into the way the Claude Code hooks do. It meets Inwards in four places instead:
| Where | What Copilot gets | VS Code | Cloud agent |
|---|---|---|---|
AGENTS.md |
an instruction to run inwards check before it finishes |
yes | yes |
| The VS Code extension | every violation in the Problems panel, as you type | yes | no |
inwards mcp |
tools to ask where code belongs and to check code before writing it | yes | yes, set up per repository |
| CI | a failing check on the pull request | yes | yes |
An instruction or a tool works only when the agent follows it, so CI stays the gate for both.
Copilot in VS Code¶
- Install Inwards and add
[tool.inwards]topyproject.toml. - Install the VS Code extension. It runs
inwards serverand puts every violation in the Problems panel. -
Add the instruction to
AGENTS.md, and commit it:Copilot in VS Code reads
AGENTS.mdat the root of the workspace (thechat.useAgentsMdFilesetting, on by default), in the Copilot harness and in Local sessions. The AGENTS.md guide shows the section it adds; with Inwards as a uv dev dependency, add--launcher "uv run"so the section saysuv run inwards check. -
Register the MCP server in
.mcp.jsonat the root of the project:.mcp.json{ "mcpServers": { "inwards": { "type": "stdio", "command": "inwards", "args": ["mcp"] } } }VS Code starts the server in the workspace folder, so its tools see the project. This is the portable format: VS Code reads it for every session type, and Claude Code and the Copilot CLI read the same file. With uv, use
"command": "uv", "args": ["run", "inwards", "mcp"]. In a trusted workspace the server starts without asking; in Restricted Mode it doesn't start. The MCP guide describes the three tools. -
Tell the agent to read the Problems panel. VS Code's
#read/problemstool gives it the diagnostics there, Inwards' included, but the agent decides when to call it. Name it in a prompt ("fix #read/problems"), or add a line to.github/copilot-instructions.md:
Check it works:
- Run MCP: List Servers from the command palette.
inwardsis listed as running, and Configure Tools in the chat input listscheck_files,explain_ruleandwhere_should_this_go. - Ask the agent: "Add
import shop.infrastructure.dbat the top of shop/domain/order.py." The extension marks the import with INW001, and the agent, told to read the Problems panel or to run the check, removes it or introduces a port.
Hooks¶
VS Code has agent hooks in preview, but Inwards doesn't support them yet. Its hook (inwards hook claude-code) reads Claude Code's payloads and tool names. VS Code's Local harness can read hooks from Claude Code's settings files (chat.useClaudeHooks, off by default), but it ignores their matchers and names its tools differently, and the Copilot harness uses Copilot's own hook format. Don't point either at inwards hook claude-code: the config guard and the Stop gate would see tool calls they don't recognise. The Copilot CLI reads .claude/settings.json and .claude/settings.local.json too, so in a project wired with inwards init --agent claude-code it already runs that hook, and neither the guard nor the Stop gate holds there: Copilot takes the hook's exit 2 as a warning for the user, not a block. ADR-044 has what each Copilot surface offers and the planned inwards hook copilot.
Copilot cloud agent¶
The cloud agent (earlier called the coding agent) works on an issue in a GitHub Actions environment and opens a pull request. It reads AGENTS.md, .github/copilot-instructions.md and .github/instructions/*.instructions.md from the repository.
- Add the
AGENTS.mdsection, as in step 3 above. -
Install Inwards in the agent's environment with
.github/workflows/copilot-setup-steps.yml. Copilot runs only a job namedcopilot-setup-steps, and only once the file is on the default branch. This one assumes Inwards is a uv dev dependency, soAGENTS.mdshould sayuv run inwards check(inwards init --agent agents-md --launcher "uv run"):.github/workflows/copilot-setup-steps.ymlname: Copilot setup steps on: workflow_dispatch: push: paths: [.github/workflows/copilot-setup-steps.yml] pull_request: paths: [.github/workflows/copilot-setup-steps.yml] jobs: copilot-setup-steps: runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10 - name: Install the project, Inwards included run: uv sync --locked - run: uv run inwards --versionThe
pushandpull_requesttriggers run the job as a normal workflow when the file changes, so a broken step shows up in the pull request that adds it. If a step fails during an agent session, Copilot skips the rest and starts anyway, without Inwards. Without uv, download the release binary as in the GitHub Actions guide and install it into a directory on the defaultPATH, such as/usr/local/bin(withsudo install). -
Optionally, give the agent the MCP tools. In the repository's Settings, open Copilot, then MCP servers, and save:
{ "mcpServers": { "inwards": { "type": "local", "command": "uv", "args": ["run", "inwards", "mcp"], "tools": ["check_files", "explain_rule", "where_should_this_go"] } } }toolsis required and lists what the agent may call without asking; all three tools only read. The server uses the Inwards that the setup steps installed. The next session's log shows them under the Start MCP Servers step. GitHub doesn't document which directory the agent starts a server in; ifcheck_filesdoesn't find the project's files, ask the agent to pass absolute paths. -
Add the GitHub Actions workflow so a violation fails the pull request. By default, workflows don't run on a pull request Copilot pushes to until someone with write access clicks Approve and run workflows; a repository admin can turn that approval off in the cloud agent's settings. When the check fails, mention
@copilotin a pull request comment and ask it to fix the Inwards violations; the job log and the annotations name the rule and the fix steps.
The cloud agent also runs hooks from .github/hooks/*.json, in Copilot's own format. As in VS Code, Inwards has no adapter for them yet; ADR-044 plans one.
Limits¶
- No Stop gate. Nothing stops a Copilot turn while a violation is open. The agent runs the check because
AGENTS.mdasks it to, and CI fails the pull request if it didn't. - No config guard. Copilot can edit
[tool.inwards]to make a finding go away. TheAGENTS.mdsection tells it not to; aCODEOWNERSentry forpyproject.tomlmakes a person review such a change. - The Problems panel is read on request. The extension shows a violation at once, but the agent sees it only when it calls
#read/problemsor runs the check.
Troubleshooting¶
| Symptom | Cause and fix |
|---|---|
| The agent never runs the check | AGENTS.md is an instruction. Check that it is at the root and that chat.useAgentsMdFile is on, name the check in your prompt, and rely on CI for the rest. |
inwards isn't listed under MCP: List Servers |
The workspace isn't trusted, or .mcp.json isn't at the root of the workspace folder. Run MCP: List Servers, pick inwards and open its output for the error. |
The cloud agent says inwards: command not found |
The setup steps didn't install it, or AGENTS.md names inwards where the project uses uv run inwards. Run the setup workflow from the Actions tab and check its log. |
| No checks run on Copilot's pull request | The workflows wait for Approve and run workflows in the pull request's merge box. |