Think in Code Savings — Now Measurable
Context-mode can now track filesystem reads inside the sandbox. When your agent writes code that reads 50 files, those bytes are counted and reported.
FS Read Instrumentation
fs.readFileSyncandfs.readFilepatched in sandbox wrapper- Byte count reported via
__CM_FS__stderr marker (same pattern as network I/O) - Combined with network I/O in
bytesSandboxedfor total savings calculation
Marketing-Friendly ctx_stats
The stats output is now a story, not a spreadsheet:
Think in Code -- Session Report (45 min)
Your agent processed 536 KB of data. Only 3.2 KB entered your context window.
Context saved: 99.4% -- session extended by ~45 minutes
What happened:
-> 47 files analyzed in sandbox (never entered context)
-> 12 API calls sandboxed (responses indexed, not dumped)
-> 8 search queries served from index
-> 2 repeat fetches avoided (TTL cache)
Per-tool breakdown table, session continuity summary, and analytics JSON for power users included.
Full diff: 5 files, +363/-245.