codex-session-transfer: Instructions file for Codex

AGENTS.md

codex-session-transfer AGENTS.md is an instructions file for Codex, OpenCode from myyimu/codex-session-transfer. It costs 1,248 tokens per session, scanned A, original, MIT.

Project instructions for a local utility that preserves, inspects, exports, and imports Codex tasks. They define how to preview the app, apply visual changes, and record lasting product decisions.

In plain words
What is it for?
They guide local server previews, visual implementation from selected mockups, recording decisions in AGENTS.md, and maintaining the app's search, export, inspection, and import workflow.
Why use it?
They keep development aligned with the project's privacy boundary and product scope. In particular, they prohibit sending session contents to external analytics and avoid promising recovery of every private state.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 codex-session-transfer AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/myyimu/codex-session-transfer/agents-md"><img src="https://agentmods.dev/badge/instructions/myyimu/codex-session-transfer/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,248 This file is loaded in full into every session.
When invoked 1,248 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01248 $0.01248
Opus 5 $0.00624 $0.00624
Sonnet 5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

Measured yesterday against content hash 28dc55396128, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-15, from the pricing page.

Security

Grade A, and why

codex-session-transfer 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 yesterday.

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 · 36 lines

How it starts

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

Prototype Instructions

Run the local server yourself and open the preview in the browser available to this environment. Do not give the user server-start instructions when you can run it.

Before making substantial visual changes, use the Product Design plugin's get-context skill when the visual source is unclear or no longer matches the current goal. When the user gives durable prototype-specific design feedback, preferences, or decisions, record them in AGENTS.md.

When implementing from a selected generated mock, treat that image as the source of truth for layout, component anatomy, density, spacing, color, typography, visible content, and hierarchy.

Product Decisions

  • The app is a private local utility. Never upload Codex session contents or add analytics that transmit task data.
  • Position the app as a local Codex task continuity tool: move, back up, inspect, and make locally preserved tasks visible again. Do not position it as a general-purpose data recovery product or promise recovery of every private Codex state.
  • The core workflow has two views only: search/select/export and inspect/import.
  • Health checks, recovery suggestions, conflict previews, and operation receipts belong inside those two views as panels or dialogs, never as a third top-level view.
  • Keep the visual language airy and restrained: white space, low-contrast watercolor texture, cyan for export, rose for import, and compact desktop-scale typography.
  • Keep the export health panel, filter toolbar, and task list on separate grid rows with visible gaps; never allow diagnostic payloads or raw session content to expand a dialog beyond its scrollable content area.
  • Export archives use the codex-session-transfer/v1 manifest and remain standard ZIP files.
  • Imports are additive and idempotent. Existing task IDs are skipped by default; local Codex databases are backed up before registration.
  • Duplicate-session content comparison is ordered and content-based after normalizing receiving-machine path/model fields. An archive may explicitly supplement local history only when it is a strict superset; a local superset is retained, identical histories are left unchanged, and diverged histories require manual review. Never infer a safe merge from timestamps alone.
  • Duplicate-session difference labels must pair raw JSONL record counts with an approximate conversation-turn count based on meaningful user-message records, using copy such as “本地版本更完整:多 998 条会话记录,约 28 轮对话”. Record counts remain authoritative for merge safety; turn counts are explanatory UI only.
  • API endpoint configuration is local runtime state: restored histories must adapt to the receiving Codex configuration, while the UI distinguishes current configuration from historical task metadata.
  • Normalize project paths by receiving platform: display Windows paths without the \\?\ extended-length prefix, while preserving macOS/POSIX paths exactly. Never offer or accept directories under .codex/worktrees on any platform as project-mapping targets; users must bind restored tasks to the stable, real project directory.
  • Read the active model_provider from config.toml; when absent, infer it from the newest local session's metadata, then rewrite restored sessions to that provider so they appear in the matching API or official sidebar.
  • When a historical project folder is missing, restore it as an unbound project; never create a placeholder folder or bind it to a same-named local folder.
  • Recovery is bounded: preserve additive/idempotent import, local snapshots, and explicit user review. Do not overwrite the complete Codex data directory, forcibly rewrite sidebar preferences/caches, or claim exact long-term-memory restoration.
  • For sidebar visibility checks, treat a current project assignment to an existing project or the explicit projectless-thread list as authoritative; do not trust stale thread-client-id-v1 cache entries after a project is removed.
  • Recovery suggestions must be grouped and searchable by project, start with no tasks selected, and preserve an explicit selection made in the export list when opening the repair panel. Newly re-registered projects should be placed at the top of Codex’s project order rather than appended at the bottom.
  • The repair panel is an action surface, not a diagnostics console: default to a short actionable count, project-grouped selectable tasks, and one safety statement. Hide database checks, technical causes, receipts, and non-actionable diagnostics by default; non-actionable items may appear only as a compact expandable count.
  • Legacy malformed-title detection remains a compatibility cleanup concern, not a health or repair signal; never surface it as a recurring user action. Re-registering an archived task must create an active-session copy while retaining the archived source, so a successful repair is idempotent on the next scan.
  • For Codex data compatibility, choose the highest-numbered available state_*.sqlite state database, scan both active and archived session trees without duplicate task rows, and use history.jsonl only as a fallback for a missing user-facing title.
  • Task discovery must be progressive and cancellable: show parsed tasks as they are scanned, then enrich their metadata in the background. A timed-out scan retains an in-memory continuation so users can continue the remaining files without losing discovered/selected tasks; refresh intentionally starts over. Keep list rendering incremental (load more on scroll) so a large local history never freezes the window. Repair writes remain non-interruptible once a local snapshot/write begins, to avoid partial state changes.
  • Export, import, and repair are mutually exclusive operations. Once one starts, keep the user in its current view and prevent a second operation from starting until it completes.
  • Writes to Codex data must also be mutually exclusive across separate app processes through an atomic local lock file; a stale lock may be reclaimed only after its expiry threshold.
  • Snapshot cleanup is explicit and opt-in: show local snapshot storage on demand and delete only user-selected snapshots; never auto-delete recovery snapshots.
  • Technical consistency checks are retained only for internal diagnosis. Do not expose database validation, consistency counts, or non-actionable findings in the normal UI; show only an actionable “task not shown in Codex” recovery prompt. Local snapshots remain automatic safeguards before writes, while snapshot management stays hidden until an operation has completed.

Read the full file on GitHub · 36 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. yesterday First seen · 36 lines · 1,248 tokens per session scan A 28dc55396128

Subscribe to this mod's changes

codex-session-transfer AGENTS.md is an instructions file published in the GitHub repository myyimu/codex-session-transfer (26 stars, last pushed 25d ago), licensed MIT. It adds 1,248 tokens to every session, about $0.0062 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-09-14.

Related

Other instructions, from other repositories

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 · 8,259 tokens

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

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

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

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