[Bug] Instruction-Transfer Failure: Explicit Rules Not Applied Across File/Context Boundaries
Bug Description
Claude (Opus 4.8), agentic coding
Observation: Two distinct, repeatable instruction-following failures, both occurring DESPITE the rule being present in CLAUDE.md, three project memory files, and a SessionStart hook injecting those memories verbatim into context each session:
- Principle-transfer failure across framing boundaries.
A rule the user stated and repeatedly emphasized for context A ("no soft-prompting / single-source values defined authoritatively elsewhere" — framed around GENERATION prompts) did not fire when the same principle applied in an analogous context B (EVAL-scoring guidance, a different file/layer). The model treated a general principle as scoped to the surface where it was first stated, and re-introduced the exact anti-pattern (hardcoding a "(max 3)" literal that duplicated a value already living in a schema/dict).
- Local imitation overrides the explicit stated rule.
When the surrounding code exhibited an anti-pattern that the user's standing instructions forbid (sibling functions all hardcoding "(max N)" mark ceilings that duplicate the structured rubric), the model matched the local code STYLE — propagating the anti-pattern — instead of applying the explicit global rule. The general "write code like the surrounding code" heuristic silently outcompeted an explicit, emphasized prohibition.
What mitigated it: reframing the rule as a CHECKPOINT QUESTION to ask before acting ("does this value live authoritatively elsewhere? if yes, reference it or omit it") rather than as a declarative prohibition. Procedural/interrogative framing transferred across contexts where declarative framing did not.
Why it matters: users invest heavily in memory files, hooks, and docs to encode standing rules. Transfer-failure and local-imitation-override quietly defeat that investment — the rule is "known" but doesn't activate at the moment of the violation. Suggested training signal: (a) weight explicit, user-stated principles above local code-style imitation; (b) reinforce transfer of a stated principle across file/layer/framing boundaries, not just within the surface where it was introduced.
Context: surfaced during a multi-hour agentic coding session on a per-technique content-generation pipeline where "no soft-prompting / single-source every value" was the central, repeatedly-restated discipline. The model violated it at least twice in new code, each time in a layer adjacent to (but differently framed from) where the rule was anchored.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.162
- Feedback ID: b4c4b7a9-39fb-4e81-8f42-8831ff443d9f
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗