Active
A Collaboration Story
CLI Quality
Through Teamwork
How Diego & Samuel used Amplifier to identify, debug, review, and fix CLI issues — improving the entire stack
January 28-30, 2026 · amplifier-app-cli & amplifier-foundation
Chapter 1
Something's Wrong
After updating Amplifier, strange errors appeared — but only on first run.
⚠ Partial provider failure: 2/3 loaded.
Failed: {'provider-anthropic', 'provider-azure-openai', 'provider-gemini'}
Loaded: ['anthropic', 'gemini']
Session continuing with available providers
(self-healing NOT triggered for partial failure)
# But after quitting and restarting...
✓ All providers loaded successfully
# The bug was transient — and that made it harder to catch
The error went away on restart — a classic sign of stale state
What We Found
Four Interconnected Bugs
🔴 Bug #1: Stale Install-State
After uv tool install --force, install-state.json claims modules are installed but Python dependencies are missing.
Discovered by: Samuel · PR #61
🔴 Bug #2: Activator Unwrapping
Self-healing couldn't find the activator — it was hidden inside a wrapped resolver class.
Discovered by: Diego (building on Samuel's PR #70)
🔴 Bug #3: Provider Naming Mismatch
Configured providers tracked by module ID (provider-anthropic) but loaded tracked by name (anthropic).
Found during shadow testing
🔴 Bug #4: Git URL Parsing
Branch names with slashes (feat/deep-research) broke URL parsing in foundation.
Foundation issue #15 · Fixed by Diego
Samuel's Work
Building On Shoulders
PR #61
Self-healing for stale install state
MERGED
PR #69
Correct install-state.json path in reset
MERGED
PR #70
Unwrap AppModuleResolver to find activator
MERGED
The Key Insight
"The kernel intentionally swallows module load errors to be resilient, which means sessions are created successfully but with no providers mounted."
— Samuel's commit a725eff
Samuel identified the root cause and built the foundation for self-healing. Diego's work extended and completed it.
Chapter 2
The Unwrapping Accomplishment
AppModuleResolver wraps BundleModuleResolver — and hides the activator.
# The Problem: Activator not found
activator = getattr(resolver, "_activator", None)
↓ Returns None! Activator is hidden
# The Fix: Unwrap first
bundle_resolver = getattr(resolver, "_bundle", resolver)
activator = getattr(bundle_resolver, "_activator", None)
↓ Now we find it!
Why This Matters
AppModuleResolver
No _activator here!
↓ wraps
BundleModuleResolver
_activator lives here ✓
Without unwrapping, self-healing couldn't reinstall failed modules because it couldn't find the activator to call.
The Review
Samuel's Code Review Catches Bug
Samuel Lee
reviewed Diego's PR #71
"Issue: --provider CLI flag becomes blocked.
The check_first_run() call happens before the --provider CLI override is processed. With this PR, users will be blocked even when they explicitly specify --provider."
# This would be blocked with PR changes:
amplifier run --provider anthropic "hello"
Error: No provider configured. Run 'amplifier init'
# Samuel's suggested fix:
Skip init check when --provider is explicitly specified
Code review caught a regression before it shipped
Analysis
Comparing Approaches
| Aspect |
Samuel's PR #70 |
Diego's Fix |
| Approach |
One-liner unwrap |
Try direct first, then unwrap |
| Files Changed |
session_runner.py |
session_runner.py + session_spawner.py |
| Addresses spawner bug? |
✘ No |
✓ Yes |
| Conservative self-healing? |
✘ No |
✓ Yes |
Result: Samuel's elegant one-liner inspired the fix, Diego's version addressed both problems
Building on each other's work → better outcome for everyone
Chapter 3
Amplifier as Debug Partner
Using the tool to debug the tool.
Agent Delegation
# Diego's debugging commands:
task(agent="foundation:bug-hunter")
"Investigate transient provider loading failure..."
task(agent="amplifier:amplifier-expert")
"Explain the provider loading flow..."
task(agent="foundation:explorer")
"Find where _activator is set..."
Shadow Environment
Bug Successfully Reproduced! 🐛
Shadow Environment ID: install-state-fix-test
# Isolated reproduction without breaking main session
amplifier-shadow exec install-state-fix-test
"grep -r 'Partial provider failure' ..."
✓ Bug confirmed in isolation
✓ Fix tested safely
Multi-agent debugging: bug-hunter investigates,
shadow-operator reproduces,
git-ops manages PRs
Chapter 4
Fixing the Foundation
CLI debugging revealed a deeper bug in amplifier-foundation.
The Foundation Bug
# This worked:
git+https://github.com/user/repo@main
# This failed:
git+https://github.com/user/repo@feat/deep-research
404 Not Found
# Root cause: regex [^/]+ rejected slashes
PR #45 · amplifier-foundation · MERGED
The Fix
resolution.py line 225
match = re.match(r"([^/]+)$", path)
↓
_GIT_REF_PATTERN = re.compile(r"(.+)$")
match = _GIT_REF_PATTERN.match(path)
Improvements:
- Allows slashes in branch names
- Precompiled regex for performance
- 3 regression tests added
Lessons Learned
Anti-Patterns Discovered
🔄
Inline Regex
Don't use re.match() inline — creates regex object on every call. Precompile instead.
Fixed in foundation PR #45
🏷️
ID vs Name Mismatch
Configured providers tracked by module ID, loaded by name. Use consistent naming across the system.
Fixed in CLI PR #71
📦
Wrapper Classes
Always check if classes wrap underlying implementations. The thing you need might be hidden inside.
Unwrapping pattern now documented
These discoveries improved core instructions and coding anti-patterns documentation
The Journey
Debugging Timeline
Jan 28 AM — Error discovered
"Partial provider failure" after update
Jan 28 — Samuel's PRs found
PR #61, #69, #70 addressing related issues
Jan 28 — Shadow reproduction
Bug isolated in shadow environment
Jan 28 — Unwrapping discovered
AppModuleResolver wraps BundleModuleResolver
Jan 29 — Code review from Samuel
--provider flag regression caught
Jan 30 — Foundation bug found
Git URL parsing with slashes broken
Jan 30 — PR #45 merged
Foundation fix with 258 tests passing
Results
Pull Requests Created
Conservative self-healing & init check
init.py · run.py · session_runner.py · session_spawner.py
amplifier-foundation
PR #45
MERGED
Allow slashes in branch names
resolution.py · test_paths.py
By The Numbers
Collaborative Debugging
1
code review that caught regression
The Pattern
How We Worked Together
🐛
Bug Discovered
Real-world error
→
🔍
Check Team's Work
Samuel's PRs found
↓
🧪
Shadow Testing
Isolated reproduction
→
🤖
Agent Analysis
bug-hunter, explorer
↓
📝
PR + Code Review
Catches regressions
→
Success Factors
What Made This Work
Human Collaboration
- Building on each other's work — Samuel's PRs were the foundation
- Code review as partnership — catching issues before they shipped
- Shared context via GitHub — commits, PRs, comments
- No ego — best solution wins regardless of author
Amplifier Assistance
- Agent delegation — bug-hunter for investigation
- Shadow environments — safe reproduction & testing
- Codebase exploration — finding the unwrapping pattern
- Git operations — syncing forks, creating PRs
Human insight + AI assistance = Faster, better fixes
Neither alone would have been as effective
The Takeaway
Better Together
Diego built on Samuel's discoveries. Samuel's review caught Diego's regression.
Amplifier helped both investigate and test.
Samuel
Foundation layer
+
Diego
Extension & completion
+
🤖
Amplifier
Investigation & testing
CLI quality improved. Foundation strengthened. Team collaboration proven.
Transparency
Sources & Methodology
Data As Of
February 20, 2026
Primary Repositories
ramparte/amplifier-app-cli — ~89 commits, 27,877 lines Python
microsoft/amplifier-foundation — PR #45 merged
Research Methods
Git log analysis of amplifier-app-cli (~89 commits). Contributor analysis: Brian Krabach (597 commits), Diego Colombo (19), Marc Goodner (12), Samuel Lee (6), Bryce Cutt (2). Line count analysis (27,877 lines Python). PR review of #61, #69, #70, #71 (CLI) and #45 (foundation).
Story Contributors
Diego Colombo — Bug investigation, shadow testing, PRs #71 (CLI) & #45 (foundation)
Samuel Lee — Foundation PRs #61, #69, #70 (CLI); code review of PR #71
Known Gaps
Exact bug discovery timestamps are from session narrative reconstruction, not git timestamps. Story covers January 28-30, 2026 timeframe. First repo commit: 2025-10-08; last commit: 2026-02-11.
Explore
See More Stories
Discover how teams across the Amplifier ecosystem build, debug, and collaborate.
More Amplifier Stories