Repository navigation
Conversation
opencode_failed folds a context-limited session (its last assistant message stopped on length: the generation hit the context limit, or the next request no longer fit and the model server answered with a length stop) together with real failures, so a trainer could not treat the two differently. Expose it as opencode_context_limited, so a recipe can mask such sessions like overlong rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bg51717 <biguo@nvidia.com>
…'s last message When the sandbox kills the OpenCode run (for example at its timeout), the session's export still ends with the error the kill left in its last assistant message. opencode_error_type took that message's error name, so a timeout reported by the sandbox showed up as an OpenCode error and mask rules keyed on the timeout never matched. Prefer the sandbox's error type. Based on Jiaqi Zeng's c546efa. The provider side of that change, which classifies a kill at the deadline as a timeout, is already on main (NVIDIA-NeMo#5157). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bg51717 <biguo@nvidia.com>
…en capture OpenCode renders today's date into every call's system prompt. Source-history capture links a call to its parent by exact prompt text, so the first call after 00:00 UTC in a running session found no parent and the rollout was discarded. With token capture on, load stable-date.js, which uses OpenCode's experimental.chat.system.transform hook to pin the date line to the session's first call. The plugin writes a marker once it pins a date; a run that finishes without the marker fails like a required-MCP setup error, so a hook or date-format change in a future OpenCode cannot silently bring the discarded rollouts back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bg51717 <biguo@nvidia.com>
bg51717
marked this pull request as ready for review
November 5, 2026 07:23
Resolve conflicts with NVIDIA-NeMo#5128: clear the stable-date marker in the split setup command, and report a missing marker as an NgFailureEvent like the other capture checks. Timed-out test runs now carry the launch marker that main requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bg51717 <biguo@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Three fixes to
opencode_sandboxed_agentfor RL training:opencode_context_limitedreports whether the session ended on a full context (its last assistant message stopped on length), so a recipe can mask those sessions like overlong rows instead of folding them intoopencode_failed.opencode_error_typetakes the sandbox's error type instead of the error left in the session's last message, so mask rules keyed on timeouts match. Based on Jiaqi Zeng's c546efaaa; its provider side is already on main (fix(opensandbox): report a command that hit its timeout as a timeout #5157).stable-date.jsplugin pins the system prompt's date to the session's first call. Source-history capture links calls by exact prompt text, so a session running past 00:00 UTC lost its parent link and the rollout was discarded. The plugin goes through the same registration and verified upload as the other plugins, and a run that finishes without its marker fails, so a future OpenCode change cannot silently bring that back.Proposed labels:
bug,area:agent.Validation
gym env test +entrypoint=responses_api_agents/opencode_sandboxed_agent +should_validate_data=true(with Node available, so the.mjsplugin tests run)pre-commit run --from-ref origin/main --to-ref HEADRollouts
N/A
Compatibility and benchmark impact
Adds the
opencode_context_limitedverify field.opencode_error_typecan now report the sandbox's error instead of OpenCode's. The date pin applies only with token capture on.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).