chatgpt-web-handoff: Instructions file for Codex

AGENTS.md

chatgpt-web-handoff AGENTS.md is an instructions file for Codex, OpenCode from sologuy/chatgpt-web-handoff. It costs 1,853 tokens per session, scanned A, original, MIT.

A project guide for a command-line tool that sends an agent’s task context to a logged-in ChatGPT website for separate review and retrieves the structured result.

In plain words
What is it for?
Use it when changing or validating the web-handoff CLI, including its diagnostics, job creation, status handling, submission, and result parsing.
Why use it?
It explains the tool’s boundaries, required reading, browser-based verification, state handling, and rules for keeping credentials and temporary files out of commits.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 chatgpt-web-handoff AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sologuy/chatgpt-web-handoff/agents-md"><img src="https://agentmods.dev/badge/instructions/sologuy/chatgpt-web-handoff/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,853 This file is loaded in full into every session.
When invoked 1,853 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.01853 $0.01853
Opus 5 $0.00927 $0.00927
Sonnet 5 $0.00371 $0.00371
Haiku 4.5 $0.00185 $0.00185

Measured 8d ago against content hash 0bb375847322, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

chatgpt-web-handoff 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 8d 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 -s http://127.0.0.1:9222/json/version | jq -r .Browser
AGENTS.md · 111 lines

How it starts

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

AGENTS.md

给在这个仓库里干活的 AI 编码助手(Claude Code / Codex / DSH 等)看的规则。 CLAUDE.md 通过 @AGENTS.md 导入本文件。全程简体中文。


1. 这是什么

chatgpt-web-handoff(cgh):把编码 agent 当前任务的上下文,交接给 你日常那个 Chrome 里已登录的 ChatGPT Web 做独立审查,再把结构化结论取回本地仓库。

形态:一个薄的确定性 CLI(bin/cgh + bin/cgh_cdp.py + bin/cgh_web.py)+ 一个 Skill。 不常驻服务、不写浏览器插件、不做 Native Messaging、不自建 Broker、不另起 Chrome Profile。

明确非目标:不做 ChatGPT API 替代品;不做通用浏览器自动化框架; 不做多账号 / 多并发调度;不保存或搬运登录凭证。

2. 改代码前先读

顺序 文件 作用
本文件 §6 硬约束,不可违反
bin/cgh 的模块 docstring 作业目录、job.json 字段、状态机、哨兵格式
bin/cgh_web.py 的注释 ChatGPT 真实 UI 的锚点、档位标签、附件行为、后台标签页解冻
CONTRIBUTING.zh-CN.md 分层边界、怎么验证改动

3. 怎么验证改动

本项目不写单元测试,验证靠真跑——干跑测不出浏览器那一半。

改完 bin/ 里任何东西:

  1. ./bin/cgh doctor 通过
  2. 在一个临时 git 仓库里跑一遍 new / 单活跃拦截 / 状态机 / parse 哨兵解析
  3. 再用 cgh submit 实跑一次低档位作业——这一步不能省

4. Git

分支 用途
main 稳定基线,只接受合并 + tag
dev 日常工作分支
task/<name> 跨多日或有风险的任务

commit 格式:<type>: <中文摘要>,type ∈ docs / feat / fix / chore / design。 提交前 git status --short 审查,确认没有凭证、没有 .env、 没有 .chatgpt/web-handoff/ 作业产物。

5. 目录

目录 职责
bin/ CLI 与浏览器编排(cgh 账本 / cgh_cdp 传输 / cgh_web ChatGPT 语义)
skills/chatgpt-handoff/ Skill 真相源,scripts/install.sh 会 symlink 出去
templates/handoff/ request.md / followup.md / job.json 模板(运行时依赖)
scripts/ 安装脚本

Handoff 作业产物落在使用方仓库.chatgpt/web-handoff/<job_id>/,不落在本仓库。 本仓库的 .chatgpt/web-handoff/ 只用于自测,整目录已 gitignore。


6. 硬约束(实现时不可违反)

  1. 不落凭证:任何环节不读取、不复制、不持久化 cookie / session token / 账号密码。日志、快照、job.jsonrequest.md 里都不得出现凭证或 Authorization 头。
  2. 页面白名单:任何 click / fill / type_text / upload_file 之前,必须先确认当前 page 的 host ∈ chatgpt.com / chat.openai.com。不匹配立即停止并置状态 wrong_page,不试探、不猜测。
  3. effort 不静默降级:请求的推理档位在 UI 里找不到时,置 effort_not_found 并列出实际可选项,交由用户或配置决定,禁止悄悄用低档跑完再交付job.json 必须同时记录 effort_requestedeffort_actual
  4. 不静默点坐标:元素定位优先级 —— ① a11y role + accessible name ② 页面可见文本 ③ data-testid / data-message-author-role ④ 失败则保存 failed-snapshot.txt + failed-page.webp 并置 ui_changed。禁止写死 CSS selector,禁止凭坐标盲点。
  5. 不阻塞submit 发送成功后立即返回 job_idpoll 单次调用只读一次状态就返回,不在一次工具调用里自旋等待
  6. 单活跃作业max_active_jobs = 1,用 lockfile 实际拦截(不只是写在文档里)。并发需求等 V2 的 --experimentalPageIdRouting
  7. 浏览器通道(v0.4 改):稳定提交路径必须由确定性代码执行, 主驱动是 bin/cgh_cdp.py 的自有 raw CDP;chrome-devtools-mcp 降为探测 / 诊断 / UI 改版适配用途, 不参与正常 handoff。禁止用 Playwright 连本机 9222 的 Chrome——旧版 connectOverCDP() 会替换 Chrome 的下载委托,下载文件变成无扩展名的 playwright-artifacts-*,断开或杀进程都不恢复,只能重启 Chrome。 也不要在跑 handoff 时同时挂 claude-in-chrome,两个自动化通道会互抢标签页和焦点。 CDP 层只保留传输与通用页面操作,业务语义一律留在 cgh_web.py,不要把它养成通用 DevTools 框架。
  8. 使用边界:不做团队共享服务、不做批量任务、不对外提供 API。
  9. 不改写原文result.md 保存 ChatGPT 原始输出 + 解析出的结构化块。不做"总结的总结",不删少数派意见,不把不确定结论写成确定结论。
  10. 产物默认不进使用方 gitcgh 在使用方仓库创建 .chatgpt/web-handoff/ 时,必须同时确保其被 gitignore(request.md 含用户代码上下文,result.md 含外部模型输出)。

Read the full file on GitHub · 111 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. 8d ago First seen · 111 lines · 1,853 tokens per session scan A 0bb375847322

Subscribe to this mod's changes

chatgpt-web-handoff AGENTS.md is an instructions file published in the GitHub repository sologuy/chatgpt-web-handoff (2 stars, last pushed 3d ago), licensed MIT. It adds 1,853 tokens to every session, about $0.0093 per session on Opus 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

Other instructions, from other repositories

next.js AGENTS.md

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

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,153 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

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

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,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens