local-operator AGENTS.md

local-operator AGENTS.md is an instructions file for Codex, OpenCode from damianvtran/local-operator. It costs 5,892 tokens per session, scanned A, original, MIT.

Contributor instructions for local-operator, including its Python test commands, release process, versioning guidance, and visual checks for interface changes.

In plain words
What is it for?
Use it when changing, testing, releasing, or visually checking the local-operator application.
Why use it?
It highlights separate unit, terminal-interface, and end-to-end tests, including failures that ordinary tests may miss.

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/damianvtran/local-operator/agents-md
Clone the repo
git clone --depth 1 https://github.com/damianvtran/local-operator

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 local-operator AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/damianvtran/local-operator/agents-md.svg)](https://agentmods.dev/instructions/damianvtran/local-operator/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/damianvtran/local-operator/agents-md"><img src="https://agentmods.dev/badge/instructions/damianvtran/local-operator/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,892 This file is loaded in full into every session.
When invoked 5,892 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.05892 $0.05892
Opus 5 $0.02946 $0.02946
Sonnet 5 $0.01178 $0.01178
Haiku 4.5 $0.00589 $0.00589

Measured 4d ago against content hash 7ae0857ca794, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

local-operator 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 4d 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 · 444 lines

How it starts

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

Working on local-operator

Notes for agents (and humans) changing this codebase. This file covers the things that are easy to get wrong here and expensive to discover later. For what the rewrite set out to do see docs/REWRITE.md; for the evidence behind each round see docs/VERIFICATION.md.

Environment

cd ~/local-operator
.venv/bin/python -m pytest tests/unit -q          # ~2700 tests, ~3.5 min

TUI tests need a colour-capable terminal, so run them with the environment the suite expects:

env -u NO_COLOR TERM=xterm-256color .venv/bin/python -m pytest tests/unit/tui -q

tests/e2e is a separate stage that drives the assembled application — boot, a real turn through a real tool, and /resume — and it is deselected from the default run (-m "not e2e" in addopts). Run it explicitly:

env -u NO_COLOR TERM=xterm-256color .venv/bin/python -m pytest tests/e2e -m e2e -n0 -q

It exists because the whole unit suite was green while the TUI was completely frozen (#401: a blocking flock in the MCP OAuth refresh lock deadlocked the event loop on /resume). Two things about it are load-bearing rather than stylistic, and both are documented at length in tests/e2e/watchdog.py:

  • Its failure mode is a hang, not an assertion. The deadlock parks two threads inside syscalls, so asyncio.wait_for, thread watchdogs and signal-based timeouts all fail to fire — verified, not assumed. Only faulthandler.dump_traceback_later(exit=True) survives it, because it runs in a C thread and needs no GIL. A tripped watchdog kills the process and writes every thread's stack to a file; python -m tests.e2e.watchdog prints it back.
  • It is why the stage is deselected and runs -n0. Under xdist a fired watchdog would kill a worker carrying unrelated tests and report them as an infrastructure error rather than as the freeze they are.

It is fully headless (Textual's run_test() pilot, no window, no display, no TTY) and uses no API key, so its CI job carries no fork gate — unlike cli-sanity/server-sanity, whose live-LLM secrets force one. That is deliberate: the resume-liveness assertion is the regression guard, so it has to run on every PR including forks.

Read the full file on GitHub · 444 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. 4d ago First seen · 444 lines · 5,892 tokens per session scan A 7ae0857ca794

Subscribe to this mod's changes

local-operator AGENTS.md is an instructions file published in the GitHub repository damianvtran/local-operator (209 stars, last pushed 4d ago), licensed MIT. It adds 5,892 tokens to every session, about $0.0295 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-30.