Hmbown/CodeWhale · warning · anyhow::Error
telemetry permission is no longer enabled
Error message
telemetry permission is no longer enabled
What it means
arm() takes a permission_still_enabled callback and re-checks it under the privacy lock after validating the tombstone generation. If the user's telemetry permission was turned off between the initial consent and arming, the operation bails with this error so arming never overrides a revoked permission.
Solutions
- Respect the revocation: skip arming and reload config to confirm the current setting.
- If the flip was unintentional, re-enable the telemetry setting in config and retry.
- Re-read the permission immediately before arming so the check reflects the latest config.
- Avoid concurrently editing the config while the app arms telemetry.
Example fix
// before: caching the permission flag at startup let enabled = config.telemetry_enabled; later: arm(root, gen, || enabled)?; // after: re-read live config inside the callback arm(root, gen, || config_snapshot().telemetry_enabled)?;
Defensive patterns
Strategy: validation
Validate before calling
// Read the live setting right before arming let enabled = config.reload()?.telemetry_enabled; anyhow::ensure!(enabled, "telemetry permission is off; do not arm");
Type guard
fn permission_is_live(config: &Config) -> bool { config.telemetry_enabled } Try / catch
match arm(root, gen, || live_permission()) {
Err(e) if e.to_string().contains("no longer enabled") => {
log::info!("telemetry was disabled mid-arm; skipping");
// do not retry; respect the revocation
}
r => r?,
} Prevention
- Pass a callback that re-reads config, never a cached bool
- Do not edit the telemetry setting while the app is arming
- Reload config after any external modification before arming
- Log permission revocations so behavior is auditable
When it happens
Trigger: arm(root, observed_generation, permission_still_enabled) is invoked while the callback returns false — the config setting or runtime flag enabling telemetry flipped to off after consent was captured.
Common situations: User disabled telemetry in config while the app was starting; config file reloaded concurrently flipping the flag; another instance wrote settings.telemetry=false; scripted toggling of the setting during automation.
Related errors
- {message}
- tool ' ' on MCP server ' ' is blocked by the tool filter
- a CNB access token is not configured in the Codewhale…
- account_agent_model_unconfigured
- active profile is missing or malformed
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/7bbd679cafa3bcb5.
Report an issue: GitHub.
Appendix: source
Thrown at crates/telemetry/src/buffer.rs:469
/// permitted.
///
/// Called by `init` on every arming. Both the exact tombstone generation and a
/// fresh durable permission check must still match while the wipe lock is held.
/// A stale buffer left by an earlier run or by a bug cannot enter the new
/// process's batch.
pub(crate) fn arm(
root: &Path,
observed_generation: Option<&TombstoneGeneration>,
permission_still_enabled: impl FnOnce() -> bool,
) -> Result<()> {
ensure_dir(root)?;
with_lock(root, || {
let current_generation = tombstone_generation(root)?;
if current_generation.as_ref() != observed_generation {
anyhow::bail!("telemetry permission changed before arming");
}
if !permission_still_enabled() {
anyhow::bail!("telemetry permission is no longer enabled");
}
let tombstone = tombstone_path(root);
if tombstone.exists() {
fs::remove_file(&tombstone)
.with_context(|| format!("failed to remove {}", tombstone.display()))?;
}
truncate(&buffer_path(root))
})
}
View on GitHub (pinned to 73e0f67d83)