thedotmack/claude-mem · warning

CLOCK_HEADER

CLOCK_HEADER

Error message

CLOCK_HEADER

What it means

This is not a thrown exception but a conflict record emitted by CcsAlignRulesWalker.walkRules with code CLOCK_HEADER. The walker scans layered rules files (house/project/seat) and flags any line containing a top-of-prompt clock or a 'current time is' phrase, because a profile rule forcing a clock into the prompt prefix violates the house rule that prompts carry no clock.

Source

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

  // Build all house+project lines for deny/allow cross-layer comparison
  const houseProjectLines: string[] = [...allHouseLines];
  for (const entry of project.entries) {
    for (const line of entry.lines) {
      const trimmed = line.trim();
      if (trimmed.length > 0) houseProjectLines.push(trimmed);
    }
  }

  const allLayers = [...house.entries, ...project.entries, ...seat.entries];

  // Walk all entries, detecting conflicts
  for (const entry of allLayers) {
    for (const line of entry.lines) {
      // CLOCK_HEADER: any layer
      if (detectClockHeader(line)) {
        conflicts.push({
          code: 'CLOCK_HEADER',
          layer: entry.layer,
          file: entry.file,
          line,
          detail: 'Top-of-prompt clock or "current time is" in a profile (house rule: no clock in prefix)',
        });
      }
    }
  }

  // Seat-layer specific conflict detection (against house)
  const shadowPatchesByFile = new Map<string, Set<string>>();

  for (const entry of seat.entries) {
    for (const line of entry.lines) {
      const trimmed = line.trim();
      if (trimmed.length === 0) continue;

      // SHADOW_HOUSE: leaf line also at house (or starts with "House rule")

View on GitHub (pinned to 8bc631a71a)

Solutions

  1. Delete the clock/time-display line from the flagged profile layer file
  2. Move the clock preference into a tool/setting that is not part of the rules cascade
  3. If the detection is a false positive, reword the line so it does not match detectClockHeader patterns
  4. Accept the conflict in the walker result and document the exception if the clock is intentional

Example fix

// before (seat rules file)
House rule: display current time at the top of each prompt
// after
(line removed — house rules forbid a clock in the prompt prefix)
Defensive patterns

Strategy: validation

Validate before calling

const clockPattern = /(current time is|\b\d{1,2}:\d{2}\b.*clock|clock.*top of)/i;
const offenders = seatLines.filter(l => clockPattern.test(l));
if (offenders.length) console.warn('remove clock headers from rules files:', offenders);

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Running walkRules (the align-rules check) against a seat or other layer file whose lines contain a detected clock header pattern — e.g. a line like 'Always show the current time at the top of every prompt' or a time-format prefix directive.

Common situations: A user copied a profile snippet that adds a clock/status line into their seat-level CLAUDE-like rules file, then the project's alignment audit reports it as conflicting with house style.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-09-09). Data as JSON: /api/errors/af9ed1ae2e1f63f3. Report an issue: GitHub.