feat(opencode/session): default-on hivemind loop primitive (#266 Phase 2)#23
Merged
Conversation
…#266 Phase 2) Flip OPENCODE_HIVEMIND_LOOP_ENABLED default false → true. Phase 1 validation proved the hook is reliably non-fatal (forkIn(scope) + Effect.ignore swallow every failure) and the auto-drive payoff is significant. Users who want to opt out can still set OPENCODE_HIVEMIND_LOOP_ENABLED=0 in the env. Pairs with hivemind-mcp PR adding a 3-turn grace window before 'missing-loop-goal' escalation, so peers that haven't called hivemind_set_loop_goal yet aren't immediately flagged. Refs: grunt-it/hivemind-mcp#266
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
terrxo
added a commit
that referenced
this pull request
May 28, 2026
…#266 Phase 2) (#23) Flip OPENCODE_HIVEMIND_LOOP_ENABLED default false → true. Phase 1 validation proved the hook is reliably non-fatal (forkIn(scope) + Effect.ignore swallow every failure) and the auto-drive payoff is significant. Users who want to opt out can still set OPENCODE_HIVEMIND_LOOP_ENABLED=0 in the env. Pairs with hivemind-mcp PR adding a 3-turn grace window before 'missing-loop-goal' escalation, so peers that haven't called hivemind_set_loop_goal yet aren't immediately flagged. Refs: grunt-it/hivemind-mcp#266
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.
Summary
Flip
OPENCODE_HIVEMIND_LOOP_ENABLEDdefault fromfalse→true. The hivemind loop primitive (anomalyco#266 Phase 1) shipped behind a feature flag; Phase 2 makes it default-on.Pairs with hivemind-mcp PR #22 (3-turn grace window for
missing-loop-goal).Why now
Phase 1 validation (post-PR #21 merge) proved:
Effect.ignore + Effect.forkIn(scope), so the TUI never blocks or sees an exception from a slow/failing hivemind connection.🚦 READY FOR REVIEWand the coord wakes automatically; coordinators auto-continue when there's still work to do; idle-phrase + silent-stall escalations route to parents without manual nudges.Changes
packages/opencode/src/effect/runtime-flags.ts—hivemindLoopEnablednowConfig.boolean(...).pipe(Config.withDefault(true)). Docblock updated to reflect Phase 2 + the opt-out env var.packages/opencode/src/session/hivemind-loop-hook.ts— docblock + per-export comments updated to say "default ON" + "opt out viaOPENCODE_HIVEMIND_LOOP_ENABLED=0".packages/opencode/src/session/processor.ts— call-site comment refreshed.GRUNTCODE.md— patch feat(grunt/tui): baregruntcodeauto-spawns serve + attaches (one-command wakeable TUI) #5 description rewritten to reflect default-on + cross-reference the hivemind-mcp grace window.Opt-out path
To opt out for a specific tab/session:
Tests
bun typecheckfrompackages/opencodeis clean.Pair with
grunt-it/hivemind-mcp#22 — adds the 3-turn grace window so peers that haven't called
hivemind_set_loop_goalyet aren't immediately flagged when this default flip lands.Refs grunt-it/hivemind-mcp#266 Phase 2.
🚦 READY FOR REVIEW