Runtime behavior probe

From openai/openai-agents-python · View interactive version

Runtime behavior probe is an AI agent skill from the GitHub repository openai/openai-agents-python. Plan controlled runtime probes when explicitly invoked; execute only after the required probe approval.

How to use this skill

Skill file

Runtime Behavior Probe

Overview

Use this skill to investigate real runtime behavior, not to restate code or documentation. Start by planning the investigation, then execute a case matrix, record observed behavior, and report both the findings and the method used to obtain them.

Core Rules

Workflow

  1. Restate the investigation target in operational terms. Name the runtime surface, the key uncertainty, and the highest-risk behaviors to test.
  2. Do a short preflight. Check the relevant code or docs first, decide whether the question needs local or live validation, and note any repo, baseline, or release boundary that matters.
  3. Define the decision signal before building the matrix. For a suspected defect, name the exact user-visible symptom, the command or probe that can distinguish it from correct behavior, the expected failing observation, and a known-good control. Confirm that the signal exercises the real producer and caller path rather than only an adjacent helper. Prefer a fast, deterministic local loop when one can answer the question. If no credible signal can be built, state the missing access or artifact and do not substitute a nearby behavior as proof.
  4. Create a validation matrix before executing probes. Cover both baseline behavior and the most relevant failure or drift cases. The matrix can live in a scratch note, a temporary file, or a structured header inside the probe script.
  5. For each case, choose an execution mode up front:

Use these defaults unless the task clearly needs something else:

If it is genuinely unclear whether extra runs are worth the time or cost, ask the user before expanding the probe.

  1. When the question is benchmark-like or comparative, run in phases. Start with a high-signal pilot matrix against a control, then expand only the surviving candidates or unresolved cases.
  2. If the question is about a suspected regression or behavior change, add at least one known-good control case such as origin/main, the latest release, or the same request without the suspected option.
  3. For comparative probes, define parity before execution. Record prompt or input shape, tool-choice setup, model-settings parity, state reuse rules, and any response-shape constraint that keeps the comparison fair. If materially different output length could bias the result, record usage or token notes too.
  4. If the question asks whether one option has the same intelligence or quality as another, decide whether the matrix supports only example-pattern parity or a broader quality claim. For broader claims, add at least one harder or more open-ended case. Otherwise say explicitly that the result is limited to the covered patterns.
  5. Plan state controls before execution when hidden state could affect the result. Record whether each case uses fresh or reused state, how cache reuse or cache busting is handled, what unique IDs isolate repeated runs, and how cleanup is verified.
  6. If any live case will read environment variables, list the exact variable names and purpose for each case, then ask the user for approval before execution. Prefer request_user_input for this gate when it is available, with no auto-resolution and choices that grant or deny only this specific probe. Keep the approval ask short and include destination, read-only versus mutating or costly risk, exact variable names, and cleanup or rollback if relevant.
  7. Build task-specific probe scripts in a temporary location. Keep the script small, observable, and easy to discard.
  8. In openai-agents-python, make the runtime context explicit:
  1. Present the complete probe proposal with the disclosures required above, including the exact command for each case or approved matrix, then ask the user for explicit approval and wait.
  2. Execute only the approved matrix and capture evidence. Record request shape, setup, observation summary, unexpected or negative result, error details, timing, runtime context, approved environment-variable names, repeat counts, warm-up handling, variance when relevant, cleanup behavior, and for comparisons note what was held constant plus any response-shape or usage notes that affect interpretation.
  3. Update the matrix with actual outcomes, not guesses.
  4. Keep temporary artifacts until the final response is drafted. Then delete them unless the user asked to keep them or they are needed for follow-up. Benchmark and repeat-heavy probes often need follow-up, so keeping artifacts is normal when the result may be revisited. If deleted, retain and report a short run summary.
  5. Report findings first, with unexpected or negative findings first. Then summarize how the validation was performed and which cases were covered.
  6. If the probe isolates one clear defect, you may include a short implementation hypothesis or minimal repro direction. Do not expand into a larger next-step plan unless the user asked for it.

Validation Matrix

Use a matrix that makes the news easy to scan. Start from the runtime question and the observation summary, not just from expected and pass or fail.

Use a matrix with at least these columns:

Add these columns when they materially improve the investigation:

Treat result_flag as a fast scan field such as unexpected, negative, expected, or blocked. Use status only when there is a credible comparison basis, baseline, or documented contract to compare against.

Always consider whether the matrix should include these categories:

Open validation-matrix.md when you need a stronger prioritization model or a reusable case template.

Temporary Probe Scripts

Write one-off scripts in a temporary file or temporary directory such as one created by mktemp -d or Python tempfile. Keep the script outside the repository by default, even when it imports code from the repository.

If the probe needs repository code:

Design the probe to maximize observability:

Before deleting the temporary script or directory, keep a short run summary of the script path, command used, runtime context, and whether the evidence was kept or deleted.

Open python_probe.py when you want a lightweight disposable Python probe scaffold.

Reporting

Report in this order:

  1. Findings. Put unexpected or negative findings first. If there was no real news, say that explicitly.
  2. Validation approach. Summarize the code used, the runtime surface exercised, the execution modes, and the case matrix coverage.
  3. Case results. Include the matrix or a condensed version of it when the case count is large.
  4. Artifact status and brief run summary. State whether temporary artifacts were deleted or kept, and provide kept paths or the retained summary.
  5. Optional implementation note. Include this only when one clear defect was isolated and a short implementation direction would help.

For comparative probes, the report should also say what was held constant, what variable was under test, and whether the result supports only pattern parity or a broader quality claim.

Open reporting-format.md for the recommended response template.

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.