HA_Codex_Bridge AGENTS.md

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/herbertmt978/ha_codex_bridge/agents-md
Clone the repo
git clone --depth 1 https://github.com/Herbertmt978/HA_Codex_Bridge

Made for: Codex, OpenCode.

Per session 677 This file is loaded in full into every session.
When invoked 677 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00677 $0.00677
Opus 5 $0.00338 $0.00338
Sonnet 5 $0.00135 $0.00135
Haiku 4.5 $0.00068 $0.00068

Measured 2d ago against content hash 54a9c7d9b03b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 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. Constrain enabled MCP configuration to trusted HTTPS hostnames, reject credentials and known non-public addresses, never expose bearer-token settings, document that DNS validation is not connection-time enforcement, and keep OAuth authorization URLs one-shot and uncached.
  • 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.
  • 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 · 70 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. 2d 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 (1 stars, last pushed 6d ago), licensed MIT. It adds 677 tokens to every session, about $0.0034 per session on Opus 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

Other instructions, from other repositories

home-mind CLAUDE.md

Claude Code instructions for hoornet/home-mind, covering claude.md, architecture, home layout index, device capability index and request flow (ichatengine.chat).

hoornet/home-mind · 4,574 tokens

hass-mcp-server AGENTS.md

Instructions for ganhammar/hass-mcp-server, covering working on this integration, calling into home assistant, before replacing a private call with a service, anything left in category 2 or 3 and conventions.

ganhammar/hass-mcp-server · 636 tokens

ILLIP AGENTS.md

Instructions for Yashwanth-pilli/ILLIP, covering illip ai - agent framework documentation, agents, 1. planner agent, 2. builder agent and 3. reviewer agent.

Yashwanth-pilli/ILLIP · 1,392 tokens

agent-composer CLAUDE.md

Instructions for mhattingpete/agent-composer, covering agent composer, package managers, development, model provider and key files.

mhattingpete/agent-composer · 198 tokens

hass-mcp-server CLAUDE.md

Instructions for ganhammar/hass-mcp-server, a project described as: A Home Assistant Custom Component that provides an MCP (Model Context Protocol) server using HTTP transport, allowing AI assistants like Claude to interact with your Home Assistant instance over HTTP.

ganhammar/hass-mcp-server · 5 tokens

map-framework CLAUDE.md

Instructions for azalio/map-framework, covering map framework (mapify-cli) — agent instructions, what this repo is, critical invariant: template single-source render, skill catalog invariant and how to work in this repo.

azalio/map-framework · 1,601 tokens