Skip to content

fix(agent): make Simple Agent P0 conformant - #5117

Merged
giuliolovisotto merged 2 commits into
mainfrom
glovisotto/simple-agent-conformance
Oct 28, 2026
Merged

giuliolovisotto merged 2 commits into
mainfrom
glovisotto/simple-agent-conformance

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Simple Agent dropped tool observations when closing an agent session and let model HTTP errors escape without a structured agent outcome. It also could not recover from the transient failures exercised by the P0 conformance suite.

Retain tool observations at session close, correlate every model attempt with its invocation, and retry transient model HTTP errors twice by default. Exhausted session calls return the cause and partial work for the Environment Server to handle. Retries reuse the current request without replaying completed tools, and remain inside the existing checkpoint-aware policy boundary.

Register Simple Agent in the existing probe and CI matrix, using a direct HTTP shell fixture and the same seven P0 scenarios and expectations. A separate public issue is unnecessary for this focused repair of existing conformance behavior.

Validation

  • .venv/bin/python -m pytest responses_api_models/vllm_model/tests responses_api_agents/simple_agent/tests/test_app.py -q --tb=short — 959 passed, including provider cancellation recovery, retry exhaustion, and retries disabled.
  • .venv/bin/python -m pytest responses_api_agents/simple_agent/tests/test_app.py scripts/harness_conformance/tests tests/unit_tests/harness_capabilities tests/unit_tests/test_harness_conformance_ci.py -q --tb=short — 505 passed, 2 skipped.
  • .venv/bin/python -m pytest tests/unit_tests/test_checkpoint_agent.py -q --tb=short — 41 passed.
  • .venv/bin/python scripts/run_harness_conformance.py --harness simple --output ../simple-final — all seven scenarios fulfilled P0 requirements; exit 0.
  • .venv/bin/pre-commit run --all-files — passed.
  • .venv/bin/python tests/unit_tests/test_fern_docs_links.py — 29 passed.
  • cd fern && npm run check — zero errors; redirect checking skipped because Fern authentication was unavailable.

CI on 984f47727 passes all eight server shards, session-routing integration tests, core tests and the 95% coverage gate (95.47%). Core tests: 12,025 passed, 99 skipped; sandbox tests: 1,045 passed, 6 skipped. CI run.

Simple Agent passes all seven P0 scenarios on this head (probe job). The remaining red checks are the non-blocking Kilo Code conformance result and its summaries. Its terminal-model-error failure also occurs on the base main run and is addressed separately by #5088.

Rollouts

One live GPT-4.1-mini rollout through the standard Environment Server collector calculated 17 × 23, wrote and read back 391, and returned the requested final answer. Inspected the model/tool conversation, executor observations, capture, and verifier: reward 1.0, two model calls, two tool calls, 293 total tokens, and no failure sidecar rows.

The controlled suite separately verified tool success/failure, omitted usage, HTTP 429/500 recovery, terminal model errors, and verifier failure. Regression tests cover retry exhaustion after successful tool work and preserve unknown token usage.

Compatibility and benchmark impact

Simple Agent now retries HTTP 408/425/429/5xx twice, with exponential backoff starting at 0.5 seconds and capped at 8 seconds. max_model_retries: 0 disables the additional attempts. This can recover episodes that previously failed and increases latency when transient errors persist. Terminal errors in the legacy interface still propagate after the configured attempts; agent sessions return structured failures. No benchmark accuracy claim or change to the existing conformance gate policy is made.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Tests added or updated and pass locally.
  • Documentation added or updated.
  • Pre-commit checks pass locally.
  • New source file headers: N/A; no source files added.
  • The commit has DCO sign-off and an SSH signature.

Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
@giuliolovisotto giuliolovisotto added bug Something isn't working area:agent Agent harnesses and Responses API agent behavior needs-review PR is ready for code review and waiting on a reviewer labels Oct 27, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 27, 2026 13:08
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP — LGTM — no concerns found.

Reviewed all nine changed files and traced the Simple Agent retry, failure, and session paths through checkpoint handling, observation joins, and Environment Server outcome policy. Also checked the conformance integration, CI registration, regression tests, and documentation.

Static review only; I did not execute tests or independently reproduce the reported rollouts.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40655888803

Merged via the queue into main with commit 6190dee Oct 28, 2026
83 of 88 checks passed
@giuliolovisotto
giuliolovisotto deleted the glovisotto/simple-agent-conformance branch October 28, 2026 08:50
weijiac0619 added a commit that referenced this pull request Oct 29, 2026
Bring in #4952 as merged on main, plus the main changes since this
branch's snapshot. Conflict resolutions:

- scripts/add_legacy_agent_environment_servers.py: main's #4952 version
  with this branch's session-less fallback (00788d9) applied.
- tests/unit_tests/test_add_legacy_agent_environment_servers.py and
  fern/.../troubleshooting/configuration.mdx: main's #4952 version.
- responses_api_agents/simple_agent/app.py and its tests: main's version.
  #5117 already reports simple_agent session tool calls as observations,
  which supersedes the app.py change in 7c401e6; that commit's
  single_agent_turn end-to-end test merges unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: weijia chen <weijiac@nvidia.com>

This branch was previously deployed

1 inactive deployment
public — 984f4772 Deployed Oct 27, 2026 by copy-pr-bot[bot] via release / finalize / notify #7615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants