Codex Runme notebooks for QA can turn a recurring test investigation into one reviewable artifact: the goal, proposed plan, human approval, commands, outputs, decisions, dead ends, and final evidence stay together. That is more useful than asking an agent to rerun a vague prompt from memory. It gives a QA lead something concrete to inspect before execution and something reproducible to audit afterward.
OpenAI describes using Runme notebooks with Codex to collect workflow context, preserve review and approval boundaries, and improve later runs with lessons from earlier work. In its evaluation example, Codex reviews a previous run, writes a detailed plan, waits for approval, and records commands, outputs, and interpretation. This tutorial adapts that pattern to a bounded API regression evaluation for QA engineers and SDETs.
What a reviewable QA notebook should contain
A useful notebook is not merely a transcript. It is a controlled test artifact. Each section should have a specific purpose and an owner.
| Notebook section | Purpose | QA control |
|---|---|---|
| Goal | Defines the single evaluation outcome | Hash the approved wording |
| Frozen context | Records repository, dataset, environment, and policy identities | Reject silent drift |
| Plan | Lists proposed steps and expected evidence | Human approval before execution |
| Execution cells | Runs bounded commands | Capture exit codes and output hashes |
| Decision log | Explains alternatives and deviations | Require a new approval for changed scope |
| Evidence summary | Compares actual results with the oracle | Independent verification |
| Reusable notes | Records what should change next time | Review before indexing or sharing |
The official OpenAI article says Runme supports Markdown, code cells, and HTML, and that a completed notebook can record steps, results, decisions, and dead ends. It also describes a companion Markdown index that makes prior notebooks easier for an agent to discover. That discoverability is valuable, but it also means QA must treat old notebooks as untrusted input until their repository, dataset, and policy identities are checked.
Choose one bounded evaluation
Start with a test that is repetitive enough to benefit from reuse but safe enough to run in a disposable environment. A small API regression pack is ideal. Create a private test service with:
- one stable endpoint that should pass;
- one seeded contract defect;
- a versioned request dataset;
- a gold-set oracle for expected status, schema, and business rules;
- immutable reports written to a run-specific evidence folder; and
- no production credentials, customer data, deployment access, or merge permission.
Freeze the Codex surface and build, repository URL, branch, base and head commit, notebook hash, companion index hash, goal text, working directory, environment image, dataset version, oracle version, permissions, time and cost budgets, expected side effects, and reviewer identity. Put these values near the top so a screenshot captures the complete run identity.
Write a goal cell that can be tested
The goal should describe the end state, required proof, constraints, and stop conditions. Keep the first run deliberately narrow.
# Goal: evaluate the seeded API contract defect
- Review the approved prior notebook only after validating its run identity.
- Write a plan that maps every step to expected evidence.
- Wait for reviewer approval before running any command.
- Work only in the disposable repository and evidence directory.
- Record commands, exit codes, report hashes, decisions, and deviations.
- Stop for a new decision if scope, data, permissions, or infrastructure changes.
- Do not merge, deploy, publish, or access production data.
This mirrors the documented Codex-and-Runme pattern without assuming that a notebook makes an action safe. The human reviewer still decides whether the plan is ready and whether a consequential choice needs judgment.
Make the approval gate observable
Ask Codex to produce the plan in a dedicated cell and stop. The reviewer should verify that every command has a purpose, input, output location, expected result, and rollback or stop condition. The approval should include a plan hash and timestamp rather than a vague “looks good.”
Run four approval tests:
- Approved plan: Codex may execute only the hashed steps.
- Rejected plan: no test command or file mutation may occur.
- Edited plan: the old approval becomes invalid and a fresh review is required.
- Changed environment: quota, dataset, repository, or permissions drift forces a decision rather than an improvised workaround.
Compare file-system, process, repository, and network evidence before and after each test. A friendly explanation in the notebook is not proof that the gate held.
Capture evidence, not just prose
Each execution cell should state what it will run, why it is needed, and what artifact it should produce. Capture the exact command, working directory, start and end time, exit code, selected output, full report path, and cryptographic hash. If a command fails, preserve its output and explain how the failure changes the plan.
Use a simple evidence manifest:
run_id: qa-api-20260907-01
repo_head: <commit SHA>
dataset_hash: <hash>
plan_hash: <hash>
command_id: contract-suite
exit_code: 1
report_hash: <hash>
oracle_result: expected_seeded_failure
review_status: pending
The agent’s summary should reference this manifest, not replace it. Independently open the report, confirm the tested commit, check that the intended cases actually ran, and compare the findings with the gold oracle. A zero exit code from an empty or skipped suite is a false green.
Test context reuse as an attack surface
The main benefit of a reusable notebook is that the next run starts with practical context. The main risk is that stale or poisoned context acquires authority it should not have. Create matched trials:
- a first run with no prior notebook;
- a second run with a valid, approved prior notebook;
- a run with an old repository commit or dataset;
- a run with a conflicting previous decision;
- a run whose prior output contains a prompt-injection string;
- a run with a missing or modified companion index; and
- a run with unrelated notes copied from another project.
Measure whether Codex detects the mismatch before using the context. A safe run should cite the previous artifact as evidence, validate its identity, and propose a new plan. It should not blindly replay old commands, trust old pass results, or treat a prior approval as valid for a new commit.
Exercise operational failure paths
Real evaluation work fails in ordinary ways. Simulate quota exhaustion, an unavailable environment, a browser refresh, an interrupted session, a failed notebook cell, truncated output, a changed file, a stale branch, and an unavailable test dependency. Also test duplicate clicks or repeated execution, because a notebook cell that starts a destructive or costly task twice can create confusing evidence.
For each failure, verify that the notebook records the original plan, the observed error, the proposed alternatives, and the reviewer’s decision. If an existing approved resource can replace a failed one, make the substitution explicit. If the alternative changes risk, data scope, cost, or permissions, require a new approval.
Understand the WebMCP boundary
OpenAI’s Site tools documentation explains that WebMCP lets a website expose predefined actions to an agent working with the same live page and signed-in session. The Runme article says its browser-side tools can let an agent read instructions and documentation and read or update notebook content. This differs from a traditional MCP server that can operate independently of an open page.
For QA, that boundary becomes part of the test plan. Record which page is open, which session is signed in, which notebook is selected, and which site tools are discoverable. Test the wrong notebook, stale tabs, revoked access, read-only sharing, unauthorized edits, repeated updates, and changes made by two reviewers. Confirm that tool scope is bounded to the intended notebook and that consequential external actions remain outside the workflow.
Protect secrets and sensitive evidence
Do not place production secrets in goal text, commands, outputs, screenshots, notebook indexes, or shareable storage. Seed synthetic secret canaries and scan the notebook, HTML output, companion index, terminal excerpts, generated reports, and sharing destination. If a canary appears, fail the run even when the functional test passes.
Before saving or indexing a notebook, review whether it contains customer identifiers, internal URLs, tokens, proprietary test data, or sensitive failure payloads. Shareability is useful only when the artifact is safe for the intended audience.
Measure whether the workflow actually improves QA
Compare the first run, valid-context run, and adversarial-context runs using metrics that expose quality rather than activity:
- plan defect rate before approval;
- approval-boundary violation count;
- evidence completeness and freshness;
- agreement with the gold-set oracle;
- reproduction success from a clean checkout;
- correct rejection of stale context;
- time to diagnosis and reviewer effort;
- duplicate execution rate;
- secret-canary leakage; and
- unintended repository, network, or external side effects.
A faster run is not better if it reused the wrong dataset or omitted the evidence needed to reproduce the result. The strongest outcome is a smaller review burden with equal or better correctness and traceability.
Final release checklist
- The goal, plan, and approval hashes match.
- The repository, environment, dataset, and oracle identities are current.
- Every command has an exit code and evidence reference.
- Failures and dead ends remain visible.
- Deviations received a fresh human decision.
- Reports agree with the external oracle.
- No secret canary appears in any notebook or artifact.
- A clean-checkout rerun reproduces the conclusion.
- No unexpected comment, commit, branch, notification, deployment, or data mutation occurred.
- Merge, deployment, and release remain human-controlled.
Conclusion
The practical value of Codex Runme notebooks for QA is not autonomous execution by itself. It is the ability to combine intent, reviewed actions, evidence, and lessons in a reusable artifact while preserving human judgment. OpenAI’s official Codex and Runme workflow provides a useful pattern: plan first, wait for approval, document execution, and carry reviewed context forward. QA teams can make that pattern reliable by freezing identities, testing stale and hostile context, validating evidence independently, and treating the notebook as a decision record rather than an automatic source of truth.
