Releases: Open-Agent-Tools/Basic-Agent-Chat-Loop
v1.7.2 - Critical Hotfix: Interactive Tool Prompts
🚨 Version 1.7.2 - Critical Hotfix
Critical Bug Fix
Fixed interactive tool prompts not displaying (CRUD confirmations, Y/n prompts)
Issue in 1.7.1
The stdout suppression feature (introduced to fix double-output) was hiding interactive tool prompts from BOAT/COAT tools. Users couldn't see what they were confirming when tools asked for permission.
Root Cause
- Stdout suppression happens during agent execution (between event iterations)
- Tool calls execute during that window
- Tool confirmation prompts (
"Delete file? Y/n: ") were suppressed input()still worked, but users couldn't see the question
Solution
Changed suppress_agent_stdout default from true to false
- Interactive tools now work correctly by default
- Users experiencing double-output can opt-in to suppression
- Added warnings about the trade-off
Configuration
Default Behavior (Recommended)
behavior:
suppress_agent_stdout: false # Interactive tools work (default)For Users Experiencing Double-Output
Only enable if:
- You experience double-output (text appearing twice)
- AND your agent doesn't use interactive tools (CRUD confirmations)
behavior:
suppress_agent_stdout: true # Fixes double-output but hides tool promptsWho Should Upgrade
✅ Upgrade Immediately If:
- You use agents with CRUD/file operation tools
- You use BOAT/COAT tools with confirmations
- You experienced missing Y/n prompts in 1.7.1
⚠️ Consider Staying on 1.7.1 If:
- You experience double-output
- AND you don't use any interactive tools
- You can manually set
suppress_agent_stdout: truein your config
Installation
pip install --upgrade basic-agent-chat-loopFor Existing 1.7.1 Users
Quick Fix Without Upgrading
Edit your ~/.chatrc:
behavior:
suppress_agent_stdout: false # Restore tool promptsAfter Upgrading
If you reset your config or run the wizard, the new default (false) will be applied automatically.
Testing
After upgrading, test with an agent that has CRUD tools:
- Try to delete/edit a file
- You should see the confirmation prompt:
"Delete file? Y/n: " - You can answer and see the result
Technical Details
Why This Happens
Stdout suppression wraps the entire async event loop to prevent the Strands library from printing accumulated text. However, this also catches any output from tools executing within the agent's processing window.
Trade-offs
- suppression disabled (new default): Interactive tools work, but some users may see double-output
- suppression enabled: No double-output, but interactive tool prompts are hidden
We chose interactive tools as the default because:
- Hidden prompts break functionality silently
- Double-output is annoying but doesn't break features
- Fewer users experience double-output than use interactive tools
Changes Since 1.7.1
- Changed
suppress_agent_stdoutdefault fromtruetofalse - Added warnings to config template
- Enhanced wizard help text with trade-off explanation
- Updated documentation
Apologies for the inconvenience - this hotfix restores expected behavior for interactive tools. Thank you for reporting the issue!
v1.7.1 - Stable Release: Double-Output Fix + Load Template
🎉 Version 1.7.1 - Stable Release
Major Bug Fix
Fixed double-output bug where text appeared twice in the terminal (unformatted during streaming, then formatted at the end).
Root Cause
After extensive diagnostic work across beta.6-8, we discovered that AWS Strands and similar agent libraries print accumulated response text to stdout during async generator execution. This caused text to appear twice when using Rich markdown formatting.
Solution
- Configurable stdout suppression during streaming (
behavior.suppress_agent_stdout) - Suppression only active during yield back to stream_async (between iterations)
- Stdout restored during event processing so tool calls and logging work normally
- Enabled by default for clean output
New Feature
New /load template for loading markdown files into context
- Loads all .md files from a directory (non-recursive)
- Usage:
/load(current dir) or/load path/to/dir - Automatically created in
~/.prompts/on first run
Default Templates (Now 7)
/explain- Explain code/review- Code review/debug- Debug help/optimize- Optimize code/test- Write tests/document- Add documentation/load- NEW - Load markdown files
Configuration
Stdout suppression is enabled by default. To configure:
behavior:
suppress_agent_stdout: true # Recommended (default)Or use the wizard:
chat_loop --wizardInstallation
# Stable release (recommended)
pip install --upgrade basic-agent-chat-loop
# Or specific version
pip install basic-agent-chat-loop==1.7.1Upgrading from Beta
If you were on any 1.7.1-beta version:
- Upgrade:
pip install --upgrade basic-agent-chat-loop - If you see YAML config errors, reset:
chat_loop --reset-config - Test with your agent - no more double output!
Changes Since 1.7.0
- Fixed double-output bug with configurable stdout suppression
- Added
/loadtemplate for loading markdown files - Improved code quality (linting fixes)
- Enhanced default configuration
Testing Status
- ✅ Confirmed working with AWS Strands agents
- ✅ Tool calls and logging fully functional
- ✅ Rich markdown rendering working perfectly
- ✅ No more duplicate output
Known Issues
None - this is a stable, production-ready release!
Thank you to everyone who helped test the beta versions and report issues! 🙏
v1.7.1-beta.11 - Add /load Template
✨ Beta Release 1.7.1-beta.11 - New Load Template
New Feature
- New
/loadtemplate for loading markdown files into context- Loads all .md files from specified directory (non-recursive)
- Default to current directory if no path specified
- Validates directory exists
- Provides summary of loaded files
Usage Examples
# Load markdown files from current directory
/load
# Load from specific directory
/load docs/
/load ~/my-notes/Default Templates (Now 7)
/explain- Explain code/review- Code review/debug- Debug help/optimize- Optimize code/test- Write tests/document- Add documentation/load- NEW - Load markdown files
Previous Fixes (Still Included)
- ✅ Double-output bug fixed
- ✅ Configurable stdout suppression
- ✅ Clean output with no debug spam
Installation
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b11Note for Existing Users
The new /load template will be automatically created in ~/.prompts/ when you run chat_loop. If you already have templates, the new one will be added alongside your existing ones.
View all templates with:
#templatesv1.7.1-beta.9 - Configurable Stdout Suppression
🔧 Beta Release 1.7.1-beta.9
Bug Fixes
- Fixed double-output bug where text appeared twice (unformatted then formatted)
- Added configurable stdout suppression to prevent agent libraries from printing during streaming
New Features
- New config option:
behavior.suppress_agent_stdout(default:true)- Prevents double-output from agent libraries that print to stdout during streaming
- Configurable via wizard or manual .chatrc editing
- Updated wizard with new "Suppress agent library streaming output?" prompt
Technical Details
- Root cause identified through diagnostic builds (beta.6-8): AWS Strands library prints accumulated response text during async generator execution
- Solution: Conditionally suppress stdout only during yield back to stream_async, restore during event processing
- Tool calls and logging remain fully functional
How to Disable (if needed)
If you want to see the raw agent library output:
behavior:
suppress_agent_stdout: falseOr run chat_loop --wizard and answer "no" to the suppression prompt.
Installation
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b9What's Next
- Testing with real-world usage
- Potential final release once confirmed stable
v1.7.1-beta.8 - Event Loop Boundary Diagnostics
🎯 Final Diagnostic Layer - Async Event Loop Boundaries
This release adds the final layer of diagnostic logging to pinpoint exactly where the mystery text is being printed during streaming.
What's New
- Event Loop Entry/Exit Logging: Shows when we enter and exit the async for loop
- Event Receive Logging: Shows exactly when events arrive from stream_async
- Iteration Boundary Logging: Shows when we're about to yield back to the async generator
Complete Diagnostic Flow
You'll now see a complete trace of the async event loop:
[DEBUG] MAIN LOOP: Starting stream_async iteration
[DEBUG] MAIN LOOP: Received event from stream_async
[DEBUG] STREAM LOOP: Got text chunk, length=11
[DEBUG] STREAM LOOP: About to call render_streaming_text()
[DEBUG] render_streaming_text called:
[DEBUG] ACTION: SKIPPING (buffering mode)
[DEBUG] STREAM LOOP: Returned from render_streaming_text()
[DEBUG] MAIN LOOP: End of iteration, about to yield back to stream_async
If text appears between "End of iteration" and "Received event", it's being printed BY the stream_async generator itself (i.e., the Strands library or agent code).
Installation
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b8This will definitively show us where the ghost print is coming from!
v1.7.1-beta.7 - Enhanced Stream Loop Diagnostics
🔍 Enhanced Diagnostic Build - Pinpoint Text Output Source
This beta adds even more diagnostic output to identify exactly where the mystery text is being printed during streaming.
What's New
- Stream Loop Diagnostics: Logs before/after each
render_streaming_text()call - Text Chunk Tracking: Shows when text chunks are received from the agent
- Execution Flow Visibility: See the exact sequence of calls in the streaming loop
Debug Output You'll See
[DEBUG] STREAM LOOP: Got text chunk, length=11
[DEBUG] STREAM LOOP: About to call render_streaming_text()
[DEBUG] render_streaming_text called:
[DEBUG] output_state: buffering
[DEBUG] ACTION: SKIPPING (buffering mode)
[DEBUG] STREAM LOOP: Returned from render_streaming_text()
This will help us identify if text is being printed:
- Before calling
render_streaming_text() - During the call (shouldn't happen since it's skipping)
- After the call returns
- From somewhere else entirely
Installation
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b7What to Report
When you see double output, please share ALL the [DEBUG] lines showing the complete sequence of what's happening.
Thank you for your patience as we track down this elusive bug!
v1.7.1-beta.6 - Diagnostic Build for Double-Output Bug
🔍 Diagnostic Build - Help Us Fix Double-Output Bug
This is a special diagnostic release to help identify the root cause of the double-output bug that persists even after running the config wizard.
What's New
- Extensive Debug Logging: Adds stderr logging to trace exactly what's happening during response rendering
- OutputState Tracking: Shows whether the system thinks it should buffer or stream
- Rendering Path Visibility: Logs which rendering method is being used (streaming vs final)
If You're Seeing Double Output
Please install this version and run your chat session:
pip install --upgrade --pre basic-agent-chat-loop==1.7.1b6The debug output will appear in your terminal showing:
[DEBUG] render_streaming_text called:- Shows if streaming text is being rendered[DEBUG] render_final_response called:- Shows if final response is being rendered- OutputState values (STREAMING vs BUFFERING)
- Console and harmony processor status
What to Report
When you see double output, please capture and share:
- The
[DEBUG]lines from stderr (they'll be visible in your terminal) - Which wizard option you selected ("streaming", "rich", or "auto")
- Whether you saw any warning about both Rich and Harmony being enabled
This diagnostic information will help us pinpoint exactly where the double rendering is happening.
Previous Beta Releases
- v1.7.1-beta.5: Added defensive check for legacy configs
- v1.7.1-beta.4: Simplified wizard to prevent new bad configs
- v1.7.1-beta.3: Component extraction refactoring
Thank you for helping us track down this bug!
v1.7.1-beta.5 - Fix Double-Output for Legacy Configs
🐛 Bug Fix: Double-Output from Legacy Configs
This release fixes the persistent double-output issue for users with existing configuration files that have both Rich and Harmony enabled.
What Was Fixed
- Root Cause: Users who upgraded from older versions had config files with BOTH
features.rich_enabled: trueANDharmony.enabled: true, causing text to appear twice (unformatted then formatted) - Solution: Added defensive runtime check that detects this condition and automatically disables Rich to prevent duplication
- User Guidance: Users with legacy configs now see a helpful warning message directing them to run
chat --wizardto update their configuration
Changes in This Release
- fix: prevent double-output from legacy configs with both Rich and Harmony enabled (#aa1381d)
- chore: run ruff formatting for release (#4c90639)
For Users Experiencing Double-Output
If you're still seeing text appear twice in your terminal:
- Run
chat --wizardto reconfigure your display settings - Choose one of the new unified display modes:
streaming: Plain text output, no formattingrich: Rich markdown formatting onlyauto: Auto-detect Harmony agents, otherwise use Rich (recommended)
Previous Beta Releases
- v1.7.1-beta.4: Simplified config wizard to prevent new bad configs
- v1.7.1-beta.3: Component extraction refactoring (42% code reduction)
This release complements the wizard fix in beta.4 by handling existing user configurations, ensuring all users get correct single-output behavior.
Install via: pip install basic-agent-chat-loop==1.7.1b5
v1.7.1-beta.4 - Wizard Fix & Architecture
🔧 Config Wizard Fix + Architecture Improvements
This beta release fixes the config wizard to prevent users from accidentally creating configurations that cause double-output issues.
🎯 Primary Fix: Simplified Config Wizard
Before: Separate confusing questions for Rich and Harmony
After: Single unified display mode choice:
streaming- Plain text output, no formatting (fastest)rich- Rich markdown formatting with syntax highlightingauto- Auto-detect Harmony agents, fallback to Rich (recommended)
This prevents users from accidentally enabling both Rich AND Harmony simultaneously, which was causing text to appear twice (unformatted, then formatted).
✨ Architecture Improvements (from beta.3)
Major component extraction (42% code reduction):
- ResponseStreamer (454 lines) - Agent interaction lifecycle
- SessionRestorer (567 lines) - Session loading & restoration
- SessionPersister (463 lines) - Session saving & compaction
- InputHandler (247 lines) - Multi-line input utilities
🔍 Technical Details
OutputState Pattern:
- Single source of truth for rendering behavior
- Prevents double-output in all scenarios
- Clean separation: streaming display vs. final rendering
Config Mapping:
# streaming mode
features:
rich_enabled: false
harmony:
enabled: false
# rich mode
features:
rich_enabled: true
harmony:
enabled: false
# auto mode (recommended)
features:
rich_enabled: true
harmony:
enabled: null # auto-detect🧪 Testing
- ✓ 510 tests passing
- ✓ All 4 scenarios produce exactly 1 output (verified)
- ✓ No mode enables both Rich AND Harmony simultaneously
📦 What's Included
- Config wizard simplification
- OutputState enum pattern
- 4 extracted components for better maintainability
- Code formatting improvements
Full Changelog: v1.7.1-beta.3...v1.7.1-beta.4
v1.7.1-beta.3 - Major Refactoring & Code Quality
🏗️ Major Architectural Refactoring
This beta release represents a significant code quality improvement with a 42% reduction in chat_loop.py complexity through component extraction.
✨ New Components (1,731 lines extracted)
- ResponseStreamer (454 lines) - Agent interaction lifecycle management
- SessionRestorer (567 lines) - Session loading and restoration
- SessionPersister (463 lines) - Session saving and compaction
- InputHandler (247 lines) - Multi-line input utilities with ESC/arrow key support
🎯 Key Improvements
- Reduced chat_loop.py from 2,963 to 1,710 lines (42.3% reduction)
- Fixed terminal double-output bug with OutputState enum pattern
- Improved separation of concerns and testability
- Enhanced code maintainability through focused components
🔧 Code Quality
- Applied consistent code formatting
- Removed unused imports
- All 510 tests passing
📦 Components Created
Each component is now independently testable with clear responsibilities:
- Input handling → Streaming → Rendering → Persistence
🧪 Testing
- ✓ 510 tests passing
- ✓ 13 tests skipped (expected)
- ✓ No regressions introduced
Full Changelog: v1.7.1-beta.2...v1.7.1-beta.3