Skip to content

Conversation

@kamil-hassan201
Copy link

Add <fresh-session> tag to skip context injection

Summary

Adds a <fresh-session> tag that allows starting a session without loading any historical context (no observations, summaries, or timeline).

Default behavior is unchanged; this is an explicit, per-session opt-in.


Usage

<fresh-session>
Review this code for security issues.

The tag is detected only in the first user message and is stripped before storage.


Changes

  • context-hook.ts – Skip context injection when <fresh-session> is present
  • tag-stripping.ts – Remove tag from stored messages
  • fresh-session.test.ts – 11 tests added (all passing)
  • fresh-session.mdx – User documentation

Why

  • Enables unbiased reviews and unrelated tasks
  • Provides explicit per-session control without global flags

Testing

npm test -- tests/happy-paths/fresh-session.test.ts

✓ 11 tests passing


Compatibility

✅ Fully backward compatible

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant