diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index e8f43d1..06b2d6a 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -159,6 +159,19 @@ ''; }; + options.hyperhive.forge.keepSubscriptions = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + When true, the forge notification poller will NOT auto-unsubscribe + from repo watches after delivering a "subscribed"-reason notification. + Set this for agents (e.g. triage) that intentionally consume the full + repo notification firehose and must retain broad watch subscriptions. + By default agents auto-unsubscribe from repos they no longer actively + work in to avoid accumulating firehose noise. + ''; + }; + options.hyperhive.claudeMarketplaces = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ "anthropics/claude-plugins-official" ]; @@ -283,6 +296,8 @@ # Zero watermark disables proactive compaction; the reactive path # (compact-on-overflow) still fires when the session is truly full. HIVE_COMPACT_WATERMARK_TOKENS = "0"; + } // lib.optionalAttrs config.hyperhive.forge.keepSubscriptions { + HIVE_FORGE_KEEP_SUBSCRIPTIONS = "1"; }; boot.isNspawnContainer = true;