Releases: Open-Agent-Tools/Basic-Agent-Chat-Loop
v1.6.6 - Fix Config Wizard YAML Escaping
v1.6.6 - Fix Config Wizard YAML Escaping
This patch release fixes the remaining YAML parsing error when using the configuration wizard.
Bug Fixed
- Config wizard YAML escaping: Fixed #x001b error when using
--wizardor loading wizard-generated configs- Root cause: Config wizard was writing ANSI escape codes directly to YAML without proper escaping
- Symptom:
unacceptable character #x001berror when loading .chatrc files created by the wizard - Related: This completes the fix started in v1.6.3, which only fixed the default config template
Technical Details
The wizard's _generate_yaml_with_comments() method was writing color values like:
dim: \033[2m # Wrong - actual ESC characterNow properly escapes them as:
dim: '\\033[2m' # Correct - will be decoded properlyWhat Was Fixed
- Wizard now detects ANSI codes containing
\033 - Properly escapes backslashes:
\becomes\\\\ - Wraps escaped values in quotes for YAML safety
- YAML parses correctly, decode step converts to ESC character
Testing
- All 318 tests passing
- Clean linting and type checking
- Verified YAML parsing works correctly
Recommendation
If you've experienced #x001b errors when using --wizard or loading configs, upgrade immediately:
pip install --upgrade basic-agent-chat-loopThen either run --wizard again or --reset-config to regenerate your config file.
v1.6.5 - Flexible Exit Command
v1.6.5 - Flexible Exit Command
This patch release adds flexible exit command handling to prevent common user mistakes.
New Feature
- Flexible exit commands: Now supports multiple variations for exiting the chat
exit,quit,bye(no prefix)#exit,#quit,#bye(hash prefix)/exit,/quit,/bye(slash prefix)
Why This Matters
Users often type exit out of habit (like in a terminal), but the CLI previously only recognized #exit. This caused confusion and required retyping with the correct prefix. All variations now work equivalently.
Implementation Details
- Exit command check happens before general command parsing
- Uses
lstrip('#/')to normalize input - Maintains backward compatibility with existing
#exitusage
Testing
- All 318 tests passing
- Clean linting and type checking
No upgrade required, but this improves the user experience for anyone who's accidentally typed exit instead of #exit.
v1.6.4 - Critical Performance Fix
v1.6.4 - Critical Performance Fix
This patch release fixes a critical performance bug introduced in v1.6.2 that caused session summaries to be generated after every single turn.
Bug Fixed
- Session summary generation on every turn: Fixed regression where the agent was generating AI summaries after each user query
- Root cause: After v1.6.2 refactoring,
save_conversation()always called_generate_session_summary() - Impact: Wasteful API calls, slower response times, confusing summary output in normal conversation
- Fix: Added
generate_summaryparameter (default False) tosave_conversation()
- Root cause: After v1.6.2 refactoring,
When Summaries Are Generated
Session summaries are now only generated when explicitly needed:
- ✅ On session compaction (
#compactcommand) - ✅ On final save when exiting the chat
- ❌ NOT after every query-response turn (fixed!)
Performance Improvements
- Eliminates unnecessary API calls for summary generation
- Faster response times (no summary generation delay after each turn)
- Cleaner conversation flow without spurious summaries
Testing
- All 318 tests passing
- Clean linting and type checking
Recommendation
Users experiencing slow responses or seeing summaries after every turn should upgrade immediately:
pip install --upgrade basic-agent-chat-loopThis release maintains full backward compatibility.
v1.6.3 - Critical Config Fix
v1.6.3 - Critical Config Fix
This patch release fixes a critical bug in v1.6.2 that caused YAML parsing errors when loading configuration files.
Bug Fixed
- YAML parsing error: Fixed "unacceptable character #x001b" error when loading .chatrc files
- The default config template had improperly escaped ANSI color codes
- YAML was interpreting escape sequences and creating actual ESC characters (#x001b)
- Fixed by properly double-escaping backslashes in the config template
- Config files are now valid YAML while still producing intended ANSI codes
Technical Details
- Changed ANSI codes in default template from
\033to\\033 - This ensures the file contains
\033which YAML parses as literal\033 - The decode('unicode_escape') step then converts to actual ESC characters
- All 331 tests passing
Recommendation
Users experiencing config loading errors should:
- Upgrade to v1.6.3:
pip install --upgrade basic-agent-chat-loop - Reset config if needed:
chat_loop --reset-config
This release maintains full backward compatibility with properly formatted config files.
v1.6.2 - Code Quality Improvements
v1.6.2 - Code Quality Improvements
This hotfix release includes comprehensive code quality improvements from a systematic QA review:
Code Quality Enhancements
- Eliminated ~380 lines of duplicate code through systematic refactoring
- Created 12 focused helper methods improving code organization and maintainability
- Fixed silent exception handling with proper error logging
- Improved type safety with additional type hints
- Added named constants replacing magic numbers (TOKEN_TO_WORD_RATIO, SECURE_FILE_PERMISSIONS)
- Moved lazy imports to module level for better performance
Refactored Methods
restore_session(): Reduced from 186 to 80 lines_handle_compact_command(): Reduced from 149 to 111 lines_extract_token_usage(): Reduced from 104 to 35 lines
Testing
- All 318 tests passing
- Clean linting (ruff)
- Clean type checking (mypy)
This release maintains full backward compatibility while significantly improving code maintainability and debuggability.
v1.6.1 - Incremental Autosave
🔄 Incremental Autosave
Added
- Incremental Autosave - Conversations now save automatically after each message
- Removed
auto_saveconfiguration option (feature is always enabled) - Save happens immediately after each query-response cycle
- Prevents data loss from crashes or force quits
- All conversations saved to
./.chat-sessions(project-local) - Removed manual
#savecommand (no longer needed)
- Removed
Changed
- Breaking Change: Removed
features.auto_savefrom configuration- Auto-save is now always enabled and cannot be disabled
- Updated help text to reflect always-on autosave
- Updated configuration examples and documentation
Fixed
- Test suite updated to match removed auto_save configuration
- All 318 tests passing with new autosave behavior
Full Changelog: v1.6.0...v1.6.1
v1.6.0 - Stable Release
🎉 Basic Agent Chat Loop v1.6.0 - Stable Release
This is a stable production release bringing project-local session management and improved UX.
🎯 Breaking Changes
Session Storage Now Project-Local
- Sessions now save to
./.chat-sessions/in current directory instead of global~/agent-conversations/ - Provides better context separation between different projects
- Old sessions remain accessible in
~/agent-conversations/but new sessions use project-local storage - Configuration option
paths.save_locationhas been removed
Migration Notes: If you have existing sessions in ~/agent-conversations/, they remain accessible but new sessions will be saved to ./.chat-sessions/ in your project directory. To access old sessions, you can either:
- Manually move them to
./.chat-sessions/in relevant projects - Keep them in the old location for reference (they won't be deleted)
✨ New Features
Improved #resume Command UX
#resumewithout arguments now displays available sessions instead of showing an error- Reduces friction - no need to run
#sessionsseparately first - Shows helpful usage message after session list
Context Monitoring (from beta.7)
- New
#contextcommand shows token usage and session statistics - Status bar shows context usage percentage
- Configurable warning thresholds via
context.warning_thresholdsin config - Auto-suggest
#compactcommand when approaching context limits
🛠️ Improvements
Config Wizard Updates
- Updated help text to reference new
./.chat-sessionslocation - Removed
save_locationprompts from wizard flow - All documentation updated to reflect project-local session storage
Token Tracking (from beta.7)
- Fixed AWS Strands token counting accuracy
- Proper handling of streaming response token counts
- Better aggregate token statistics
📝 What's Changed Since v1.5.1
v1.6.0-beta.8 (2025-12-30)
- fix: update config wizard help text to reference ./.chat-sessions
- feat: change session storage to project-local ./.chat-sessions
- feat: improve #resume command UX to show sessions when no arg provided
v1.6.0-beta.7 (2025-12-30)
- feat: add context usage monitoring with #context command
- feat: add configurable context warning thresholds
- feat: display context % in status bar
- fix: accurate token counting for AWS Strands agents
📦 Installation
pip install basic-agent-chat-loop==1.6.0Or upgrade from previous version:
pip install --upgrade basic-agent-chat-loop📚 Documentation
- README: View on GitHub
- Configuration Guide: docs/CONFIG.md
- Changelog: CHANGELOG.md
🙏 Thank You
Thank you to all users who tested the beta releases and provided feedback!
Full Changelog: v1.5.1...v1.6.0
v1.6.0-beta.8
What's New in v1.6.0-beta.8
🎯 Breaking Changes
Session Storage Now Project-Local (#BREAKING)
- Sessions now save to
./.chat-sessions/in current directory instead of global~/agent-conversations/ - Provides better context separation between different projects
- Old sessions remain accessible in
~/agent-conversations/but new sessions use project-local storage - Configuration option
paths.save_locationhas been removed
✨ Features
Improved #resume Command UX (#enhancement)
#resumewithout arguments now displays available sessions instead of showing an error- Reduces friction - no need to run
#sessionsseparately first - Shows helpful usage message after session list
🛠️ Fixes
Config Wizard Updates (#fix)
- Updated help text to reference new
./.chat-sessionslocation - Removed
save_locationprompts from wizard flow - All documentation updated to reflect project-local session storage
📝 Changes Since v1.6.0-beta.7
Full commit history:
- c1d7a02: fix: update config wizard help text to reference ./.chat-sessions
- 058f6ab: feat: change session storage to project-local ./.chat-sessions
- 6a29eab: feat: improve #resume command UX to show sessions when no arg provided
📦 Installation
pip install basic-agent-chat-loop==1.6.0b8⚠️ Migration Notes
If you have existing sessions in ~/agent-conversations/, they will remain accessible but new sessions will be saved to ./.chat-sessions/ in your project directory. To access old sessions, you can either:
- Manually move them to
./.chat-sessions/in relevant projects - Keep them in the old location for reference (they won't be deleted)
The new project-local approach provides better separation between different project contexts.
v1.6.0-beta.7 - Context Monitoring & Token Tracking Fix
🎯 Context Monitoring Features
Added
-
#contextCommand - Display detailed token usage statistics- Shows total, input, and output tokens with formatted display (K/M suffixes)
- Shows percentage of context used when max_tokens is known
- Displays session time and query count
- Includes configurable warning messages at threshold percentages
-
Status Bar Context Percentage - Real-time context usage display
- Example:
45.2K tokens (23%)or180.5K tokens (90%) - Dynamically formats large numbers (K for thousands, M for millions)
- Example:
-
Configurable Warning Thresholds
- Configure via
context.warning_thresholdsin.chatrc - Default thresholds:
[80, 90, 95] - Highest threshold (95%) shows error with
#compactsuggestion - Second-highest (90%) shows warning message
- Lower thresholds (80%) show informational messages
- Supports per-agent customization
- Configure via
Configuration Example
```yaml
Default configuration
context:
warning_thresholds: [80, 90, 95]
Custom per-agent
agents:
'Memory Heavy Agent':
context:
warning_thresholds: [60, 80, 90, 95] # Warn earlier
```
🐛 Bug Fixes
AWS Strands Token Accumulation Fix
- Fixed critical bug where token counts could exceed context limits
- AWS Strands
accumulated_usageis cumulative across entire session - Implemented delta calculation to track only per-query token usage
- Added
(usage_dict, is_accumulated)tuple return from_extract_token_usage() - Prevents impossible token counts (e.g., user-reported "70.6M tokens" in status bar)
📚 Documentation
- Updated CHANGELOG.md with new features and bug fix
- Added
#contextto README.md commands table - Added comprehensive context section to docs/CONFIG.md
🔗 Related Issues
- Closes #48 - Conversation compaction to manage context limits (core monitoring features)
📦 Installation
```bash
pip install --upgrade basic-agent-chat-loop==1.6.0b7
```
🧪 Testing
- ✅ All 318 tests passing
- ✅ Ruff linting passed
- ✅ Mypy type checking passed
v1.6.0-beta.6
What's Changed
Changed
- Command Prefix Update - All in-chat commands now require
#prefix to avoid collisions with regular conversation- Commands updated:
#help,#info,#compact,#sessions,#save,#copy,#resume,#clear,#quit,#exit - Template commands still use
/prefix (intentional) - Multi-line input still uses
\\(intentional) - Added helpful error message for unknown
#commands - Updated all help text and README documentation
- Commands updated:
Fixed
- Exit Command Hanging - Added explicit
sys.exit(0)to ensure clean terminal return- Fixed issue where
#exitwould show "[Process Completed]" but not return to prompt - Process now terminates cleanly and returns control immediately
- Fixed issue where
Installation
pip install basic-agent-chat-loop==1.6.0b6Full Changelog: v1.6.0-beta.5...v1.6.0-beta.6