This is a major stability release fixing 13 critical bugs that prevented reliable concurrent session usage. If you've experienced data corruption, race conditions, or unexpected behavior when running multiple sessions, upgrade immediately.
Before v1.9.0: Running multiple sessions simultaneously would cause data corruption, cross-session interference, and unpredictable behavior.
After v1.9.0: Multiple agents/repos can run concurrently with zero conflicts.
- Git Tracking Race Condition - Each session now has isolated git state
- File Watcher Singleton - Session-scoped watchers prevent collisions
- Git Interval Memory Leak - Proper cleanup eliminates orphaned timers
- Budget Check Race - Budget validation before DB write prevents over-spend
- Non-Atomic DB Updates - All operations wrapped in transactions
- Token Estimation Bug - Fixed
||vs??causing zero tokens to be ignored - CSV Export Corruption - Proper escaping for newlines in exports
- PID File Race - Verification before killing processes prevents disasters
- Division by Zero - Defensive checks for edge cases
- Timeout Leaks - All setTimeout calls now tracked and cleared
- Port Binding Race - Dashboard verifies port is truly free before binding
- Silent Failures - Git polling properly managed per session
- Integer Overflow - Duration capping handles clock skew gracefully
- Fixed: HTTPS mixed content errors when accessing via Tailscale/reverse proxy
- Enhanced: Error messages now provide diagnostic context
- Confirmed: Auto-refresh (30s polling) and GitHub PR-style diff viewer working perfectly
| Before 1.9.0 | After 1.9.0 |
|---|---|
| ❌ Concurrent sessions corrupt data | ✅ Unlimited concurrent sessions |
| ❌ Budget enforcement unreliable | ✅ Budget checked before DB write |
| ❌ Memory leaks from orphaned timers | ✅ All resources properly cleaned up |
| ❌ CSV exports break on newlines | ✅ Proper escaping for all edge cases |
| ❌ Dashboard fails via HTTPS proxy | ✅ Relative URLs work everywhere |
All global state migrated to session-scoped Maps:
Map<sessionId, GitSession>- git instance + commit hash + intervalMap<sessionId, WatcherSession>- file watcher + changed files + timeouts
Database operations now use db.transaction():
addFileChange()- Insert + count update atomicaddCommit()- Insert + count update atomicaddAIUsage()- Insert + sum update atomic
Automatic cleanup on session end:
cleanupGit(sessionId)- Stops polling + removes statecleanupWatcher(sessionId)- Closes watcher + clears timeouts + removes state
npm install -g codesession-cli@latestZero breaking changes. All existing data preserved.
- npm
- Full Changelog
- OpenClaw Skill (coming soon)
Special thanks to @billrole for extensive testing and feedback that identified many of these critical issues.
This release makes codesession-cli production-ready for concurrent multi-agent workflows.