remocli: Instructions file for Codex

AGENTS.md

remocli AGENTS.md is an instructions file for Codex, OpenCode from whulxc/remocli. It costs 997 tokens per session, scanned A, original, MIT.

Repository instructions for maintaining RemoCLI, a Windows and WSL control system for remote command-line sessions. They describe its gateway, per-WSL agent, network connections, web or Android client, deployment modes, and troubleshooting entry points.

In plain words
What is it for?
Use them when maintaining RemoCLI, identifying its active USB, LAN, tunnel, or public mode, checking the gateway or agent, generating deployment configuration, or following troubleshooting documentation.
Why use it?
They provide a fixed order for diagnosing connection and login problems, starting with the gateway and agent before investigating the client. This helps identify which layer is actually failing.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 remocli AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/whulxc/remocli/agents-md"><img src="https://agentmods.dev/badge/instructions/whulxc/remocli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 997 This file is loaded in full into every session.
When invoked 997 The same file — it is already loaded in full.
Security scan A 1 finding. 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.00997 $0.00997
Opus 5.5 $0.00399 $0.00399
Sonnet 5.5 $0.00199 $0.00199
Haiku 4.5 $0.00100 $0.00100

Measured 2mo ago against content hash f30693d4f86d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

remocli AGENTS.md scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `curl -sS http://127.0.0.1:8080/health`
AGENTS.md · 134 lines

How it starts

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

RemoCLI Maintenance Guide

This repository is maintained as a Windows + WSL control plane for remote CLI sessions. Use this file as the default engineering context for new maintenance sessions.

What matters first

  • Treat the stack as four layers:
    • gateway
    • per-WSL agent
    • transport (USB, LAN, Quick tunnel preview, Formal public deployment)
    • Android/Web client state
  • For connection or login problems, always check layers in that order.
  • Do not start from app-side guessing when gateway or agent health is unknown.

Primary entrypoints

  • Gateway server: src/gateway/server.js
  • Agent server: src/agent/server.js
  • Frontend app: src/frontend/app.js
  • Android shell: android/app/src/main/java/com/remoteconnect/mobile/MainActivity.kt
  • Deployment config generation: scripts/generate-deployment-config.mjs
  • Public deployment notes: docs/public-deployment-modes.md
  • Troubleshooting: docs/troubleshooting.md

Default troubleshooting flow

1. Identify the active mode

  • USB direct
  • LAN direct
  • Quick tunnel preview
  • Formal public deployment

Do not treat the Cloudflare Access team domain as the application hostname.

2. Check the local stack

  • Gateway:
    • curl -sS http://127.0.0.1:8080/health
  • Agent:
    • node scripts/check-deployment.mjs <deployment-manifest>
  • Logs:
    • tail -n 80 data/runtime/gateway.log
    • tail -n 80 data/runtime/agent-*.log

3. Check the transport

  • USB:
    • adb devices
    • adb reverse --list
  • LAN:
    • test the Windows LAN URL from the host first
  • Formal public:
    • curl -I https://<public-hostname>
    • if 1033, check named tunnel state and logs

4. Only then check client state

  • Web page stale state: refresh once
  • Android stale state: reopen app once
  • Only use UI tree / logcat when:
    • the user says “still broken”, or
    • server-side state is healthy but phone behavior disagrees

Low-token maintenance defaults

  • Do not restate the entire README in every maintenance session.
  • Read AGENTS.md first, then only open files relevant to the active problem.
  • Prefer short status reports:
    • root cause
    • exact fix
    • validation
    • whether web refresh / app reopen / gateway restart / agent restart is needed
  • For repeat issues, reuse the same path:
    • mode -> gateway -> agent -> transport -> client

Read the full file on GitHub · 134 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. 2mo ago First seen · 134 lines · 997 tokens per session scan A f30693d4f86d

Subscribe to this mod's changes

remocli AGENTS.md is an instructions file published in the GitHub repository whulxc/remocli (5 stars, last pushed 7mo ago), licensed MIT. It adds 997 tokens to every session, about $0.0040 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

remocli AGENTS.md compared with instructions from other repositories

remocli AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
remocli AGENTS.mdwhulxc/remocliInstructions file57mo agoMITA997Codex, 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