Releases: Open-Agent-Tools/Basic-Agent-Chat-Loop
v1.7.1-beta.2 - Duplicate Output Fix
Fixed
- Duplicate Text Output - Resolved text appearing twice in terminal (streaming + final render)
- Changed
render_streaming_text()to check console object directly instead ofuse_richflag - The
use_richflag could be incorrectly set or out of sync with actual console state - Now checks if
console is not Noneas single source of truth for Rich availability - If console exists → skip streaming output (Rich will render later)
- If console is None → print streaming text (plain text mode)
- Updated
chat_loop.pyto use renderer'sshould_skip_streaming_display()method for consistency
- Changed
Technical Details
The root cause was using the use_rich flag to determine whether to skip streaming output. This flag is set during initialization and could become out of sync with the actual console object state. By checking the console object directly (self.console is not None), we ensure the decision is based on the actual availability of Rich rendering, not a potentially stale flag value.
What's Included from Previous Beta
This release also includes all fixes from v1.7.1-beta.1:
- Template command parsing bug fix
- Windows Rich console compatibility improvements
Installation
# Install the latest beta
pip install --pre basic-agent-chat-loop
# Or specify exact version
pip install basic-agent-chat-loop==1.7.1b2Testing
- All 510 unit tests passing
- Ready for Windows testing
v1.7.1-beta.10 - Clean Release (Fix Confirmed)
🎉 Beta Release 1.7.1-beta.10 - Clean Production Build
Summary
Production-ready release with confirmed fix for double-output bug. All diagnostic logging removed.
What's Fixed
- ✅ Double-output bug completely resolved (confirmed in beta.9 testing)
- ✅ Text now appears only once in final response
- ✅ No unformatted text during streaming
- ✅ Configurable stdout suppression working perfectly
Changes from beta.9
- Removed all diagnostic logging (
[DEBUG]statements) - Cleaned up imports (removed unused
sysfrom response_renderer.py) - Production-ready code with no debug output
Core Feature
- Configurable stdout suppression via
behavior.suppress_agent_stdout- Default:
true(recommended for all users) - Prevents agent libraries from printing to stdout during streaming
- Tool calls and logging remain fully functional
- Default:
Configuration
To configure via wizard:
chat_loop --wizardOr manually in .chatrc:
behavior:
suppress_agent_stdout: true # RecommendedKnown Issues
- If you see YAML parsing errors about "unacceptable character #x001b", run
chat_loop --reset-configto regenerate your config file
Installation
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b10What's Next
- Community testing and feedback
- Potential promotion to stable 1.7.1 release if no issues found
Tested and confirmed working with AWS Strands agents ✨
v1.7.1-beta.1 - Template Fix & Windows Improvements
Fixed
- Template Command Bug - Fixed template commands (/) completely failing due to incorrect argument parsing
- CommandRouter encodes template info as
name|inputusing pipe delimiter - chat_loop.py was incorrectly splitting on whitespace instead of pipe
- This caused templates like
/explain some codeto look for templateexplain|someinstead ofexplain - Now uses
CommandRouter.extract_template_info()helper method for correct parsing - All template functionality restored
- CommandRouter encodes template info as
Improved
- Windows Rich Console Support - Enhanced terminal compatibility for Windows systems
- Added
force_terminal=Trueto force Rich into terminal mode even if auto-detection fails - Added
legacy_windows=Falseto use modern Windows Terminal features - Added comprehensive debug logging for terminal capability detection
- Logs Rich Console state (is_terminal, color_system, legacy_windows)
- Addresses potential duplicate output issues on Windows terminals
- Added
Technical Details
The template command bug was a simple but critical parsing error. The CommandRouter properly encodes template name and input as a pipe-delimited string (name|input), but the chat loop was splitting on whitespace instead of using the existing extract_template_info() helper.
The Windows improvements add better terminal detection and logging to help diagnose why Rich markdown rendering might show duplicate output on Windows systems.
Installation
# Install the beta release
pip install --pre basic-agent-chat-loop
# Or specify exact version
pip install basic-agent-chat-loop==1.7.1b1Testing
- All 510 unit tests passing
- Verified on macOS, ready for Windows testing
v1.7.0 - Internal Refactoring & Code Quality
What's Changed
Internal Refactoring - Code Quality Improvements
This release focuses on internal code quality with no user-facing changes. All features work exactly as before, but the codebase is now significantly cleaner and more maintainable.
Major Refactoring:
-
✅ SessionState Component - Centralized session management
- Replaced 8 scattered instance variables with single cohesive component
- Single source of truth for query count, conversation history, timing, and accumulated usage
- Cleaner delta calculation for AWS Strands cumulative token tracking
-
✅ CommandRouter Component - Type-safe command parsing
- Replaced 330+ lines of manual string parsing with enum-based routing
- All commands now use
CommandTypeenum for type safety - Easier to add new commands and maintain existing ones
- Better separation of command parsing from command handling
Quality Metrics:
- 510 tests passing (100% pass rate)
- 100% mypy type coverage
- Ruff linting compliant
- chat_loop.py reduced from 3,188 to 2,948 lines (-240 lines)
Components Extracted:
- StreamingEventParser - Event parsing logic
- ResponseRenderer - Response formatting and display
- UsageExtractor - Token/metadata extraction
- CommandRouter - Command parsing and routing
- SessionState - Session state management
Full Changelog
See CHANGELOG.md for complete version history.
v1.6.12 - Visual Separator Fix
🐛 Bug Fix
Fixed Visual Separator Display
- Fixed visual separator to show for all streaming agents - Not just Harmony agents
- Changed condition from checking
harmony_processorto checkingfirst_token_received - Separator now appears for Claude Sonnet 4.5 and all other streaming models
- Previous version (1.6.11) only showed separator for Harmony agents
What Changed
The green "─── Final Response ───" separator now appears before the final response for all agents when streaming occurs, providing better visual distinction between processing and the final answer.
Affected Users: Anyone using non-Harmony agents (like Claude Sonnet 4.5, Claude Opus, etc.) will now see the visual separator that was missing in v1.6.11.
All 318 tests passing.
Full Changelog: v1.6.11...v1.6.12
🚀 Installation
```bash
pip install --upgrade basic-agent-chat-loop
```
or with uv:
```bash
uv pip install --upgrade basic-agent-chat-loop
```
v1.6.11 - Harmony Display Improvements
🐛 Bug Fixes
Fixed Duplicate Final Response Display
- Fixed duplicate output when using HarmonyProcessor - Responses no longer display both raw and processed versions
- Root cause: Streaming display was not accounting for Harmony post-processing that extracts only the "final" channel
- Solution: Skip streaming display when Harmony will transform the output, ensuring single display of processed response
- All 318 tests passing
✨ Enhancements
Visual Separator for Final Responses
- Added green "─── Final Response ───" separator before final responses in Harmony mode
- Only appears when thinking/reasoning is hidden (default mode)
- Provides clear visual distinction between processing and final output
- Improves UX by making it obvious when the actual answer begins
🧹 Maintenance
- Code cleanup: linting, formatting, and type checking
- Fixed ruff line length violations
- All linting checks passing
- Mypy type checking passing (18 source files)
📦 What's Changed
Full Changelog: v1.6.10...v1.6.11
🚀 Installation
```bash
pip install --upgrade basic-agent-chat-loop
```
or with uv:
```bash
uv pip install --upgrade basic-agent-chat-loop
```
v1.6.10 - Fix Duplicate Response Display
What's Fixed
Critical Bug Fix: Eliminates duplicate agent response display during conversations
The Issue
Agent responses were appearing twice in the terminal:
- First as raw text (streaming output)
- Then as formatted markdown (final render)
This affected ALL agent responses, causing confusing double-display of every message.
Root Cause
Complex conditional logic in the response rendering code (chat_loop.py:2096-2109) could allow both the streaming print loop AND the final render to execute in certain edge cases, particularly:
- When rich markdown rendering was enabled
- During streaming responses
- With specific configuration combinations
The previous logic relied on nested if/elif conditions that could be bypassed:
if self.use_rich and display_text.strip() and self.console:
# Rich markdown
print markdown
elif not self.use_rich and response_text:
if not first_token_received:
# Plain text
print plain textThe Fix
Introduced explicit tracking flag to guarantee single display:
# Track if already printed during streaming
already_printed_streaming = first_token_received and not self.use_rich
# Render final response (only if not already printed)
if not already_printed_streaming:
if self.use_rich:
print markdown
else:
print plain textThis ensures:
✅ Streaming with rich disabled: prints during stream, skips final render
✅ Streaming with rich enabled: skips stream print, renders markdown once at end
✅ Non-streaming: renders once at end (rich or plain)
✅ All edge cases: explicit flag prevents any double-rendering
Testing
- All 318 tests passing
- Verified single display across all combinations:
- Streaming + rich enabled
- Streaming + rich disabled
- Non-streaming + rich enabled
- Non-streaming + rich disabled
Installation:
pip install --upgrade basic-agent-chat-loopVerify version:
pip show basic-agent-chat-loop | grep Version
# Should show: Version: 1.6.10🤖 Generated with Claude Code
v1.6.9 - Fix Duplicate Startup Display
What's Fixed
Critical Bug Fix: Eliminates duplicate banner and agent initialization messages during startup with --resume flag
The Issue
When starting the chat loop with --resume flag, the banner (including agent metadata, tool loading, and initialization messages) was displayed twice:
- First display on initial startup
- Second display after successful session resumption
This caused duplicate messages like:
- "loaded .env ..."
- "Loaded system prompt..."
- "Tool Loading Summary ..."
- "Tools: X available"
Root Cause
The startup flow at chat_loop.py:2350-2408 unconditionally displayed the banner first, then if resume succeeded, displayed it again with the comment "Clear and redisplay banner after resume" - but the clear never happened.
The Fix
- Banner now displays only once during startup
- When
--resumeis specified:- Initial banner display is skipped (line 2352-2353)
- Banner displays after resume completes (success or failure)
- When
--resumeis NOT specified:- Banner displays immediately as before
Test Coverage
All scenarios now properly display banner exactly once:
✅ Normal startup (no --resume)
✅ Resume with picker (--resume or --resume pick)
✅ Resume with specific session ID (--resume )
✅ Resume failed/cancelled
✅ No sessions found
Testing:
- All 318 tests passing
- Verified single banner display in all code paths
Installation:
pip install --upgrade basic-agent-chat-loopVerify version:
pip show basic-agent-chat-loop | grep Version
# Should show: Version: 1.6.9🤖 Generated with Claude Code
v1.6.8 - Restore Template Functionality
What's Fixed
Critical Bug Fix: Restores template functionality that was broken in v1.6.5
The Issue
Template commands (e.g., /bugfix, /improve, /review) stopped working after v1.6.5 introduced flexible exit commands with / prefix support.
Root Cause
The v1.6.5 change made the command parser treat / as a command prefix (like #), which prevented the template handler from ever receiving /-prefixed input.
The Fix
- Command parsing now only recognizes
#prefix for commands /prefix is exclusively reserved for templates- Exit commands still work with or without prefix:
exit,quit,bye,#exit,#quit,#bye
What Works Now
✅ Template commands: /bugfix, /improve, /review, etc.
✅ Hash commands: #help, #info, #templates, #exit, etc.
✅ Plain exit: exit, quit, bye
Testing
- All 318 tests passing
- Template loading verified working
Installation:
pip install --upgrade basic-agent-chat-loopVerify version:
pip show basic-agent-chat-loop | grep Version
# Should show: Version: 1.6.8🤖 Generated with Claude Code
v1.6.7 - Fix Spurious Warning Message
v1.6.7 - Fix Spurious Warning Message
This patch release fixes a confusing warning message that appeared after every turn in v1.6.4+.
Bug Fixed
- Spurious warning after each turn: Fixed "Summary generation failed - session cannot be resumed" appearing after every query
- Root cause: The warning was shown whenever no summary existed, but v1.6.4 intentionally skips summary generation on incremental saves
- Symptom: Confusing false-positive warning after every turn saying session cannot be resumed
- Related: Side effect of v1.6.4's fix to prevent unnecessary summary generation
What Was Wrong
After v1.6.4 added generate_summary=False by default for incremental saves, the code showed a warning whenever summary is None. But since incremental saves intentionally don't generate summaries, this warning appeared on every turn even though nothing was wrong.
The Fix
Only show the warning when we actually tried to generate a summary but it failed:
elif generate_summary:
# Only warn if we tried to generate a summary but it failed
logger.warning("Session saved without summary - resume will not work")Result
- Incremental saves (after each turn): ✅ No warning (as intended)
- Final save/compaction:
⚠️ Only warns if summary generation actually fails
Testing
- All 318 tests passing
- Clean linting and type checking
This eliminates the annoying false-positive warning while preserving the useful warning for actual failures.