Skip to content

Add CHRONICLE_ENABLED env flag to disable LIVE recording - #37

Merged
susheem-k merged 6 commits into
mainfrom
feat/chronicle-enabled-flag
Aug 5, 2026
Merged

Add CHRONICLE_ENABLED env flag to disable LIVE recording#37
susheem-k merged 6 commits into
mainfrom
feat/chronicle-enabled-flag

Conversation

@susheem-k

Copy link
Copy Markdown
Contributor

Summary

  • Add CHRONICLE_ENABLED (default on) so agents can turn LIVE recording off per process via 0 / false / off / no
  • @boundary, wrap / wrap_llm, record(), and EnvelopeRecorder become passthrough when off; replay is unaffected
  • Document the env var and expose chronicle.is_enabled()

Test plan

  • pytest tests/test_enabled.py
  • Confirm CHRONICLE_ENABLED=0 on an example agent records nothing
  • Confirm replay / cut-point tests still pass with the flag off
  • Confirm unset / 1 keeps current recording behavior

Made with Cursor

susheem-k and others added 5 commits August 4, 2026 19:30
Lets agents flip recording on/off per process for with/without Chronicle runs without code changes; replay stays unaffected.

Co-authored-by: Cursor <cursoragent@cursor.com>
Buffers envelopes in memory and flushes in batches (JsonlStore.append_many) so recording can avoid a sync open/write per crossing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cache boundary signatures, use model_construct on envelope build, add JsonlStore keep_open and retain_envelopes=False for store-only buffered recording.

Co-authored-by: Cursor <cursoragent@cursor.com>
Flush stores on record() exit, restore batches after failed writes, and keep full message metadata when coercing inputs to JSON-safe dicts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Perf: speed up LIVE recording hot path
susheem-k added a commit that referenced this pull request Aug 5, 2026
Fixes the ruff F401 that was failing CI lint on PR #37.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes the ruff F401 that was failing CI lint on PR #37.

Co-authored-by: Cursor <cursoragent@cursor.com>
@susheem-k
susheem-k merged commit c94b5e3 into main Aug 5, 2026
4 checks passed
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