Agents Managing Agents
Agent Manager (Electron + Win32) + Buddy System (hooks) — context recovery in 10 sec, forced alternatives analysis
What doesn't work
Working with 5+ parallel AI agents, each switch costs 10 minutes to 'remember what was happening.' Hasty decisions without analyzing alternatives lead to rollbacks. 30% of time goes to context recovery.
Architectural approach
Agent Manager (Electron + Win32 API): monitors all Claude sessions, instant switching (Ctrl+Shift+1–9), conversation previews, notifications. Buddy System: auto context recap on task return + Thinking Amplifier before every decision.
What made it hard
Win32 API from JavaScript — undocumented territory: clipboard injection only works with specific window focus, WMI queries hang when no Claude processes are running. Claude Code hooks system has no official documentation for complex scenarios — had to explore behavior experimentally. Synchronizing state.json between parallel sessions without race conditions.
My role & contribution
Architect & sole developer
Designed and built from scratch: Agent Manager on Electron with Win32 API (clipboard injection, WMI process queries, session scanning), Buddy System (4 hooks: PostToolUse updates state.json, UserPromptSubmit injects Thinking Amplifier — forced alternatives analysis before every decision, Context Keeper — auto-recap on task return).
How it looks
Real screenshots
System architecture
How it works
Agent Manager: scans ~/.claude/tasks/ for session detection, WMI queries for processes, clipboard injection via Win32 API for Quick Reply. Buddy: PostToolUse hooks update state.json, UserPromptSubmit hooks inject recap/amplifier.
Why this way
Hooks instead of System Prompt for amplification
Add 'analyze alternatives' instruction to CLAUDE.md
Prompt instructions degrade after 5-10 requests. UserPromptSubmit hook injects forcefully every time — impossible to forget.
Stable critical thinking throughout the entire session
Results
- 01
- Context: 10 min → 10 sec (auto-recap)
- 02
- Thinking Amplifier: forced alternatives analysis before every decision
- 03
- 9+ parallel agents under control
- 04
- 104 documented sessions
- 05
- 20+ skills, 4 hooks per event
Impact on business
Context recovery: from ~10 min to ~10 sec. At 10+ switches/day — saves ~1.5h daily. Thinking Amplifier: UserPromptSubmit hook injects forced alternatives analysis before every decision — the agent cannot skip it, unlike prompt instructions that degrade over time.
Algorithms & patterns
Technologies
- Electron
- Win32 API
- PowerShell
- Claude Code Hooks
- Web Audio API