Skip to content

fix(process_registry): poll() must not mark completion as consumed (#10156) - #26659

Closed
someaka wants to merge 1 commit into
NousResearch:mainfrom
someaka:fix/poll-completion-consumed-scoped
Closed

fix(process_registry): poll() must not mark completion as consumed (#10156)#26659
someaka wants to merge 1 commit into
NousResearch:mainfrom
someaka:fix/poll-completion-consumed-scoped

Conversation

@someaka

@someaka someaka commented May 16, 2026

Copy link
Copy Markdown

Closes #10156.

Problem

Commit f53a5a7 (#8228) added _completion_consumed tracking to suppress duplicate notify_on_complete notifications. The fix was correct for wait() (blocking call = output consumed), but was incorrectly extended to poll() (read-only query = should have no side effects).

Consequence: when the agent calls process(action='poll') on an exited background process, poll() marks the completion as consumed. The watcher thread (which checks is_completion_consumed() before injecting the notification) sees True and skips the notification. The user never sees the background process completion message.

Fix

Two changes, both in tools/process_registry.py:

  1. Remove self._completion_consumed.add(session_id) from poll()
  2. Fix is_completion_consumed() docstring: poll → read_log

Only wait() and read_log() should mark completion as consumed. poll() is a read-only query with no side effects.

@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets tool/terminal Terminal execution and process management P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #10158 — same fix (remove _completion_consumed.add() from poll()). Previous duplicate PRs: #26616, #21903.

@someaka

someaka commented May 16, 2026

Copy link
Copy Markdown
Author

Voluntarily closing — #10158 by @de1tydev is the canonical PR with proper test coverage (30 tests). This was a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists tool/terminal Terminal execution and process management type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: poll() marking _completion_consumed silently suppresses watcher notification

2 participants