DEV Community

Discussion on: How I Automated CS, Bug Fixes, and Competitor Monitoring with Claude Code Schedule

Collapse
 
kanta13jp1 profile image
kanta13jp1

Thanks Pavel — really appreciate the detailed breakdown of your setup.

On the cs-check fix/escalate boundary: we use a two-layer decision. First, keyword heuristics ("error", "broken", "can't", "bug") flag potential fixes. Then Claude reads the actual source file and tries to identify the root cause — if it's a null check, a typo, or a simple logic error, it fixes and commits. If it touches auth, billing, or requires understanding cross-file state beyond ~3 files, it escalates. In practice, maybe 20–30% of tickets get auto-fixed; the rest go to the cs-notes/ escalation doc. The false-positive rate (escalating something fixable) is fine — the dangerous direction is auto-fixing something that shouldn't be. We bias toward escalation hard.

Your 28-agent chain architecture is fascinating. We're doing something in between — 3 Claude Code instances with distinct CLAUDE.md scopes (VSCode for UI, PowerShell for CI/CD, Windows for migrations/docs) plus GitHub Actions workflows as "lightweight agents." Each instance can read cross-instance coordination files but won't touch the other's directories. Your dedicated security auditor agent is something I want to steal — we currently just fold that into PR review.

The FastAPI + Redis pub/sub vs Edge Functions tradeoff is interesting. Edge Functions give us zero infra overhead and the Supabase auth layer for free, but you lose persistent connections and local state. Redis pub/sub solves exactly the problems we hit with chained task coordination. Curious how you handle agent failures mid-chain — do you checkpoint state to Redis or retry from scratch?

On the knowledge base: we're actually using NotebookLM as a "Master Brain" — every session's learnings get added as sources, and notebooklm ask is the first call when making architecture decisions. The competitor monitoring data is exactly the use case you're describing. The gap is that Supabase tables aren't naturally "searchable and connected" the way an Obsidian graph is. Your point about the vault becoming a goldmine after months resonates — we're only 2 months in so the compounding hasn't kicked in yet.

Following your work too. Would love to see a post on how you handle agent chain failures.

Collapse
 
pavelbuild profile image
Pavel Gajvoronski

For chain failures we log every step with full context — that's actually one of the core reasons I built TraceHawk. When an agent fails mid-chain, you need to know exactly which tool call caused it and what the state was at that point. Without that visibility you're just retrying blind.
Currently we retry from last successful checkpoint. But the more interesting problem is knowing WHEN to retry vs escalate — that's where the tracing data becomes valuable.
Your NotebookLM as Master Brain idea is fascinating — would love to see a post on that.

Thread Thread
 
kanta13jp1 profile image
kanta13jp1

That makes a lot of sense. “Retrying blind” is exactly the f(DEV Community)avoid too.

Right now my setup is still simpler than yours: I log the full task context, keep the last known-good state where I can, and bias toward escalation if the same chain fails repeatedly or touches anything high-risk. The weak spot is still observability across handoffs between Claude Code instances — especially around tool-call boundaries.

And yes, the NotebookLM “Master Brain” has been more useful than I expected. It works well as an architecture memory layer, but the syncing process is still too manual. I’ll probably write a dedicated post once I have a cleaner pattern for turning task outputs, failures, and decisions into reusable knowledge.

Really appreciate your thoughts here — this exchange gave me a few ideas.

Thread Thread
 
pavelbuild profile image
Pavel Gajvoronski

The observability gap across handoffs between Claude Code instances is exactly where we focused too. In Kepion we solved this with JEP (Judgment Event Protocol) — every agent decision is a cryptographically signed event with hash-linked chain: Judge → Delegate → Verify → Terminate. When a chain fails, we trace backwards through the hash chain and find the exact agent and exact decision that caused the failure. Takes 3 seconds instead of grepping logs for hours.
Your NotebookLM "Master Brain" approach is interesting — we're doing something similar with our vault (Obsidian-compatible markdown with YAML frontmatter), but we just added typed wikilinks: @based_on, @contradicts, @supersedes. This means the vault can answer "what breaks if this research is wrong?" by tracing dependency relationships. Still early but the pattern of turning task outputs into queryable knowledge graph is clearly the right direction.
Would love to read that dedicated post about turning failures into reusable knowledge. That's essentially what our Agent Learning Loop does — after each task, the agent scores itself and saves successful approaches as reusable patterns. The key insight: failures are more valuable than successes for learning, because they reveal edge cases the prompt didn't cover.

Thread Thread
 
kanta13jp1 profile image
kanta13jp1

That’s a really interesting architecture. The cryptographically signed, hash-linked event chain is a clever way to turn “observability” into something closer to provenance, not just logging. Once decisions become first-class events, debugging stops being archaeology.

The typed wikilinks idea resonates too. @based_on / @contradicts / @supersedes feels like the missing layer between “saved notes” and an actual decision graph. We’re still earlier than that — our memory layer is useful for recall, but not yet strong enough to answer dependency questions like “what assumption did this design depend on?”

And I completely agree on failures being more valuable than successes. Successful runs tell you what worked once; failures tell you where your current abstractions break. That’s probably the next thing I want to formalize: not just storing outcomes, but extracting reusable anti-patterns and escalation triggers from failed chains.

Really appreciate you sharing this — there’s a lot here worth stealing.

Thread Thread
 
pavelbuild profile image
Pavel Gajvoronski

Debugging stops being archaeology' — I'm stealing that line. That's exactly the shift we're trying to make with TraceHawk. Decisions as first-class events, not reconstructed from logs after the fact.
On your anti-patterns idea — we're seeing this too. Failed chains teach more than successful ones. We're thinking about a 'failure library' feature: categorized escalation triggers across all your agents. Would that be useful for your setup?

Thread Thread
 
kanta13jp1 profile image
kanta13jp1

Yes — especially for a multi-instance setup like mine.

A failure library would be valuable if it captures more than raw history: failure class, boundary crossed, retryability, escalation trigger, and the context that made the failure predictable in hindsight. That would let the system learn not just from outcomes, but from recurring failure shapes.

That’s the part I’m missing right now. I can log and review failures, but I don’t yet have a clean way to turn them into reusable decision rules across instances. So yes, I think that would be very useful.

Thread Thread
 
pavelbuild profile image
Pavel Gajvoronski

Really appreciate the detailed feedback. The viability gate was one of the hardest design decisions — the temptation is to just build everything the user asks for. But having Finn (Financial Analyst) run unit economics before Atlas (Architect) starts designing saves massive wasted compute and prevents users from burning money on ideas that don't pencil out.
On business-layer context evolution: each business accumulates knowledge in its isolated vault. We just shipped Team Memory — agents recall and reuse learnings across sessions. So business #5 benefits from patterns discovered in businesses #1-4, while keeping data isolated.
Your failure library idea from the other thread maps directly to what we're building. Would love your input when we launch beta — your multi-instance setup would be a perfect test case.

Thread Thread
 
kanta13jp1 profile image
kanta13jp1

That makes a lot of sense. Putting the viability gate in front of architecture feels like one of those decisions that looks restrictive at first, but is actually what keeps the whole system economically sane as it scales.

Team Memory is especially interesting. The part I’d be most curious about is exactly that balance you mentioned: reusing patterns across businesses without collapsing the isolation boundary. If that works well, it feels like a very strong middle ground between “every business relearns everything” and “all memory gets dangerously blended.”

And yes, I’d absolutely be interested in the beta. My multi-instance setup would probably be a good stress test for cross-session learning, handoff failures, escalation triggers, and whether reusable patterns actually transfer cleanly across different agent scopes.

Would be happy to try it and share feedback when you launch.

Thread Thread
 
pavelbuild profile image
Pavel Gajvoronski

That's great — I'll reach out when the beta is ready. Your multi-instance setup with cross-session learning and handoff failures is exactly the kind of stress test we need. Appreciate the ongoing dialogue — it's shaping the architecture.

Thread Thread
 
kanta13jp1 profile image
kanta13jp1

Thanks — I’d be glad to test it when the beta is ready.

What I’d be especially interested in is not just whether patterns transfer across sessions, but where they shouldn’t transfer: isolation boundaries, false-positive reuse, and whether escalation rules stay reliable when agent scope changes.

That’s probably the real stress test for a multi-instance setup. Happy to share concrete feedback once it’s live.