Add Advisor controls for existing threads - #5
Merged
salemsayed merged 2 commits intoSep 14, 2026
Merged
Conversation
This was referenced Sep 3, 2026
The global Advisor setting is all-or-nothing: a thread where the reviewer is noise cannot opt out without turning it off everywhere. This adds a switch beside the harness selector in the composer, for a thread and for a new thread. A thread override wins over the global setting in both directions, so the global value is a default rather than a ceiling. Off means the advisor never acts on its own in that thread; anything explicitly asked for — "Review now", waiting for completion — still runs. Two tables, both appended to the migration list: advisor_thread_settings one row per overridden thread advisor_new_thread_default the choice armed in the new-thread composer The new-thread composer has no thread id to write against, and plugin settings are read-only from the plugin, so the choice is stored and materialized in thread.created. It is single-use: the next user-created thread consumes and clears it. An earlier sticky variant behaved as a second hidden global that shadowed the real setting with no way back. The gate is checked at every entry point that can start a review on the advisor's own initiative, including inside the tool's execute(): bb does not hot-mutate a running provider session's tool set, so advisor_review can still be present after the switch is flipped off, and it must refuse rather than review. It returns an explicit non-approval so the refusal is not read as a pass. Adds 18 tests (101 total), covering both override directions, single-use arming, other plugins' worker threads not consuming the arm, and the refusal in an already-running session.
salemsayed
force-pushed
the
feat/per-thread-advisor-switch
branch
from
September 14, 2026 20:37
eebe4a8 to
663abdf
Compare
Owner
|
Thanks for the per-thread controls contribution. It is now shipped in Advisor v0.1.1. Existing threads have their own switch and CLI override; new threads follow the global default. The release includes the switch-off-during-review guard, and all 108 tests passed. The live checks also confirmed BB #2384: an existing Codex session cannot gain the newly enabled tool just by stopping/resuming. The README documents the fresh-session requirement and immediate Review now alternative. |
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.
Advisor's global setting cannot exclude a noisy thread or enable one thread while the default is off. This adds an on/off switch to existing-thread composers and
bb advisor enable|disable|follow [thread-id]commands. Overrides persist per thread and win in both directions; new threads follow the global setting.Switching a thread off suppresses automatic reviews, instruction injection, and automatic corrective turns. The tool rechecks the setting when called by an already-running agent session. Automatic continuation also rechecks after a review finishes, so switching off during a review cannot start an unwanted corrective turn. Explicit Review now and Fix in new turn requests continue to work while off.
The UI reports the effective server state, follows realtime and global-setting changes, and prevents overlapping toggle writes. Archiving preserves the override; deleting the thread removes it. The unscoped new-thread setting is retired through an appended migration, preserving migration indices for installations that tried earlier versions of this branch.
Based on the merged SDK compatibility fixes in #3. Generated bundles and the README are updated.
Validation: