thedotmack/claude-mem · warning

DENY_ALLOW

DENY_ALLOW

Error message

DENY_ALLOW

What it means

walkRules flags DENY_ALLOW for seat-layer lines: detectDenyAllow(trimmed, houseProjectLines) finds a seat line that deny/allows something in a way that conflicts with house or project lines (e.g. seat denies what house allows). Reported with layer='seat' and a detector-provided detail.

Solutions

  1. Read denyAllow.detail in the conflict to see which house/project line conflicts
  2. Remove or reword the seat line so it no longer contradicts house/project
  3. If the restriction is intentional, adjust the house/project line instead and document the exception
  4. Re-run walkRules to confirm the conflict is resolved

Example fix

// before (seat)
Deny using the Bash tool.
// after (seat)
# removed: conflicts with house line allowing Bash for builds
Defensive patterns

Strategy: validation

Validate before calling

// reject seat deny/allow lines that mention subjects governed by house/project
if (/\b(deny|allow)\b/i.test(seatLine) && subjectInHouseProject(seatLine)) {
  console.warn('DENY_ALLOW conflict candidate');
}

Prevention

When it happens

Trigger: A seat rules file line contains a deny/allow statement whose subject is also governed by a house or project line with the opposite or overlapping directive, detected against the houseProjectLines set.

Common situations: Seat-level overrides like 'never use tool X' contradicting a house 'use tool X for Y'; permission-style allowlists narrowed at seat level; accumulated rules from different authors.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17). Data as JSON: /api/errors/5b1f1d052254abf7. Report an issue: GitHub.

Appendix: source

Thrown at src/services/integrations/CcsAlignRulesWalker.ts:555

        const drift = detectDrift(trimmed, allHouseLines);
        if (drift.isDrift) {
          conflicts.push({
            code: 'DRIFT',
            layer: 'seat',
            file: entry.file,
            line: trimmed,
            detail: drift.matchedHouseLine
              ? `House text may have changed; leaf still has old wording. House: "${drift.matchedHouseLine}"`
              : 'Possible drift from house text',
          });
        }
      }

      // DENY_ALLOW: check seat line against house+project lines
      const denyAllow = detectDenyAllow(trimmed, houseProjectLines);
      if (denyAllow.isDenyAllow) {
        conflicts.push({
          code: 'DENY_ALLOW',
          layer: 'seat',
          file: entry.file,
          line: trimmed,
          detail: denyAllow.detail,
        });
      }
    }
  }

  // Project-layer deny/allow (against house)
  for (const entry of project.entries) {
    for (const line of entry.lines) {
      const trimmed = line.trim();
      if (trimmed.length === 0) continue;

      const denyAllow = detectDenyAllow(trimmed, allHouseLines);
      if (denyAllow.isDenyAllow) {
        conflicts.push({

View on GitHub (pinned to d8bc9755e7)