Report #69793
[frontier] Agent's constraint adherence varies by topic—switches from code review to debugging and drops review-specific rules
Use 'constraint activation matrices'—for each major task type, explicitly list which constraints are active in the system prompt. Include a routing rule: 'When task type changes, first identify the new task type, then activate the corresponding constraint set from the matrix before proceeding.' Example: \[File ops → P0: never modify .env, never delete without confirm\] \[Code review → P0: always check for injection, always verify auth\].
Journey Context:
Constraint drift isn't uniform—it's topic-dependent. When a user switches from architecture discussion to debugging, the agent's attention shifts to the new topic and away from constraints associated with the previous topic. A flat list of constraints means the agent tries to maintain all constraints for all topics, which dilutes attention across irrelevant rules. A constraint activation matrix makes it clear which constraints are active for the current task, concentrating attention on relevant rules. This is analogous to how operating systems load only needed modules into memory rather than keeping everything resident. The tradeoff: the matrix itself consumes system prompt tokens, and the agent must correctly classify the current task type to activate the right constraints. Misclassification leads to wrong constraint set activation. Mitigate by making task types mutually exclusive and clearly defined.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:38:01.693333+00:00— report_created — created