copilot-bridge: Instructions file for Codex

AGENTS.md

copilot-bridge AGENTS.md is an instructions file for Codex, OpenCode from ChrisRomp/copilot-bridge. It costs 2,528 tokens per session, scanned A, original, MIT.

Repository instructions for Copilot Bridge, a service that connects chat messages from Mattermost to an agent or other connected system. Mattermost is a team chat platform, and the bridge receives events over a WebSocket, a live connection for messages.

In plain words
What is it for?
Use them when changing platform adapters, message handling, the gateway service, tests, deployment, or service restart procedures.
Why use it?
They document the build checks, tests, internal message flow, and safe restart method, including a command sequence that must not be used because it can leave the service stopped.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is ChrisRomp/copilot-bridge's own configuration. It tells Codex and OpenCode how to work on copilot-bridge itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-bridge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ChrisRomp/copilot-bridge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ChrisRomp/copilot-bridge/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ChrisRomp/copilot-bridge

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for copilot-bridge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chrisromp/copilot-bridge/agents-md/github.svg)](https://agentmods.dev/instructions/chrisromp/copilot-bridge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/chrisromp/copilot-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/chrisromp/copilot-bridge/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for copilot-bridge AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chrisromp/copilot-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/chrisromp/copilot-bridge/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,528 This file is loaded in full into every session.
When invoked 2,528 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02528 $0.02528
Opus 5.5 $0.01011 $0.01011
Sonnet 5.5 $0.00506 $0.00506
Haiku 4.5 $0.00253 $0.00253

Measured 29d ago against content hash 3432f8ba76f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

copilot-bridge AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — copilot-bridge

Repo: https://github.com/ChrisRomp/copilot-bridge

Keep this file up to date as the architecture evolves or new conventions emerge. If you make structural changes, add a new platform adapter, or change key patterns, update the relevant section here.

For project overview, configuration, chat commands, and deployment, see README.md.

Build & Check

npm install                                   # install dependencies
npx tsc --noEmit                              # type-check (always run before deploying)
npm run dev                                   # run with watch mode (tsx watch)
npm test                                      # vitest suite
npx vitest run src/path/to/file.test.ts       # single test file

Restart the running service after changes:

scripts/restart-gateway.sh
# Or: launchctl kickstart -k gui/$(id -u)/com.copilot-bridge

⚠️ NEVER use launchctl unload && launchctl load — unload kills the bridge process (including your session), so the load half never executes and the service stays down.

Dependency Updates

  • Node.js 22.12.0+ is required by the Copilot SDK. Keep the package engine, setup checks, and setup documentation aligned.
  • Dependabot batches npm minor/patch version updates and security updates in separate groups; major upgrades remain separate for compatibility review.
  • Update @mattermost/client and @mattermost/types together: the client declares an exact peer version for its types.
  • Keep TypeScript on 5.9 until Mattermost's TypeScript peer range supports newer majors; do not bypass the peer constraint with --force or --legacy-peer-deps.
  • npm 12 requires install-script approvals. Review changed native/build scripts and update the version-pinned allowScripts entries with npm install-scripts approve <package> before rebuilding.
  • Use the public npm registry when refreshing lockfile metadata. Some mirrors omit SHA-512 integrity values and synthesize install scripts; preserve authoritative integrity hashes and platform selectors. better-sqlite3 13.0.3 bundles prebuilt binaries and has no install script to approve.

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago Changed · +6 lines · +98 tokens per session 3432f8ba76f3
  2. 1mo ago Changed · +8 lines · +225 tokens per session b3ac5e3a7c43
  3. 2mo ago First seen · 149 lines · 2,205 tokens per session scan A 6674d4a4e6c7

Subscribe to this mod's changes

copilot-bridge AGENTS.md is an instructions file published in the GitHub repository ChrisRomp/copilot-bridge (21 stars, last pushed yesterday), licensed MIT. It adds 2,528 tokens to every session, about $0.0101 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

copilot-bridge AGENTS.md compared with instructions from other repositories

copilot-bridge AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
copilot-bridge AGENTS.mdChrisRomp/copilot-bridgeInstructions file21yesterdayMITA2,528Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode