Skip to content

fix(pi): report session errors and retain ownership - #4739

Merged
giuliolovisotto merged 14 commits into
glovisotto/env-reported-agent-failurefrom
glovisotto/pi-session-conformance
Oct 22, 2026
Merged

giuliolovisotto merged 14 commits into
glovisotto/env-reported-agent-failurefrom
glovisotto/pi-session-conformance

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up on 17499e2 (2026-10-22)

Rebased with the shared policy changes; Pi implementation is unchanged in this follow-up. Earlier in this rebase, its full adapter suite passed 300 tests with 40 skipped. Scoped pre-commit on the final combined stack passed.

Rebase validation before the label/formatter follow-up: the combined tip e5240e16e passed 28/28 Linux conformance scenarios, seven per harness. The policy-only head a928f859e passed 4/7 Hermes scenarios; the dependent stack fixes its evidence gaps. Both returned seven Hermes rollout records with no episode-failure rows; these scenarios do not establish exhausted-provider retry counts. These results are pinned to those revisions, not a claim of fresh CI or a new live-model run on the latest heads.

Retain failed provider responses, partial output and token usage in agent sessions, with native causes classified for the shared Environment Server policy. Preserve ownership for interrupted activations and reject a final agent_end with willRetry=true as unfinished execution rather than a completed provider-error report.

Stack: #4834 (policy) → #4742 (Hermes) → #4739 (Pi) → #4741 (OpenCode) → #4740 (Codex), registered as GitHub stack #4899. These changes must land together. Do not merge #4834 alone: the Hermes and Codex classifier fixes are in #4742 and #4740.

Scope: agent-session execution only; legacy paths are not part of this follow-up. No conformance expectations or shared policy defaults are changed.

Validation (2026-10-21)

  • Full Pi adapter suite: 299 passed, 40 skipped on macOS; scoped pre-commit passed.
  • Fresh Linux conformance on combined stack tip d0b6b950a34bfbc63dfbfdf23c4abbf6d2e1bf34: 28/28, including Pi 7/7; this is combined-stack evidence, not an isolated-base claim.
  • One fresh live-model task passed with reward 1, unmasked completed verification, model-call/tool evidence and no failure sidecar. The route was GPT-4.1-mini. Linux local subprocess sandbox exercised; remote providers and Slurm were not exercised.
  • Portable live-smoke script and commands; no author-local paths are needed to reproduce it.
  • Historical CI for the previous head; inspect its actual outcomes rather than treating local validation as CI success.
python -m pytest responses_api_agents/pi_agent/tests --import-mode=importlib -q -o addopts='' -o log_cli=false
python scripts/run_harness_conformance.py --harness pi --timeout 300 --output /tmp/fresh-pi-conformance

Fresh CI on combined stack tip d0b6b950a: this harness passed 7/7 (download its report/tests/logs); all four stack harnesses passed, while the separate Kilocode model_error failure keeps the non-blocking aggregate red (full CI summary).

@giuliolovisotto giuliolovisotto added bug Something isn't working area:agent Agent harnesses and Responses API agent behavior labels Oct 19, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@giuliolovisotto
giuliolovisotto marked this pull request as ready for review October 19, 2026 14:18
@giuliolovisotto giuliolovisotto added the needs-review PR is ready for code review and waiting on a reviewer label Oct 19, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 19, 2026 14:18
@giuliolovisotto
giuliolovisotto marked this pull request as draft October 19, 2026 14:20
@giuliolovisotto giuliolovisotto removed the needs-review PR is ready for code review and waiting on a reviewer label Oct 19, 2026
@giuliolovisotto
giuliolovisotto marked this pull request as ready for review October 19, 2026 14:53
@giuliolovisotto giuliolovisotto added the needs-review PR is ready for code review and waiting on a reviewer label Oct 19, 2026
@yaoyu-33 yaoyu-33 added the complexity:low Localized change in one scope with a small, straightforward review surface label Oct 19, 2026
@giuliolovisotto giuliolovisotto changed the title fix(pi): restore agent-session conformance evidence fix(pi): report session errors and retain ownership Oct 20, 2026
@giuliolovisotto
giuliolovisotto changed the base branch from main to glovisotto/conformance-terminal-errors October 20, 2026 09:58
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/pi-session-conformance branch from bc5c530 to b042521 Compare October 20, 2026 09:58
@giuliolovisotto

Copy link
Copy Markdown
Contributor Author

Follow-up to the review: 05758df rejects a final willRetry=true report as unfinished execution with a regression test, while legacy-path changes are explicitly out of scope; portable reproduction and current-head CI are linked.

lafrancef
lafrancef previously approved these changes Oct 22, 2026

@mlazuka mlazuka 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.

ok

@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/39782171301

This branch was previously deployed

1 inactive deployment
public — 9c106683 Deployed Oct 22, 2026 by copy-pr-bot[bot] via release / finalize / notify #6601
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 complexity:low Localized change in one scope with a small, straightforward review surface 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.

5 participants