Repository navigation
fix(opencode): align timeout completion status - #4233
Draft
giuliolovisotto wants to merge 2 commits into
Draft
giuliolovisotto wants to merge 2 commits into
giuliolovisotto wants to merge 2 commits into
Conversation
|
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. |
7 tasks done
Signed-off-by: Giulio Lovisotto <[email protected]>
giuliolovisotto
force-pushed
the
glovisotto/opencode-agent-timeout-not-natural
branch
from
October 12, 2026 14:49
8ea3091 to
2d16045
Compare
Signed-off-by: Giulio Lovisotto <[email protected]>
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.
A local OpenCode process timeout discards its output and pads an empty assistant message. The response defaults to
status="completed", so/runincorrectly reportsfinished_naturally=true.Return
status="incomplete"after the local process deadline and require a completed response before reporting a natural finish. This uses the existing response status, matching the sandbox-session path introduced in #3639. No new publicagent_timed_outfield or internal response flag is added.The sandbox path already reports
incompletefor its execution-timeout receipt. Its existing environment-routing test now exercises both normal completion and timeout, proving that the status and retained output reach verification unchanged and the verifier's reward survives collection. This does not change timeout/retry policy or depend on a proposed timeout schema.Compatibility: local timed-out responses now expose the correct existing status to the verifier, and
finished_naturallybecomes false. Existing local output padding, usage, invocation evidence, and grading/masking policy remain unchanged. No changes to the separate legacyopencode_sandboxed_agent.Validation on main
fb1155108plus this change:python -m pytest -o addopts= --import-mode=importlib -q responses_api_agents/opencode_agent/tests: 360 passed, 37 skipped (Linux-only supervisor cases unavailable on macOS).gym env test +entrypoint=responses_api_agents/opencode_agent +skip_venv_if_present=true +should_validate_data=true: 360 passed, 37 skipped.pre-commit run --all-files: passed.completed, naturally finished, reward 1; delaying delivery of a real successful model response beyond the native 20-second process deadline producedincomplete, not naturally finished, reward 0. Both reached verification, completed evaluation, and remained unmasked.No separate issue is needed for this narrow existing completion-reporting bug. Broader timeout evidence and failure classification are outside this change.