Skip to content

Record native capture diagnostics for missing OpenCode steps - #5237

Merged
lafrancef merged 1 commit into
mainfrom
flafrance/opencode-native-step-diagnostics
Oct 29, 2026
Merged

lafrancef merged 1 commit into
mainfrom
flafrance/opencode-native-step-diagnostics

Conversation

@lafrancef

Copy link
Copy Markdown
Contributor

OpenCode can close an activation after a successful model response without enough persisted provider-step evidence to link that response to a native turn. Retain bounded message/part IDs, types and timestamps alongside the existing turns_unavailable gap, plus capture timing and the cleanup receipt, so the close artifact can identify the missing persistence boundary.

The diagnostics omit message content, reasoning, tool arguments and output. Existing turn projection and gap reporting are preserved. This adds evidence for investigating missing steps; it does not establish or fix their underlying cause.

Stacked on #5198. A fresh representative SWE-Together rollout reached a natural timeout with one persisted assistant message and zero parts. The structural diagnostics and confirmed timeout cleanup receipt survived unchanged into the final result. The rollout completed with a valid incorrect verdict; the canonical checker retained steps.gap as a failure. This confirms diagnostic delivery, not missing-step recovery.

@copy-pr-bot

copy-pr-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@lafrancef

Copy link
Copy Markdown
Contributor Author

/review

@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 WITH CARE — one RISK in continuation-close timing diagnostics.

Inspected all four changed files and affected parsing, cleanup, activation retention, model-call association, and canonical trajectory paths. The diagnostics preserve the missing-step gap rather than fabricating turns. One delegated advisory was unavailable; its structural-diagnostics topic was independently inspected. Static review only; tests were not executed.

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

@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work labels Oct 29, 2026
Base automatically changed from flafrance/opencode-tool-outcomes to main October 29, 2026 04:50
@lafrancef
lafrancef force-pushed the flafrance/opencode-native-step-diagnostics branch from 3c3ccc6 to 606c790 Compare October 29, 2026 12:51
@lafrancef

Copy link
Copy Markdown
Contributor Author

The diagnostics-only change is now rebased onto main after its prerequisite was squash-merged, with the missing sign-off added. Head: 606c790. The diagnostic production files are unchanged.

Scope decision: retain the current diagnostics and accept the close timing limitation noted in discussion_r4407403610. A null close_requested_at is not evidence that no explicit close occurred; cancellation can capture the receipt before the adapter records that timestamp. This PR does not establish causal close ordering or recover missing native steps. Missing-step and attempt-accounting gaps remain visible and their remediation is deferred. No shared close hook is requested.

/review

@lafrancef

Copy link
Copy Markdown
Contributor Author

/review

@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 WITH CARE — the previously reported RISK in continuation-close timing diagnostics remains.

Follow-up review verified the prior finding and its directly affected cleanup, receipt-retention, parsing, and trajectory-projection paths. The author's deliberate acceptance is noted, but no timing correction is present. The final-activation regression preserves the distinction between persisted provider steps and an explicit missing-step gap; it does not recover missing turns.

The previously reviewed tree was unavailable, so inter-review introduction could not be independently established; this was not a fresh whole-PR review. All three assigned topics were completed. One delegated report was unavailable, so its native-step retention/projection topic was independently inspected. Static review only; tests were not executed.

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

@lafrancef
lafrancef marked this pull request as ready for review October 29, 2026 15:36
@lafrancef

Copy link
Copy Markdown
Contributor Author

/ok to test 606c790

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 29, 2026 15:38
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Oct 29, 2026

@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 WITH CARE — the prior RISK in continuation-close timing diagnostics remains.

This same-head follow-up verified the unresolved finding and its directly affected cancellation, capture, cleanup, receipt-retention, and trajectory-preservation paths. The author's deliberate acceptance is noted, but the source still records the timestamp after cancellation-triggered capture. The final-activation regression preserves native turns when provider steps exist and explicit gaps when they do not; it does not correct close ordering.

The supplied follow-up baseline is identical to the current head, so there are no inter-review changes to assess. This was not a fresh whole-PR review. All three assigned inspections completed and their results were consolidated. Static review only; tests were not executed.

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

@yaoyu-33
yaoyu-33 added this pull request to the merge queue Oct 29, 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/40924878839

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

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 29, 2026
@lafrancef
lafrancef added this pull request to the merge queue Oct 29, 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/40967704338

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

Merged via the queue into main with commit c81f767 Oct 29, 2026
49 of 52 checks passed
@lafrancef
lafrancef deleted the flafrance/opencode-native-step-diagnostics branch October 29, 2026 23:53
copy-pr-bot Bot pushed a commit that referenced this pull request Oct 30, 2026
Resolve responses_api_agents/opencode_agent/sandbox.py: keep main's
`import time` and `close_requested_at` (#5237) beside the branch's
collections.abc import and session export fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 606c790a Deployed Oct 29, 2026 by copy-pr-bot[bot] via release / finalize / notify #8262
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 feature New capabilities, enhancements, or enablement work 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