Skip to main content

effective_policy

Function effective_policy 

Source
pub fn effective_policy(session: &Session) -> DerivePolicy
Expand description

Resolve the effective derivation policy for session.

The persisted session policy is the baseline. Operators can override it process-wide via:

  • CODETETHER_CONTEXT_POLICY=legacy
  • CODETETHER_CONTEXT_POLICY=reset
  • CODETETHER_CONTEXT_RESET_THRESHOLD_TOKENS=<usize>

When there is no explicit override and the persisted policy is still legacy, a recorded [CONTEXT RESET] marker auto-promotes the effective policy to DerivePolicy::Reset so context_reset markers become live immediately on the next turn.