Problem
[skills] confusability_threshold and [skills] two_stage_matching config fields are never applied during initial agent startup — they only take effect after a hot config reload. On a fresh launch, both fields default to 0.0/false regardless of config file values.
Root cause
PR #2402 wired these fields into reload_config() but missed two things:
- No builder methods:
AgentBuilder has no with_two_stage_matching() or with_confusability_threshold() methods.
- Not wired in runner.rs/daemon.rs:
src/runner.rs:978 and src/daemon.rs:376 call with_disambiguation_threshold(config.skills.disambiguation_threshold) but have no equivalent calls for two_stage_matching or confusability_threshold.
Impact
/skills confusability always reports "monitoring is disabled" even when confusability_threshold = 0.85 is set in config ✅ (confirmed in CI-279)
two_stage_matching = true in config is silently ignored at startup
- Both fields become active only after hot-reload (e.g. saving the config file while agent is running)
Fix
-
Add builder methods:
// in crates/zeph-core/src/agent/builder.rs
pub fn with_two_stage_matching(mut self, enabled: bool) -> Self {
self.skill_state.two_stage_matching = enabled;
self
}
pub fn with_confusability_threshold(mut self, threshold: f32) -> Self {
self.skill_state.confusability_threshold = threshold.clamp(0.0, 1.0);
self
}
-
Wire them in src/runner.rs and src/daemon.rs alongside the existing with_disambiguation_threshold() call:
.with_disambiguation_threshold(config.skills.disambiguation_threshold)
.with_two_stage_matching(config.skills.two_stage_matching)
.with_confusability_threshold(config.skills.confusability_threshold)
Verification
After fix: /skills confusability should show a report (not the disabled message) when confusability_threshold = 0.85 is set in config.
Problem
[skills] confusability_thresholdand[skills] two_stage_matchingconfig fields are never applied during initial agent startup — they only take effect after a hot config reload. On a fresh launch, both fields default to0.0/falseregardless of config file values.Root cause
PR #2402 wired these fields into
reload_config()but missed two things:AgentBuilderhas nowith_two_stage_matching()orwith_confusability_threshold()methods.src/runner.rs:978andsrc/daemon.rs:376callwith_disambiguation_threshold(config.skills.disambiguation_threshold)but have no equivalent calls fortwo_stage_matchingorconfusability_threshold.Impact
/skills confusabilityalways reports "monitoring is disabled" even whenconfusability_threshold = 0.85is set in config ✅ (confirmed in CI-279)two_stage_matching = truein config is silently ignored at startupFix
Add builder methods:
Wire them in
src/runner.rsandsrc/daemon.rsalongside the existingwith_disambiguation_threshold()call:Verification
After fix:
/skills confusabilityshould show a report (not the disabled message) whenconfusability_threshold = 0.85is set in config.