Skip to content
← All casesMeta-Agent PatternAI

Agents Managing Agents

Agent Manager (Electron + Win32) + Buddy System (hooks) — context recovery in 10 sec, forced alternatives analysis

Problem

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.

Solution

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.

Challenges

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.

Role

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).

Demo

How it looks

Screenshots

Real screenshots

Architecture

System architecture

Electron AppSession ScannerWin32 API (clipboard)WMI QueriesUI (Ctrl+Shift+1-9)state.jsonClaude Code HooksPostToolUse -> state.jsonUserPromptSubmit -> AmplifierUserPromptSubmit -> KeeperscanssyncinjectinjectinjectClaude Sessionsorbit-tecmapprag-kgpulseAI/LLMDataInfraEval
Implementation

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.

Architecture Decision

Why this way

Hooks instead of System Prompt for amplification

Alternative

Add 'analyze alternatives' instruction to CLAUDE.md

Why it didn't fit

Prompt instructions degrade after 5-10 requests. UserPromptSubmit hook injects forcefully every time — impossible to forget.

Result

Stable critical thinking throughout the entire session

Metrics

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
Business Impact

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.

Methods

Algorithms & patterns

FSM (state machine)Claude Code HooksWin32 APIWMI queriesFile-based memory
Stack

Technologies

  • Electron
  • Win32 API
  • PowerShell
  • Claude Code Hooks
  • Web Audio API

Ready to discuss?

If you need an architect who builds autonomous AI systems — reach out.

Serbia-based · CET/CEST timezone · EU-aligned working hours · International contracts experience