deepthonk: Instructions file for Codex

AGENTS.md

deepthonk AGENTS.md is an instructions file for Codex, OpenCode from linxule/deepthonk. It costs 769 tokens per session, scanned C, original, MIT.

Project instructions for DeepThonk, a TypeScript command-line tool and MCP server that improves reasoning by running multiple reasoning attempts and combining their results. The instructions require the command-line tool and MCP server to share one core engine.

In plain words
What is it for?
Use them when developing DeepThonk’s core engine, CLI, MCP server, configuration options, prompt templates, or inspection resources.
Why use it?
They give coding agents precise rules for extending the project without duplicating its main algorithm. They also require all important settings and intermediate results to remain accessible.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/linxule/deepthonk/agents-md"><img src="https://agentmods.dev/badge/instructions/linxule/deepthonk/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 769 This file is loaded in full into every session.
When invoked 769 The same file — it is already loaded in full.
Security scan C 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.00769 $0.00769
Opus 5.5 $0.00308 $0.00308
Sonnet 5.5 $0.00154 $0.00154
Haiku 4.5 $0.00077 $0.00077

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

Security

Grade C, and why

deepthonk AGENTS.md scanned grade C 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf runs/test-quick
AGENTS.md · 38 lines

What it actually says

DeepThonk Build Instructions

DeepThonk is a provider-neutral, OpenDeepThink-style reasoning optimizer exposed as a TypeScript CLI and MCP server.

The algorithm is from Zhou et al. 2026 (OpenDeepThink: Parallel Reasoning via Bradley–Terry Aggregation, arXiv:2605.15177); the authors' Python reference implementation is at https://github.com/ZhouShang0817/open-deep-think (MIT). DeepThonk is an independent TypeScript reimplementation — not a fork, no code vendored from the reference.

Tagline: thonk harder, not richer.

Build and maintain the project around one shared execution engine in packages/core. The CLI and MCP server are wrappers over that engine; do not duplicate algorithm logic in those packages.

Design principle: agent-composable surface. Every algorithm dimension — population shape (n, k, t, m), regularization (lambda), temperatures, prompt style, and per-phase prompt templates — must be reachable inline through MCP tool arguments and CLI flags, not only through YAML files. Inspection of every intermediate artifact must remain available as MCP resources. See docs/customization.md for the variable contract.

Core requirements:

  • Implement population-based candidate generation, randomized pairwise comparison, Bradley-Terry aggregation, elite preservation, critique-guided mutation, bottom-quartile discard, and final dense ranking.
  • Keep all model access behind the provider-neutral ModelDriver contract in packages/providers.
  • Support fake, openai-compatible, and deepseek providers.
  • Do not request hidden chain-of-thought. Ask models for final artifacts, concise rationales, critiques, and strict JSON where needed.
  • Never log API keys or env var values. Do not write prompts or raw model output unless explicitly configured.
  • MCP is a protocol wrapper over core execution, not a separate execution engine.
  • The Streamable HTTP transport must keep DNS rebinding protection on and validate Host against the loopback bind (CVE-2025-66414 class). Do not remove that guard when extending the transport.
  • Background MCP jobs (deepthonk.start) must wrap both their success and failure handlers so a filesystem error cannot escape as an unhandled rejection.
  • Use pnpm, TypeScript, Vitest, Zod 4, Commander, YAML, and the stable official MCP TypeScript SDK package @modelcontextprotocol/sdk. Do not add p-limit: it was removed in v0.3.0 because nothing imported it — phaseRunner.ts implements its own worker pool.
  • zod is part of @deepthonk/core's published API (index.ts re-exports schemas.ts). A Zod major bump is a breaking release, not a dependency chore.
  • Anything test/ imports must be declared in the root package.json. test/ sits at the workspace root, so a package reaching it only transitively resolves locally and then fails CI with ERR_MODULE_NOT_FOUND. This has bitten yaml, @modelcontextprotocol/sdk, and zod.

Acceptance checks:

pnpm install
pnpm run build
pnpm test
pnpm --silent --filter deepthonk deepthonk plan --profile paper
rm -rf runs/test-quick
pnpm --silent --filter deepthonk deepthonk run --provider fake --profile quick --task examples/tasks/toy-math.txt --out runs/test-quick
pnpm --silent --filter deepthonk deepthonk inspect runs/test-quick
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 · 38 lines · 769 tokens per session scan C 0fc8c2d7f0f3

Subscribe to this mod's changes

deepthonk AGENTS.md is an instructions file published in the GitHub repository linxule/deepthonk (0 stars, last pushed 16d ago), licensed MIT. It adds 769 tokens to every session, about $0.0031 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

deepthonk AGENTS.md compared with instructions from other repositories

deepthonk AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
deepthonk AGENTS.mdlinxule/deepthonkInstructions file016d agoMITC769Codex, 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