gpt-webcodex AGENTS.md

Maintenance instructions for a Windows Electron desktop assistant that hosts a ChatGPT page, a local MCP runtime, and an OpenAI connection tunnel. MCP is a standard way for an AI assistant to call tools.

In plain words
What is it for?
Use them when modifying the Electron app, its user interface, the local tool runtime, tunnel handling, tests, process restarts, or shared tool definitions.
Why use it?
They help keep the desktop layers, tool schemas, process state, security checks, and recovery behavior consistent during 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/3169657175/gpt-webcodex/agents-md
Clone the repo
git clone --depth 1 https://github.com/3169657175/gpt-webcodex

Made for: Codex, OpenCode.

Per session 872 This file is loaded in full into every session.
When invoked 872 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.00872 $0.00872
Opus 5 $0.00436 $0.00436
Sonnet 5 $0.00174 $0.00174
Haiku 4.5 $0.00087 $0.00087

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

Security

Grade A, and why

gpt-webcodex 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 · 46 lines

How it starts

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

网页 MCP 助手维护指令

项目目标

  • 这是 Windows Electron 桌面助手,负责承载 ChatGPT 页面、Coding Tools MCP 本地 Runtime 与 OpenAI Tunnel。
  • 优先级顺序:数据安全 > Runtime/Schema 一致性 > 长任务可恢复 > 模型上下文效率 > UI 功能数量。
  • 所有面向用户的界面、状态、错误和操作说明尽量使用中文;协议字段、代码标识符和官方专有名词可保留英文。

关键目录

  • electron/:Electron 主进程、ChatGPT WebContents 与 Runtime/Tunnel 编排。
  • renderer/:桌面管理界面。
  • resources/coding-tools-mcp/:内置 Coding Tools MCP Python Runtime。
  • tests/:Electron/Node 回归测试。
  • resources/coding-tools-mcp/tests/:MCP Runtime Python 回归与场景测试。
  • scripts/check-schema-contract.py:公共 MCP Schema 契约生成与校验。

修改规则

  • 主工作区可能长期存在未提交修改。复杂修改优先使用 run-scoped Git Worktree;应用回主工作区前必须做冲突检查,禁止自动 merge/rebase/reset 用户工作区。
  • 不要提交或交付测试生成的 __pycache__ / .pyc 变化。Python 测试应设置 PYTHONDONTWRITEBYTECODE=1
  • current_command 只表示当前仍在执行的命令。任务进入 completed / failed / cancelled 后必须结算到历史字段并清空当前命令。
  • ChatGPT 页面、OpenAI Tunnel、本地 MCP Runtime 是三个故障层。页面或 Tunnel 异常不得无条件重启健康的 MCP Runtime。
  • Runtime 重启必须确认旧 PID 已退出、端口已释放,并校验新 process_idlaunch_idruntime_instance_id、源码指纹、Schema version/hash 与 workspace。
  • 修改 coding_tools_mcp 任意 Python 运行时代码都必须改变 Runtime source fingerprint;不要恢复成手工文件白名单。

MCP Schema 与模型数据

  • 修改公开工具名、参数、枚举、默认值或含义时,提升 TOOL_SCHEMA_VERSION,然后运行 python scripts/check-schema-contract.py --write 更新 schema-contract.json
  • server/discover 与健康端点的 Runtime/Schema 身份必须保持一致。
  • ChatGPT 外部调用默认返回 compact model payload;桌面内部调用可以保留 full 数据。不要为了桌面 UI 方便把完整 events、历史 build、巨大 diff、prepared/workspace/task_resume 默认塞回模型上下文。
  • 需要完整调试数据时使用显式 detail=full / response_detail=full,不要把 full 重新设为默认。

版本发布

  • 桌面版本至少同步:package.jsonpackage-lock.json、管理界面版本展示、相关测试与文档。
  • MCP Runtime 版本同步:coding_tools_mcp/__init__.pypyproject.toml
  • Schema 契约中的 runtime version、schema version、schema hash、tool count 必须由脚本生成并与运行时一致。

验证

  • 常规全量测试:npm run test
  • 构建安装包:npm run dist;构建前必须先保证全量测试和 Schema 契约通过。
  • 涉及 Runtime 重启、Schema、Tunnel 或长任务时,除单元测试外还要验证:旧进程退出、新进程身份变化、同端口同 Token 重新 discovery、后台任务状态可恢复、主 Git index 未被 Worktree 流程改动。
  • 不要因为某个测试命令的工作目录或依赖环境配置错误就把代码判定为失败;先确认命令实际运行目录和内置 Python/vendor 环境。

Read the full file on GitHub · 46 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 · 46 lines · 872 tokens per session scan A 402d655bcd31

Subscribe to this mod's changes

gpt-webcodex AGENTS.md is an instructions file published in the GitHub repository 3169657175/gpt-webcodex (193 stars, last pushed 4d ago), licensed MIT. It adds 872 tokens to every session, about $0.0044 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.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens