MiniMax-AI avatar

codex-harness-patterns

v1.0.4

by MiniMax-AI · author: antianqi

Long-running task patterns distilled from OpenAI Codex harness v0.149.0: tool output budgeting, context pressure compaction, parallel sub-agent fan-out, structured plan streaming, self-review, sub-agent delegation, world-state tracking, background task management, thread-level goal persistence, per-sub-task model routing, completion auditing, fork-context decision, sub-agent family tracking, goal token budgeting, error recovery strategy, retry with backoff, streaming output reader, session handoff, long-term memory, skill auto-selection, plugin authoring helper, tool discovery pattern, and session branch/fork. 23 Skills total covering the complete agent lifecycle: planning → decomposition → sub-agent parallelism → execution → state tracking → tool discovery → skill/plugin authoring → memory persistence → session branching. Activates when an agent must manage token budget, decompose work, sustain multi-step tasks without losing focus, coordinate sub-agents, pick the right model for the job, prove that a non-trivial task is actually done, stay within an explicit goal token budget, recover from transient failures, read streaming output without filling context, hand off a session cleanly, persist memory across sessions, write a discoverable skill, design a discoverable tool, author a marketplace plugin, or branch / fork / revert a session. **Requires MiniMax Code 0.2.4+** (pinned to the mcode 0.2.4 `task` / `bash` tool surface: `task(description, prompt, agent_name, run_in_background?)`, `bash(command, timeout?, run_in_background?)`, `task_query`, `task_output`, `task_stop`: earlier mcode versions used legacy placeholders for the same fields and are not supported).

What codex-harness-patterns does, in the publisher's words

A focused collection of Skills distilled from the OpenAI Codex harness v0.149.0 execution model (codex-rs/core/). These Skills teach a MiniMax Code agent how to survive long-running multi-step tasks without losing focus, blowing its token budget, stalling on serial work, shipping unverified changes, burning context on bad sub-agent briefs, drifting from the original goal, paying main-model prices for cheap-model work, losing track of which sub-agent is doing what, failing on transient errors without a budget, reading streaming output without filling context, or losing work at session end.

> 类型:patch · Skill 主体修正 (round 2) · 5 个 Skill 按 mcode 0.2.4 真实 task / bash schema 重写;新增 23-Skill frontmatter 静态检查

  • fork-context-decision 0.2.0 → 0.3.0:reviewer 提出的 6 点全部 close

From the project README, punctuation lightly normalized · Open the README on GitHub

Skills
23
MCP servers
0
Stars
9
License
Apache-2.0
Repo created
2026-08-17
Last pushed
2026-09-10
Publisher type
Organization
Version
1.0.4

Links

Skills · 23

background-task
Decide when to launch a long-running task in the background and how to refer to it later. Covers both the `task` tool (sub-agent background via `run_in_background: true`) and the `bash` tool (shell background via `run_in_background: true`). USE WHEN: a sub-agent is expected to take > 1 minute, a sh…
completion-audit
Before saying "done", derive requirements, find authoritative evidence, verify each is ✅. USE WHEN: about to say "done" / "complete" / "ship it" / "I finished" / "做完了" on non-trivial task, about to mark `todowrite` step done, about to update goal to `complete`, user has been waiting for "done" for…
context-pressure-compact
Compress a long-running multi-step task into a structured snapshot before continuing. USE WHEN: `todowrite` > 5 items, after ~20 tool calls, context getting full, agent has lost track of goal, user said "compact" / "summarize" / "refocus" / "压缩" / "总结" / "到哪了", before context window fills (>80%), b…
delegate-with-context
Hand off a sub-task to a sub-agent with a tight, complete brief in the `prompt`, not the full conversation history. Apply the 4-part message envelope (Task name / Sender / Task / Payload + return path). USE WHEN: about to call `task()` to hand off a sub-task, the full conversation history is too la…
error-recovery-strategy
Classify error into 4 buckets (transient / deterministic / stale / unknown) and pick one of 5 actions (retry / switch / fallback / refresh-then-retry / ask-user / skip). USE WHEN: tool returns non-success, sub-agent `status: closed-failed`, exception escapes, timeout fires, weird partial-success re…
fork-context-decision
Decide how much parent context to include in a sub-agent's `prompt` before spawning it. Pick "all / N turns / brief only" explicitly, not by accident. USE WHEN: about to call `task()` to hand off work, designing a multi-agent flow, sub-agent failed and debugging whether cause was over- or under-for…
goal-persistence
Maintain explicit north-star goal for the whole thread that survives compactions and detects drift. USE WHEN: non-trivial task stated, user redirected mid-task ("actually do X instead" / "wait scrap that" / "现在改成"), before `context-pressure-compact`, about to mark done, user said "我们的目标是" / "we're…
goal-token-budgeting
Track running token usage against goal's `token_budget`, surface at 50/80/100% thresholds, stop at 100%. USE WHEN: `goal-persistence` active AND user provided `token_budget`, user said "do X within Y tokens" / "用 Y token 完成" / "不要超预算" / "stayed within budget" / "超出预算" / "用了多少 token", about to start…
long-term-memory
Design a cross-session long-term memory system that extracts, consolidates, and cites durable knowledge from conversation rollouts. USE WHEN: building any system that needs to persist insights across sessions, designing "what should the next agent remember" pipelines, building memory workspaces wit…
model-router
Classify sub-task complexity (cheap / medium / main) and decide whether to spawn a sub-agent at all. On MiniMax Code 0.2.4 the `task` tool does not expose per-call model selection, so the 3-tier rubric here is a thinking framework for session-level model choice and a "do I really need a sub-agent?"…
parallel-fanout
Decompose a task into 2+ truly independent sub-tasks and dispatch them concurrently via separate `task()` calls. Pick whether to fan out explicitly, not by accident. USE WHEN: the user task is clearly decomposable into 2+ independent sub-tasks (independent files, independent probes, independent ana…
plan-stream-emit
Before touching files on a non-trivial task, emit a structured plan and surface to the user for early course-correction. USE WHEN: non-trivial task, multi-step task, ambiguous requirement, would take > 3 tool calls, user has not approved an approach yet, user said "plan first" / "before you start"…
plugin-author-helper
retry-with-backoff
review-mode
session-branch-fork
session-handoff
skill-auto-select
streaming-output-reader
subagent-family-tracking
tool-discovery-pattern
tool-output-budget
world-state-tracking

Descriptions come from the frontmatter of each SKILL.md, punctuation lightly normalized.

Category

Other. Assigned by this directory. Agent Plugins 1.0.0 has no category field, so no manifest declares one.

Keywords

minimax-code · plugin · codex-harness · token-budget · context-compaction · sub-agent · task-planning · long-running · review · world-state · background-task · goal · model-routing · completion-audit · fork-context · family-tracking · token-accounting · error-recovery · retry · streaming · session-handoff · long-term-memory · skill-auto-select · plugin-author · tool-discovery · session-fork

Related by publisher and keywords

  • comfyui-studioMiniMax-AI

    Generic toolkit for driving a local ComfyUI 8188 server: workflow submission, queue monitoring, image download, and reproducible generation patterns. Includes a dependency-free stdio MCP server and four Skills (comfyui-studio + comfyui-workflow + comfyui-character + comfyui-drama) covering 6 preset scenarios (生图 / 模仿 / 改图 / 融合 / 首帧 / 出片).

  • dida365MiniMax-AI

    Skills for managing Dida365 (滴答清单, China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server, which you add yourself in your client's MCP settings.

  • mcodeforlegalMiniMax-AI

    Mainland China-first legal workflow plugins for MiniMax Code, contract review, litigation, compliance, corporate, labor & IP, with statute status checks and citation gates

  • Reference patterns for designing, evaluating, integrating, and debugging MCP servers without changing the active MCP configuration.

  • microbeMiniMax-AI

    16S/ITS downstream microbiome analysis via local Rscript (alpha/beta diversity, composition, differential abundance, co-occurrence, random forest).

  • Replay, audit, and evaluate protein binder design campaigns with the openbinder CLI, source registry, protocol compiler, campaign replay, ranking audit, agent decision evaluation, external handoff, and evidence-graded final reports. No protein models, no GPU.

Add the verified badge to your README[![Verified by AgentPluginsDirectory.com against Schema 1.0.0](https://agentpluginsdirectory.com/badge.svg)](https://agentpluginsdirectory.com/plugins/codex-harness-patterns)

Verified . We fetched the manifest from GitHub and checked it against the official Agent Plugins 1.0.0 schema at agent-plugins.org.