Maximizing GPT-6 Astra's Potential: The Complete Guide to Codex Harness Design

@harisuke_ai
JAPANESESep 07, 2026
136K
294
17
0
937

TL;DR

This comprehensive guide explores 'Harness Engineering' for GPT-6 Astra, shifting focus from prompt writing to environment design. It details eight core components to build autonomous, reliable AI agents using the Codex framework.

On September 3, 2026, OpenAI released GPT-6 Astra.

Many people simply switch their Codex model settings to Astra and stop there.

However, OpenAI didn't just update the model that day. The official announcement explicitly states that they updated the Codex 'Harness' alongside Astra (Source: OpenAI "GPT-6 Astra: A new generation of intelligence" https://openai.com/index/gpt-6-astra/ ).

The brain and the environment in which the brain works. OpenAI rebuilt both simultaneously.

However, if unclear instructions or contradictory rules remain, Astra may stop mid-task or ask for constant clarification.

In this article, I will provide these three things:

  • A full explanation of the 8 elements that make up the Codex Harness (with priorities)
  • 4 diagnostic and inventory prompts you can copy and paste immediately
  • An execution sequence for where to start in just 30 minutes today

There's no point in holding back, so I'll share the most important prompt first. This prompt makes Codex self-report its current project status.

▼ Copy from here

You are a Codex Harness Designer.

The goal is to create a state where GPT-6 Astra can "complete tasks safely, reproducibly, and to the end without needing detailed instructions every time" in this project.

First, do not make any changes. Review the current project configuration, settings files, and available features, then diagnose the following:

  1. AGENTS.md: Are the purpose, rules to follow, prohibitions, completion conditions, and references clear?
  2. docs / context: Is the structure organized so you can find necessary information yourself? Are there old, redundant, or contradictory descriptions?
  3. Skills: Which repetitive tasks should be turned into Skills? Conversely, which Skills are unnecessary?
  4. MCP / Plugins: What external tools or data connections are missing?
  5. Environment: Can you reproduce dependencies, setup, and test execution yourself?
  6. Permissions / Sandbox: Are you given excessive permissions? Conversely, are there too many pending approvals stopping work?
  7. Hooks / Tests: Can pre-execution checks, secret detection, testing, and completion checks be automated?
  8. Browser / Computer Use: Are there tasks that should be verified by actually operating the finished product?
  9. Subagents: Are there tasks like research, review, or testing that would be faster if parallelized?
  10. Feedback Loop: Is there a mechanism to feed past failures or correction instructions back into AGENTS.md / docs / Skill / Hook / Test?

Output format: A. Evaluate each item on a 5-point scale B. Top 5 critical deficiencies C. Things that can be fixed in 30 minutes today D. Things to systematize within a week E. Files to create/change and specific change proposals F. Security/permission risks G. Priority of implementation

Do not fabricate settings based on speculation. Check the currently available Codex features and versions before judging. Clearly state if features are Experimental / Beta / Deprecated.

Do not change files, expand permissions, or connect to external services until I have reviewed these diagnostic results.

▲ Copy to here

Running this before you finish reading will save you time later.

Target and Usage of This Article

This target is Codex as of September 7, 2026. Codex updates quickly, so please check the date before reading.

Included are the 8 harness components, 7 maturity levels, and 4 copy-pasteable prompt templates.

The intended audience is "people who use Codex but stopped after writing AGENTS.md." I will provide annotations for technical terms upon their first appearance so non-engineers can read this too.

To ensure value even if you don't read everything, I've included "Priority" for each element. If you just pick the high-priority ones, it will at least function at a minimum level.

What Exactly is a "Harness"?

A harness is a system that connects models, tools, and humans to get work done.

In OpenAI's technical blog "Unrolling the Codex agent loop" (January 2026, Michael Bolin), the Codex harness is described as "the core agent loop and execution logic that serves as the foundation for all Codex experiences" (https://openai.com/index/unrolling-the-codex-agent-loop/ ).

The agent loop refers to this repetition:

  • Receive user input
  • Query the model to think
  • Execute the tool chosen by the model
  • Show the result and let it think again

It is the Codex side, not the model, that runs this loop.

To use a company analogy:

Astra = The brain of an extremely talented employee. Harness = The company itself where that employee works. Employment rules, internal Wiki, operating procedures, access rights to internal systems, approval rules, inspection processes, and colleagues.

A common mistake is to lazily summarize "AGENTS.md = Harness." AGENTS.md is only one part of the harness. Just as a company doesn't run solely on a distributed rulebook.

In practice, the entire effort of creating a "comfortable working environment" by combining elements like AGENTS.md, Skills, MCP, Hooks, permission settings, execution environments, browsers, and Subagents is called Harness Engineering. This article uses the term in that sense.

What Actually Changed with the Astra Release?

There are three things, all officially stated by OpenAI.

  1. OpenAI improved the brain and the environment simultaneously

When Astra was announced, OpenAI explicitly stated they updated the Codex harness, reporting that task completion was 1.9x faster compared to the GPT-5.6 Sol environment in the Mind2Web browser operation benchmark.

In OSWorld 2.0, Astra scored 72.6% compared to GPT-5.6 Sol's 65.7%. Furthermore, simulation evaluations for required time reported a reduction from approximately 75 minutes to about 40 minutes per task.

Caution is needed here: these are figures published by OpenAI itself and are benchmark results under specific conditions. There is no guarantee it will be 1.9x faster in your environment.

However, the takeaway is clear: the speed gains came from the combination of the model and the execution environment, not the model alone.

  1. Astra reads "surrounding instructions" much better

This is the most effective change for practical work.

OpenAI's model guidance states that while Astra has stronger instruction-following capabilities, it can also be more sensitive to instructions contained in files like Skills and AGENTS.md. It strongly recommends auditing Skills and other files accessible to the model (https://developers.openai.com/api/docs/guides/latest-model ).

The same document contains a more specific warning: unclear or contradictory instructions within a skill file can cause the model to stop and block work at an early stage.

The situation is this:

The brain got smarter. Therefore, it has become more faithful to both good and bad rules than before.

Suppose a useless sentence remains in an AGENTS.md you've been adding to since last year. Sol might have ignored it appropriately. Astra will follow it strictly.

  1. Changes in delegation and memory handling

According to the official announcement, Astra can now maintain notes across context windows within Codex, avoiding the need to re-compress accumulated details into a single summary every time. This reduces information loss during long tasks.

However, as of September 7, 2026, this is an experimental feature. It must be explicitly enabled in config.toml and is off by default. OpenAI has announced it will become a default Astra feature in the coming weeks, but for now, it won't work unless you add the setting yourself.

On the other hand, the model guidance also notes that for Astra, "delegation to Subagents might not be as frequent as your workflow expects." This means if you want parallelization, you must specify when to delegate on the harness side.

The guidance also mentions that Astra tends toward detailed, formatted responses, so you should specify the required style and structure.

All of these point to: "Don't just leave it alone because the model is smart," but rather "Because it's smart, it will move exactly as specified, so fix your specifications."

The 8-Element Map of the Harness

The 8 elements listed here and the 7 maturity levels described later are not official OpenAI definitions. They are organized uniquely for this article based on the official information seen so far. Use them as a practical framework.

Here is the map with company analogies and priorities:

  1. AGENTS.md | Employment Rules & Basic Policy | Priority: Highest
  2. docs / Context | Internal Wiki & Manuals | Priority: High
  3. Skills | Standard Operating Procedures | Priority: High
  4. MCP / Plugins | Connection to Internal Systems | Priority: Medium
  5. Environment | PC, Desk, Work Environment | Priority: High
  6. Permissions / Sandbox | Authority & Approval Rules | Priority: Highest
  7. Hooks / Tests | Auto-checks & Inspections | Priority: Medium
  8. Browser / Subagents | Eyes, Hands, Subordinates | Priority: Medium

Beginners should start with 1 and 6. The reason is simple: just by organizing these two, you solidify the foundation for other elements. However, this doesn't mean you shouldn't check the others. Permissions for external services connected via MCP, procedures in Skills, and scripts executed by Hooks are all subjects for safety verification. Especially since MCP is a connection to the outside, check separately if the destination is trustworthy and if the granted permissions are minimal.

Below is an explanation of each.

Instruction and Knowledge Layer | AGENTS.md, docs, Skills

What it is: A markdown file placed in the root of the repository. Codex reads it before starting work and treats it as project-specific rules.

What it does: You can avoid writing premises like "Always run tests with this command" or "Don't touch this directory" in every prompt.

The failure almost everyone makes here is overstuffing.

OpenAI's technical blog "Harness engineering: leveraging Codex in an agent-first world" (February 11, 2026, Ryan Lopopolo) describes internal failures. Trying a massive AGENTS.md resulted in context pressure, leftover old rules, and confusion over what was important (https://openai.com/index/harness-engineering/ ).

The team switched to operating AGENTS.md as a "map" of about 100 lines. Details are placed under docs, and AGENTS.md simply points to them.

Instead of making a talented new hire memorize a 1,000-page rulebook, you give them a guide map saying, "Look at this shelf if you're stuck." That's the difference.

Context is a finite resource. Massive instruction files push out the task itself or the location of the code to be read.

A map-style AGENTS.md usually looks like this:

▼ Copy from here

AGENTS.md

What is this project?

(1-3 lines. What are you making, who uses it?)

Read these first

  • Design Policy: docs/architecture.md
  • Directory Structure: docs/structure.md
  • Glossary: docs/glossary.md
  • Past Failures & Fixes: docs/postmortems.md

Rules to follow

  • Tests: Run all with (actual command) and do not report completion with failures remaining.
  • Prohibited areas: (List paths)
  • Before committing: (linter / formatter commands)

Definition of Done

Report "Complete" only when all the following are met:

  • Tests pass
  • Intent of change can be explained in one paragraph
  • Self-verified for unintended side effects

When in doubt

Do not make assumptions; present at least two options and ask me.

Instruction Priority

  1. My (user) immediate instructions
  2. This AGENTS.md
  3. Procedures in Skills You may ignore lower-level instructions that contradict higher ones. If you skip an instruction, report its name.

▲ Copy to here

The final "Instruction Priority" is especially effective for Astra and later models. The model guidance explicitly states to clarify whether user instructions or skill instructions take precedence.

What it is: The actual knowledge repository referenced by AGENTS.md. Design docs, architecture diagrams, glossaries, past decision records, etc.

What it does: Codex only reads them when necessary, so they don't consume context constantly.

What's striking in the Harness Engineering article is the explanation for slow initial progress. It wasn't because Codex lacked ability, but because "the environment was underspecified."

What was missing were tools, abstractions, internal structures, and information in a form Codex could read.

So when something failed, the team's reaction wasn't "make it try harder." It was to think, "Which capability is missing, and how can we make it readable and enforceable for the agent?"

This is the essence of harness engineering. Fix the environment, not the prompt.

To clarify, this is one internal OpenAI case study. A team of 3 people produced about 1 million lines and 1,500 PRs in 5 months with 0 lines of human-written code; this doesn't mean general users can reproduce the same results.

What it is: A file in SKILL.md format. It bundles instructions, reference materials, and scripts if necessary to execute specific tasks with the same procedure every time.

What it does: You can move from copy-pasting good prompts to saving the work itself.

For example, if you make "Article Creation" a Skill, the content would be:

  • Research
  • Fact-checking
  • Title proposals
  • Structure design
  • Writing
  • Prohibited expression check
  • Final review

The caution for Astra and later is not to add too many. Skill names and descriptions are loaded into the context, so if the number increases, descriptions get truncated, making it hard to judge which to choose. If descriptions contradict or all claim "Use me," the model might load a Skill that doesn't fit the task.

Skills are for "procedures needed only for specific tasks," not "instructions needed every time." Mistaking this is the same as writing everything in AGENTS.md.

Hands and Feet Layer | MCP, Plugins, Environment

What it is: MCP is a standard for connecting Codex to external tools and data, usable in both CLI and IDE extensions. Plugins are a mechanism to distribute Skills, Connectors, and MCP tools together. In Codex, they are available in the ChatGPT desktop app and CLI, but not in IDE extensions.

What it does: Allows Codex to access external documents, browsers, design tools, etc.

No matter how smart Astra is, it's meaningless if it can't reach necessary information. It's like a brilliant employee without an internal system account.

However, I've set the priority to Medium. The more MCPs you add, the more tool choices increase and context is consumed. The correct approach is to add only what you are currently struggling to reach.

What it is: The scaffolding for actually moving hands, such as dependencies, setup procedures, test execution methods, and work directory structures.

What it does: Codex can self-drive to the point of "running and verifying." If this is missing, Codex reverts to just being a code writer.

A simple way to check is to ask it from a clean state to "Set up, pass tests, and report results." Wherever it stops is exactly what's missing.

Using Git worktree to separate directories for each task makes it harder for multiple parallel tasks to collide.

Safety and Inspection Layer | Permissions, Sandbox, Hooks

What it is: Two independent settings that determine how much Codex can execute automatically. The sandbox determines the reach of files and networks, while the approval policy determines where to ask for human confirmation.

According to official Codex documentation, initial settings for CLI and IDE extensions are restricted to no network access and writing only within the active workspace (https://developers.openai.com/codex/sandbox ).

The sandbox has 3 levels:

  • read-only: Can read but not write. For consultation and planning.
  • workspace-write: Can write within the work folder and temporary directories. This is the standard.
  • danger-full-access: Can write anywhere. Effectively removes the sandbox.

The commonly used Auto preset is a combination of workspace-write and "ask for approval only when necessary." Codex will stop and check when trying to edit outside the workspace or touch the network.

If you want to switch mid-session, you can use the /permissions command. A realistic operation is read-only for the planning phase and Auto for the execution phase.

What I want you to understand is that autonomy does not equal permitting everything.

Escaping to danger-full-access just because approvals are annoying is the least effective solution. If it just needs to write to a specific directory, just permit that location.

▼ Copy from here

【Codex CLI: Configuration examples for Planning and Working】

Target is Codex CLI 0.134.0 or later.

Settings are saved in three files: "Common," "Planning," and "Working."

Do not paste this entire explanation into one config file. Write only the corresponding settings to each destination.

Destinations are for standard Codex settings.

■ 1. Common Settings

Path: ~/.codex/config.toml

Do not delete existing settings; add or change the following items. If the same [sandbox_workspace_write] exists, edit inside it to avoid duplicate headings.

[sandbox_workspace_write]

network_access = false

Specify additional approved directories only if necessary.

writable_roots = ["/absolute/path/to/approved-directory"]

Only if additional write destinations are needed, remove the # at the start of the writable_roots line and replace the example path with the actual absolute path.

■ 2. Planning Settings

Path: ~/.codex/plan.config.toml

Save these two lines in a separate file from common settings.

approval_policy = "on-request"

sandbox_mode = "read-only"

■ 3. Working Settings

Path: ~/.codex/work.config.toml

Save these two lines in another separate file.

approval_policy = "on-request"

sandbox_mode = "workspace-write"

■ How to use

Do not write the startup command in the config file; run it from the terminal in the project folder.

To start for planning:

codex --profile plan

To start for working:

codex --profile work

The selected profile settings will be layered over the common settings.

Since project-side settings and organizational restrictions also apply, check actual permissions with /permissions after startup.

Note: network_access = false is the communication setting for commands run inside the sandbox. Check permissions for external connections like MCP separately.

▲ Copy to here

Expanding a boundary by one is completely different from discarding the boundary itself. The same applies to network access; it's a valid judgment only for projects that truly need to fetch dependency packages.

What it is: A mechanism to insert your own scripts or MCP tools into the middle of Codex processing. It is enabled by default as a Stable feature.

What it does: For example, these automations:

  • Stop dangerous commands just before executing a tool
  • Inspect for secrets like API keys
  • Run a linter immediately after editing a file
  • Verify tests pass at the end of work

It's about changing "be careful not to make mistakes" to "the system stops if there's a mistake."

However, OpenAI itself warns to treat Hooks as guardrails, not absolute enforcement boundaries, because Codex might execute equivalent work through different tool paths.

Things you truly want to stop should be stopped at the sandbox and permission level, not Hooks. Hooks are the second net layered on top.

Eyes and Team Layer | Browser, Subagents

Having it build a website and ending with "I wrote the code, I'm done" is a waste.

Note: The Computer Use (actual screen operation) described here is currently a feature for the desktop app version of Codex. The built-in Browser / Computer Use handled in this chapter is used in the ChatGPT desktop app. Built-in Browser is not available in Codex CLI or IDE extensions. For browser operations in CLI/IDE, prepare other mechanisms like MCP or Playwright.

You should make it do this:

  • Open the browser
  • Display the actual screen
  • Try operating it
  • Find broken parts
  • Fix them
  • Check again

Astra is a generation that improved significantly in computer operation benchmarks, so this process is worth delegating. The report of time reducing from 75 to 40 minutes in OSWorld 2.0 is exactly about this.

In the Harness Engineering case study, they created an environment where Codex could handle Chrome DevTools Protocol, DOM, screenshots, logs, and metrics to handle everything from bug reproduction to fixing and verification.

What it is: A mechanism where Codex divides work among multiple sub-agents. Each has an independent context.

What it does: Parallelizes read-heavy, independent tasks like research, testing, log analysis, and summarization.

Two cautions:

One is that multiple agents writing the same code simultaneously will collide. Be careful with parallelizing write tasks.

The other is simply that token consumption increases. It gets faster, but not cheaper.

And specific to Astra, the model guidance says delegation frequency might be lower than expected. If you want parallelization, explicitly specify in AGENTS.md or prompts: "You may split research tasks and run them in parallel."

The Astra Era Reversal | Inventory, Not Addition

I've listed 8 elements, but the most important thing I want to convey is the opposite.

The first thing to do for Astra is an inventory of existing instructions. OpenAI also recommends auditing instructions the model references, such as Skills and AGENTS.md. Keep necessary instructions, fill gaps, and fix or reduce old/contradictory ones after verification.

The verb used in OpenAI's guidance is "auditing," not "adding."

Reports from teams that pre-verified Astra point in the same direction. Kilo, an AI coding tool provider, wrote in a review that Astra clearly requires less AGENTS.md scaffolding, and most of the "instructions to keep the model from derailing" built up over the last year are now unnecessary. They even suggested that if you have a bloated agents file, try deleting half of it and trying again (https://blog.kilo.ai/p/gpt-6-astra-what-we-learned-previewing ).

This is one company's impression, not an official view. However, it aligns perfectly with the official guidance stating that "contradictory instructions can cause early stops."

The smarter the model, the more it gets tripped up by old instructions. Paradoxical, but true.

Inventory is fastest when done by Codex itself.

▼ Copy from here

Please read AGENTS.md, everything under docs, and all loaded Skill files in this repository. Do not make changes yet.

Assuming work with GPT-6 Astra, classify and report the following:

【Keep】 Instructions that are still valid and actually improve your judgment. Explain why in one line.

【Deletion Candidates】 Items that fall under any of the following. Quote the original text and provide a reason. This is not a decision to delete, but a list for human consideration.

  • Instructions written to course-correct previous generation models that are now unnecessary.
  • Instructions pointing to specs, paths, or commands that have already changed.
  • Instructions commanding you to do things you naturally do without being told.
  • Instructions that contradict other instructions.

However, if there is even a slight possibility that the instruction was added for safety, security, or due to past accidents/incidents, do not classify it as a 【Deletion Candidate】. Instead, put it in a separate category 【Requires Human Judgment】 and explain why you think that possibility exists. Do not conclude it is "unnecessary" based solely on your own judgment.

【Rewrite】 Instructions where the intent is correct but the phrasing is ambiguous, redundant, or the priority is unclear. Provide a rewrite proposal.

【Questions】 Descriptions you found difficult to judge the meaning of while reading.

Finally, be sure to report the following two points:

  1. If there were instructions that actually blocked you or caused hesitation, provide the exact line and why you hesitated.
  2. If AGENTS.md were to be condensed into an index of about 100 lines, what structure would you use?

▲ Copy to here

The resulting "Deletion Candidate" list shouldn't just be deleted entirely. First, check why that instruction was added, its history, and what it affects if removed. Verification procedures added after past accidents shouldn't be removed just because Codex judges them "unnecessary for its current self." Especially for safety or security instructions, the person who knows the history should make the final call. Only proceed with deletion for items where the reason for addition is confirmed and the impact is judged to be limited. If in doubt, keep the instruction. If moving to docs, leave a clear path so it can be reliably referenced from AGENTS.md when needed.

Maturity | Where are you now?

Check your stage.

Lv.0: Writing prompts every time. Like explaining everything from scratch to a talented employee every morning.

Lv.1: AGENTS.md and docs exist. Like a company having rules and manuals.

Lv.2: Skills exist. Procedures for routine work are decided.

Lv.3: MCP and Plugins are connected. Can access necessary systems independently.

Lv.4: Permissions, Hooks, and Tests are functioning. Auto-execution and auto-inspection exist.

Lv.5: Using Browser and Subagents. Can verify independently and delegate work.

Lv.6: Feedback loop exists. The system itself is updated every time a failure occurs.

Many people are at Lv.1. And they try to move forward by making AGENTS.md thicker. That's not Lv.2; it's just a bloated Lv.1.

Lv.6 is different in nature. It's not about adding new features. It's just about having an operational rule: "If the same mistake is made twice, feed that fix back into AGENTS.md, Skill, Hook, or Test."

This is where OpenAI moved toward "continuous correction rather than one-time verification" in the Harness Engineering article.

Execution Sequence | 30 Minutes, 1 Day, 1 Week

Prioritize. Do these in order.

First 30 Minutes

  1. Run the diagnostic prompt at the beginning of this article.
  2. Check current permission settings with /permissions. If you've been using danger-full-access regularly, switch back to workspace-write first.
  3. Open AGENTS.md and read through it. Check for redundant, contradictory, or outdated descriptions. 100 lines is just one internal OpenAI example, not an absolute standard. Look at whether the content is organized rather than the line count.

1 Day

  1. Run the inventory prompt. Delete 【Deletion Candidates】 only after confirming the reason for addition and impact. For 【Requires Human Judgment】, decide after checking with someone who knows the history.
  2. Move valuable parts of the deleted content to docs.
  3. Add "Instruction Priority" to the end of AGENTS.md.
  4. Ask it from a clean state to "Set up and pass tests," and record where it stops.

1 Week

  1. Choose one task you do more than twice a week and turn it into a Skill.
  2. If there's one external data source you're always struggling to reach, connect it via MCP.
  3. Make either a secret info check or a post-edit linter execution into a Hook.
  4. Decide on one place to record failures for feedback.

By this point, you'll reach the entrance of Lv.4 from Lv.1.

Reverse Index | By Goal

Want to stop repeating the same explanation → AGENTS.md

Codex references old information → Inventory of docs / Context

Quality of the same task fluctuates → Skills

Can't reach necessary data → MCP / Plugins

Can write code but can't proceed to verification → Environment

Scared of it acting on its own, or too many approvals → Permissions / Sandbox

Same mistake repeated → Hooks / Tests

Don't notice layout breaks → Browser / Computer Use

Research takes too long → Subagents

Started stopping mid-task after switching to Astra → First check stop notifications, approval requests, and errors. If necessary, check settings and usage with /status in the CLI. If contradictory instructions are suspected, inventory AGENTS.md and Skills.

The Next Competition is Environment, Not Brains

The game of choosing models is mostly over.

Astra is smart enough and moves exactly as instructed. That's why what you leave as instructions determines the result.

From the game of writing prompts well to the game of designing work environments well. Astra is the model that finalized that transition.

You only need to do one thing today. Open AGENTS.md and read through it. That is the starting point.

Thank you for reading this far.

I share specific examples of time-saving and AI side hustles using ChatGPT, Claude, and Copilot in a free open chat. If you want to be on the side that "can use AI," join now.

👉 https://x.gd/yVPeS

Remix in YouMind

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles