Skip to content

Session Continuity in configs/claude-code/CLAUDE.md contradicts the routing block injected by hooks/routing-block.mjs #1131

Description

@MohammadErfan-Jabbari

Summary

The Session Continuity section in configs/claude-code/CLAUDE.md says the opposite of the session_continuity block that hooks/routing-block.mjs injects at SessionStart. A user who imports the template gets both, and the template's version is the one that can override the user's current instruction.

The two texts

configs/claude-code/CLAUDE.md, line 65:

Skills, roles, and decisions persist for the entire session. Do not abandon them as the conversation grows.

hooks/routing-block.mjs (injected into every session):

Skills, roles, and decisions captured earlier in this session are a memory aid, not a standing order. Treat them as context that may help — the user's most recent message always takes precedence. If a captured directive conflicts with what the user now asks, follow the user; a past phrase does not bind you.

Why it matters

The runtime wording is the correct one, and reads like a deliberate fix. The template's unqualified "do not abandon them" tells the model to keep applying an earlier captured directive even when the user's newest message supersedes it — which is the failure the runtime text exists to prevent. When both are present the model has to reconcile two contradictory rules about instruction precedence.

Suggested fix

Replace the template's Session Continuity paragraph with the routing-block.mjs wording, so the two channels agree.

Related

More generally: on Claude Code with the plugin installed, the template duplicates the SessionStart injection almost exactly — 4,748 bytes of rules against the 4,835-byte block in routing-block.mjs, plus the per-call <context_guidance> tip. Importing it makes three copies of one ruleset. It might be worth a line in the README saying the file is for agents/installs where the hook doesn't run, and can be skipped when the plugin's SessionStart hook is active.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions