> ## Documentation Index
> Fetch the complete documentation index at: https://aivision.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Read the relevant procedure and prerequisites before suggesting commands. Cite the section and give an observable check. Treat sample data as illustrative. Report product actions and results only when verified in the user's environment.

# Your first diagnosis: find and verify an issue

> Run a saved rule on a Trace with a test failure, check the source step, and save a human review.

Did the test command fail? Use this exercise to check. Run the built-in **Tool Execution Results** diagnoser on a native Trace, check the original tool output, and save your review. The rule runs without a judge model.

If you have yet to connect an Agent, [try the walkthrough](https://aivision.mintlify.site/en/try-sample.md) and inspect a failed MCP call in a demo Trace.

## Before you start: account, Agent, and sample

* You have [connected Codex and found a real Trace](https://aivision.mintlify.site/en/web-quickstart.md), and the selected Agent is bound to your current account.
* You have diagnosis execution permission in the current space. In a team space, administrators or developers normally run checks. See [members and permissions](https://aivision.mintlify.site/en/guides/members.md).
* Use a Trace from the SigNoz data source. If the Trace page shows both **SigNoz / Langfuse**, select **SigNoz**. With only one source, the switch is hidden; see [identify the Trace source](https://aivision.mintlify.site/en/guides/traces.md). If your record is only available through an external Langfuse source, follow the [integration guide](https://aivision.mintlify.site/en/integrations/agents.md) to add a suitable pipeline first.

## 1. Prepare a Trace with a verifiable test failure

If you already have a Codex Trace with an explicit tool failure, a readable failure status, and original output, record its ID and continue to step 2.

> [accordion] No suitable sample yet? Copy this isolated exercise
>
> This exercise needs Python 3 and Codex connected to AI Vision. Use a terminal to set up a temporary directory, then ask your connected Codex to run the test there. You can also use an existing Trace from a project with a verifiable test failure.
>
> Run the preparation commands below in your terminal. They create two exercise files in a new temporary directory without changing your application project:
>
> ```bash theme={null}
> practice_dir=$(mktemp -d "${TMPDIR:-/tmp}/aivision-diagnosis.XXXXXX")
> cat > "$practice_dir/config.py" <<'PYTHON'
> def validate(config):
>     return config.get("timeout")
> PYTHON
> cat > "$practice_dir/test_config.py" <<'PYTHON'
> import unittest
> from config import validate
>
>
> class ConfigValidationTests(unittest.TestCase):
>     def test_timeout_required(self):
>         with self.assertRaisesRegex(ValueError, "timeout is required"):
>             validate({})
>
>     def test_valid_timeout(self):
>         self.assertEqual(validate({"timeout": 5}), 5)
> PYTHON
> cd "$practice_dir"
> pwd
> ```
>
> Ask **Codex connected to AI Vision** to open the printed directory. It contains no application data. This exercise needs Full mode to preserve original commands and output. A first installation defaults to Full; reinstalling preserves the existing mode. If you previously configured Privacy, follow the [collection-mode instructions](https://aivision.mintlify.site/en/guides/privacy.md): add `--collection-mode full` to the complete connection command generated by the web page for the current space, run it, restart Codex, and start a completely new session. The web page has no mode switch. Switching modes cannot restore content already filtered out of old records.
>
> Send this task:
>
> ```text theme={null}
> This is a local diagnosis exercise that intentionally triggers a test failure.
> In the current exercise directory, use the terminal tool to run this command on its own once:
> python3 -m unittest test_config -v
> Do not change code or retry this turn. Do not use wrappers such as || true that ignore failures.
> Preserve the actual tool status and original output. Include the exit code if the tool provides it. Explain which test failed and what it expected, then end this turn.
> ```
>
> **Expected result:** `test_timeout_required` fails, `test_valid_timeout` passes, and the output contains `AssertionError: ValueError not raised` and `FAILED (failures=1)`. The actual command exits with code `1`, but the collected Trace may not include a numeric exit-code field. The failure comes from the defect deliberately left in the exercise. Confirm it before continuing.
>
> Running the preparation commands manually in a terminal does not create this Codex tool Trace. Wait for Codex to finish the turn, then find it in the platform. After the exercise, you can delete the temporary directory you created. Verify its path first and keep any exercise records you need.

In **Agent Traces**, open your record and find the actual command, failure status, and assertion in the tool step. Look for `FAIL` for `test_timeout_required`, `ValueError not raised`, and `FAILED (failures=1)`. Tool names can vary by Agent version, so match the command and the output.

## 2. Run Tool Execution Results from the Trace

**1. Confirm the diagnosis scope**

In the Trace detail, select **Run diagnosis** and keep **Saved diagnosers** selected. The detail view checks only the open Trace. If you start from **Agent Traces** with several rows selected, confirm the Trace ID in the dialog. This exercise needs one Trace.

**2. Select the saved diagnoser**

Choose **Tool Execution Results** and expand **Check details** to make sure the rule applies to the current Agent. Select **Run diagnosis**. AI Vision saves the configuration and results for this run. If the rule is unavailable, check the Agent, rule, and permissions in [Use existing diagnosers](https://aivision.mintlify.site/en/guides/use-diagnosers.md).

**3. Wait for the result**

Set **Filter records → All records** and verify the Trace ID. If it shows a **Finding**, read the reason. Right-click **View quality results** to keep this batch open in a new tab. Use **Refresh records** if read-back is incomplete. If you are unsure that the run was submitted, use **Recover this request** to check its status.

[![View quality results at the bottom right is marked 1. View source step on the failed record to the left is marked 2.](https://mintcdn.com/aivision/qGp0V6y6p5Gih57B/assets/walkthrough/zh-CN/diagnosis-result-actions.webp?fit=max\&auto=format\&n=qGp0V6y6p5Gih57B\&q=85\&s=8042c722b324a8baf1ac8425ee89a05b)](https://aivision.mintlify.site/assets/walkthrough/zh-CN/diagnosis-result-actions.webp)

① Keep the quality results open in a new tab. ② Return to the run dialog and open the failed call from the result. Built-in demo, Chinese interface. Select to enlarge.

## 3. Open the source step and check the finding

Select **View source step** in the run results. The dialog closes and the relevant tool call opens. If the result does not point to a specific Span, select **View original Trace**, then search by the Trace ID and test command. You can also see this workflow in [the sample rule exercise](https://aivision.mintlify.site/en/try-sample.md#sample-rule-diagnosis).

1. **Input.** Find the step that ran `python3 -m unittest test_config -v` or the actual command you used.
2. **Status and output.** Verify the failure status and original error. Check the exit code if it was recorded. The status and original output are sufficient for this exercise.
3. **Recovery.** Check later calls to see whether a retry succeeded. The Trace retains the earlier failure.

> [!TIP]
>
> **Tool Execution Results** is a runtime `signal`. Its `good` or `bad` verdict reflects what the rule found about tool calls. To assess task quality, compare what the Agent promised with what it actually delivered.

## 4. Submit your review and verify it was saved

Open **BadCase List** in the quality-results tab you kept open. Find the **Tool Execution Results** record by Trace ID. You can also use **View diagnosis details** on the same record in the run dialog. Check the diagnoser name and original evidence, choose **Confirm as Valid**, write your reason, and select **Submit Feedback**. For example:

```text theme={null}
I checked the tool status and original output. test_timeout_required was FAIL,
and the output contains ValueError not raised and FAILED (failures=1).
```

Open the same record again and confirm that **Confirmed** and your note appear at the bottom. Use **Mark as False Positive** if the evidence conflicts with the finding or **Cannot Judge** if evidence is missing. For team batches and other findings, see [Quality results and BadCases](https://aivision.mintlify.site/en/guides/quality.md).

## Next: fix and retest, then expand the checks

> [card] [Validate the fix with a new Trace](https://aivision.mintlify.site/en/guides/continuous-diagnosis.md#2-verify-an-application-fix-with-a-new-trace)
>
> Run the same test again and compare the original tool output and the two diagnosis batches.

> [card] [Set up a team diagnosis task](https://aivision.mintlify.site/en/guides/diagnosis-tasks.md)
>
> Verify a small sample before deciding on the scope and schedule.

## Optional: check one text requirement

To check an answer's language or another text requirement, choose an applicable check from **Run diagnosis → Specialist tests**, or [configure a custom LLM diagnoser](https://aivision.mintlify.site/en/guides/diagnosers.md#configure-a-custom-llm-diagnoser). Semantic checks need a usable [judge model connection](https://aivision.mintlify.site/en/guides/model-connections.md) in the current space. Provider charges may apply.

For a first run, use a new Trace with a clear request and final answer. For example, ask the Agent to reply with exactly one line: “Check the evidence before judging.” Read the actual answer, then use the configured diagnoser on that same Trace. Compare the judgment and cited evidence with the original answer. A specialist trial displays results in its form. To find the result on the Quality Board, run the saved specialist configuration from **Saved diagnosers**. The available checks depend on Agent type and captured evidence. See [Try one explicit requirement](https://aivision.mintlify.site/en/guides/use-diagnosers.md#2-try-one-explicit-requirement-independently).

## If you get stuck

| Symptom | Next check |
| - | - |
| No run action or a 403 response | Confirm the SigNoz source, execution permission, and your Agent binding. |
| The diagnoser is missing | Use **Manage checks** to check whether it is enabled and applies to the desired Agent, and whether it needs a model. Use **Refresh diagnosers** after checking its configuration. |
| Expected a failure but found no issue | Verify the Trace ID, failure status, and original output. Check whether you opened a different turn or only inspected the retry. |
| All checks show no judgment | Check which fields are missing. If Privacy filtered the evidence or collection omitted it, capture a new record with the needed material. |
| Execution finished and records are still loading | Wait for read-back and use **Refresh records** if needed. |

See [Quality results and BadCases](https://aivision.mintlify.site/en/guides/quality.md) for counts and scores.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.