Skip to content

Ignore transient tool idle boundaries during Loop runs - #162

Merged
ByBrawe merged 6 commits into
mainfrom
fix/160-ignore-transient-tool-idle
Sep 24, 2026
Merged

ByBrawe merged 6 commits into
mainfrom
fix/160-ignore-transient-tool-idle

Conversation

@ByBrawe

@ByBrawe ByBrawe commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Fixes #160.

OpenCode 1.x may emit session.idle between tool steps while the same assistant turn is still in progress. The scheduler treated that boundary as final, which could clear the active Loop run and admit another prompt after a shell command.

This change keeps the existing idle fallback when message completion evidence is unavailable, but fails closed when the host message API positively reports the current assistant turn as incomplete.

Regression coverage verifies that:

  • unknown completion evidence preserves the historical idle fallback;
  • an incomplete assistant turn cannot finalize the active Loop run;
  • a completed assistant turn still finalizes normally;
  • active tool calls remain a hard busy guard.

Copilot AI lite review requested due to automatic review settings September 24, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ByBrawe
ByBrawe merged commit 6d5714d into main Sep 24, 2026
14 checks passed
@github-actions
github-actions Bot deleted the fix/160-ignore-transient-tool-idle branch September 24, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idle loop seems to instruct agent every time the agent uses a shell command

2 participants