HA_Codex_Bridge: Instructions file for Codex

AGENTS.md

HA_Codex_Bridge AGENTS.md is an instructions file for Codex, OpenCode from Herbertmt978/HA_Codex_Bridge. It costs 1,412 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on a Home Assistant and Codex Bridge integration. They define the product boundaries, engineering rules, security assumptions, and release checks.

In plain words
What is it for?
Use them when changing architecture, product wording, authentication, automation, plugins, MCP servers, or release behavior in this repository.
Why use it?
They give agents one shared set of rules, reducing the risk of exposing private services, breaking compatibility, mishandling unattended work, or releasing unverified changes.

Instructions file for CodexOpenCode

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

This is Herbertmt978/HA_Codex_Bridge's own configuration. It tells Codex and OpenCode how to work on HA_Codex_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 HA_Codex_Bridge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Herbertmt978/HA_Codex_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/Herbertmt978/HA_Codex_Bridge/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Herbertmt978/HA_Codex_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 HA_Codex_Bridge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/herbertmt978/ha_codex_bridge/agents-md/github.svg)](https://agentmods.dev/instructions/herbertmt978/ha_codex_bridge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/herbertmt978/ha_codex_bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/herbertmt978/ha_codex_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 HA_Codex_Bridge AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/herbertmt978/ha_codex_bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/herbertmt978/ha_codex_bridge/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,412 This file is loaded in full into every session.
When invoked 1,412 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.01412 $0.01412
Opus 5.5 $0.00565 $0.00565
Sonnet 5.5 $0.00282 $0.00282
Haiku 4.5 $0.00141 $0.00141

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

Security

Grade A, and why

HA_Codex_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 6d 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 · 120 lines

How it starts

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

Codex Bridge contributor instructions

These instructions apply to the whole repository. Read CONTEXT.md before changing product language or architecture.

Product boundary

  • The browser talks only to Home Assistant. The Integration proxies requests to the private App/Bridge; do not expose an App, Bridge, Codex, or MCP listener to the browser.
  • Home Assistant owns administrator authentication and wall-clock automation scheduling. The Bridge owns durable automation definitions, claims, run history, workspace confinement, and Codex runtime coordination.
  • The primary supported path is the Home Assistant App with ChatGPT account device login. Keep the external Bridge as a private compatibility path.
  • Treat prompts, workspaces, plugins, skills, marketplaces, MCP servers, AGENTS.md content, OAuth responses, and Codex runtime output as untrusted.

Engineering rules

  • Preserve capability negotiation. A newer Integration must not call a feature that an older App did not advertise.
  • Unattended automations fail closed: decline approvals and elicitations, avoid hidden interaction state, record terminal outcomes, and recover durable claims after restart.
  • Keep MCP disabled by default and capability-gated behind the explicit App option. Public connections retain trusted HTTPS hostnames and OAuth; their DNS screen is best effort. Local LAN/App connections require the separate default-disabled option, per-endpoint consent and the private local MCP relay. The relay pins approved private addresses at connection time, verifies TLS, rejects redirects and never forwards its private capability header upstream. Never pass a local upstream URL or upstream credential directly to Codex. MCP-02 permits write-only bearer tokens and named authentication headers through the private relay, bound to one approved endpoint. Reject routing, protocol and reserved headers. Submit credentials through bounded administrator HTTP views, never WebSocket commands, prompts or browser persistence. Keep private credentials out of responses, logs and native configuration; redact reflected secrets in relay responses. Arbitrary native stdio commands and local OAuth remain unsupported. Keep OAuth authorisation URLs one-shot and uncached. This local exception does not change browser, shell or Host Access permissions.
  • For MCP-03 stdio support, use the separate boundary in ADR 0009. Codex must see only the Bridge-owned authenticated loopback HTTP adapter, never a native executable command or worker environment. Do not activate a worker without its own HAOS-proven Bubblewrap/AppArmor/namespace/seccomp attestation, verified approved package revision, explicit grants, tool allow-list and resource budget. The first supported runtime is Python 3.14 on amd64 with no network or workspace files. Keep the stdio App option off by default, preserve existing HTTPS/LAN MCP rules, and fail closed on uncertain startup, update or teardown.
  • Preserve native MCP pause state across restart. Destination edits require a paused server, a fresh revision and explicit authentication consent. Recover interrupted private edits before activating relay bindings; uncertain rollback blocks new work until restart.
  • Confine skills and project instructions to the selected workspace. Global instructions stay in the fixed private Codex home. Writes must be bounded, atomic, no-follow, and privately backed up where the implementation promises.
  • Reuse the panel's design tokens and accessible interaction patterns. Preserve loading, empty, error, retry, keyboard, narrow-screen, and reduced-motion states.
  • Match adjacent established controls before adding a new control. Composer selectors use composer-utility, composer-select and compact-select; compact text actions use composer-limits-button. File preview/Terminal tabs and the PDF preview toolbar are the canonical compact toolbar examples. Use the existing font, surface, border, radius and spacing tokens rather than browser-default sizing or a separate visual system. Keep labelled inputs, visible focus, disabled states and readable errors. Verify new controls in light/dark themes at desktop and narrow widths with actual rendered output; include keyboard/touch and reduced-motion checks where interaction changes. Follow Panel design language for canonical source examples, dimensions, control states and rendered verification. Keep the default composer to a writing area and one bottom toolbar. Secondary settings/help/context tools belong in the existing anchored menus. Goal and Find belong in header actions, with no inactive rows or reserved height. Use one labelled overflow trigger per message, preserve exact passage selection before menu focus moves, and remove unused action-row height. Verify the full header-to- composer viewport, selected context/non-default summaries and every relocated keyboard/touch operation; do not shrink readable type to recover space.
  • Edit frontend/src/, then regenerate the panel and bundled PDF worker below custom_components/codex_bridge/frontend/ with npm run build; do not hand-edit generated frontend assets.
  • Keep App, Integration, panel, Bridge, Codex lock, changelog, and documentation versions synchronized through the owning scripts and tests.

Read the full file on GitHub · 120 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. 6d ago Changed · +1 lines · +15 tokens per session 7fa5c1409178
  2. 1mo ago Changed · +26 lines · +359 tokens per session 55a1f7e8b8a1
  3. 1mo ago Changed · +9 lines · +165 tokens per session c53f45a4363d
  4. 1mo ago Changed · +9 lines · +116 tokens per session bad10a05bbc2
  5. 1mo ago Changed · +5 lines · +80 tokens per session 2263e3dac43a
  6. 2mo ago First seen · 70 lines · 677 tokens per session scan A 54a9c7d9b03b

Subscribe to this mod's changes

HA_Codex_Bridge AGENTS.md is an instructions file published in the GitHub repository Herbertmt978/HA_Codex_Bridge (3 stars, last pushed 2d ago), licensed MIT. It adds 1,412 tokens to every session, about $0.0056 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-31.

Related

HA_Codex_Bridge AGENTS.md compared with instructions from other repositories

HA_Codex_Bridge AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
HA_Codex_Bridge AGENTS.mdHerbertmt978/HA_Codex_BridgeInstructions file32d agoMITA1,412Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot