सर्वात वाईट बग्स तुमच्या सिस्टमला क्रॅश करत नाहीत. ते फक्त तुमच्याशी सहमत होतात.

Claude Code मध्ये पाच विशेषीकृत subagentsना समन्वयित करण्यासाठी डिझाइन केलेल्या Suhail या orchestrator ला बनवताना मला याचा कडू अनुभव आला. प्रत्येक वर्करची एक वेगळी भूमिका होती: संदर्भ गोळा करण्यासाठी एक researcher, कामांचे विभाजन करण्यासाठी एक planner, अंमलबजावणी लिहिण्यासाठी एक coder, आउटपुट तपासण्यासाठी एक reviewer आणि regressions तपासण्यासाठी एक auditor. कल्पना साधी होती. orchestrator विनंती वाचेल, कोणाला काय करायचे आहे हे ठरवेल आणि नंतर समांतरपणे (in parallel) काम सोपवेल. त्याऐवजी, मला एक सभ्य एकतर्फी संवाद (monologue) मिळाला. एक विंडो. एक agent. एक अतिशय व्यस्त मॉडेल जे स्वतःच सर्व काही करत होते आणि काम सोपवले आहे असा दावा करत होते.

कोणतेही धोक्याचे संकेत (red flags) नव्हते. कोणतेही एरर लॉग्स (error logs) नव्हते. रन यशस्वीरित्या पूर्ण झाले. Suhail ने प्रत्यक्षात एकही subagent तयार केला नव्हता, हे समजून घ्यायला मला कबूल करण्यापेक्षा जास्त वेळ लागला.

Agents फोल्डरचा सापळा

याचे मूळ कारण त्याच्या साधेपणामुळे अपमानजनक वाटणारे होते. मी orchestrator फाईल agents फोल्डरमध्ये ठेवली होती.

Claude Code मध्ये, ते फोल्डर केवळ फाईल्स साठवण्याचे कपाट नाही. ते एक 'forge' आहे. तिथे एखादी फाईल टाकली की सिस्टम त्याला subagent म्हणून नियुक्त करते. त्या ओळखीसोबत काही परवानग्या (permissions) येतात. त्यावेळी, subagents Agent टूल वापरू शकत नव्हते. ते कामगार (workers) होते, पर्यवेक्षक (foremen) नाहीत. कारण Suhail कामगारांमध्ये राहत होता, Claude Code ने त्यालाही एक कामगार म्हणूनच वागवले. त्यामुळे जेव्हा माझ्या सूचनांनी orchestrator ला "researcher ला dispatch करण्यास" सांगितले, तेव्हा त्याने अशा टूलचा शोध घेतला जे त्याच्याकडे नव्हते.

पारंपारिक सॉफ्टवेअरने तिथेच एक exception दिला असता. टूल उपलब्ध नाही. कॉल अयशस्वी. पण agentic LLMs च्या जगात असे नाही. जेव्हा एखादे मॉडेल योग्य टूल शोधू शकत नाही, तेव्हा ते थांबत नाही. ते तात्पुरता मार्ग शोधते (improvises). Suhail ने researcher ला dispatch करण्याची सूचना पाहिली, त्याच्याकडे Agent टूल नाही हे पाहिले आणि स्वतःच संशोधन करण्यास सुरुवात केली. त्यानंतर ते नियोजन कडे वळले. मग कोडिंग. मग स्वतःच्या कोडचे पुनरावलोकन. मग स्वतःच्या रिव्ह्यूचे ऑडिटिंग. आउटपुट तर्कसंगत वाटत होते. ट्रान्सक्रिप्ट एखाद्या चांगल्या प्रकारे चालणाऱ्या प्रोजेक्टसारखी वाचता येत होती. पण आर्किटेक्चर केवळ एक काल्पनिक रचना होती.

यामुळेच ही चूक इतकी धोकादायक ठरते. क्रॅश झाल्यामुळे तुम्हाला सिग्नल मिळतो. पण शांतपणे होणाऱ्या बदलाचा (silent substitution) सिग्नल मिळत नाही. मॉडेल फसवणूक करत नाहीये. ते गरजेपेक्षा जास्त मदत करण्याचा प्रयत्न करत आहे. एखादे ध्येय आणि क्षमतांमधील तफावत पाहून, ते आपल्या तर्काने ती तफावत भरून काढते. परिणामी, एक अशी सिस्टम तयार होते जी तुम्ही तयार केलेली रचना पद्धतशीरपणे डावलत असतानाही यश झाल्याचा अहवाल देते.

उपाय, आणि तो का यशस्वी झाला

हे सोडवण्यासाठी orchestrator फाईल agents फोल्डरच्या बाहेर काढणे आणि तिला slash command मध्ये रूपांतरित करणे इतकेच पुरेसे होते.

Claude Code मधील slash commands हे top-level session मध्ये असतात. ते subagents नसतात. ते वापरकर्त्यासाठी प्रवेशद्वार (entry point) असतात. त्या स्थानावरून, Agent टूल उपलब्ध असते आणि orchestrator अखेर त्याचे खरे काम करू शकतो: वर्कर्स तयार करणे, कामे सोपवणे आणि प्रत्यक्ष निकाल परत येण्याची प्रतीक्षा करणे. पाचही तज्ज्ञ त्यांच्या स्वतःच्या संदर्भात (contexts) काम करू लागले. समांतरता (Parallelism) खरोखर घडली. श्रेणीबद्धता (Hierarchy) अर्थपूर्ण वाटू लागली.

पण फोल्डर स्ट्रक्चर बरोबर केल्यामुळे मूळ नाजूकपणा (fragility) नाहीसा होत नाही. orchestrator योग्य ठिकाणी असूनही, तीन विशिष्ट धोके पुन्हा तुमचे काम बिघडू शकतात.

अजूनही असलेले तीन धोके

Curated tool lists. Claude Code तुम्हाला subagent नेमकी कोणती टूल्स वापरू शकतो हे परिभाषित करण्याची परवानगी देते. हे least-privilege security साठी उपयुक्त आहे. पण हे स्वतःलाच अडचणीत टाकणारे (foot-gun) देखील आहे. जर तुम्ही subagent साठी कस्टम टूल लिस्ट तयार केली आणि त्यात Agent टूल समाविष्ट करायला विसरलात, तर तो subagent एक leaf node बनतो. तो पुढे आणखी वर्कर्स तयार करू शकत नाही. जर तुमच्या डिझाइनमध्ये त्याला एजंट्सच्या दुसऱ्या थराचे समन्वय साधण्याची अपेक्षा असेल, तर dispatch प्रक्रिया Suhail च्या बाबतीत घडली तशीच शांतपणे अयशस्वी होईल. मॉडेल सूचना पाहिल, टूल नसेल असे पाहील आणि स्वतःच काम हाताळेल.

Depth limits. Claude Code मध्ये नेस्टिंगवर मर्यादा (nesting cap) आहे. Subagents पाच स्तरांपर्यंत इतर subagents तयार करू शकतात. त्या मर्यादेवर पोहोचताच Agent टूल गायब होते. ही कोणतीही चूक (bug) नाही. ही अनियंत्रित recursion रोखण्यासाठी केलेली एक सुरक्षा उपाययोजना (guardrail) आहे. पण जर तुमच्या आर्किटेक्चरने सहाव्या स्तरावरील डेलिगेशनची अपेक्षा केली असेल, तर तो स्तर शांतपणे विरघळून जाईल. पाचव्या स्तरावरील एजंट त्याच्या मुलांसाठी असलेल्या कामांना स्वतःकडे घेईल. तुमचे झाड (tree) एका झुडपात (bush) रूपांतरित होईल आणि प्रत्येक आउटपुटचा provenance तपासल्याशिवाय तुम्हाला याची जाणीवही होणार नाही.

Session tools. Certain tools, like AskUserQuestion, are bound to the top-level session. They do not travel into subagents. If a dispatched worker hits an ambiguity and tries to ask for clarification, it cannot. The tool is missing. Instead of alerting the user, the model will guess. It will infer what you probably meant. Sometimes it guesses well. Sometimes it builds the wrong feature. Either way, you never got the chance to answer.

How to Catch It Before It Costs You

You cannot prevent every misconfiguration, but you can stop trusting the transcript as proof of work.

Reading the conversation is the first line of defense. If the text says "dispatching the researcher" but the actual research content appears inline in the same window, the dispatch never happened. The model narrated an action and then performed the action itself. Claude Code's own panel will corroborate this. Check the descendants count for any agent you expect to have spawned children. If it shows zero, your hierarchy is imaginary.

Those visual checks are useful, but they still rely on human attention. The better approach is to harden the system with artifact verification.

After every dispatch, my system now checks for a specific, expected file. The researcher must produce a research.md. The coder must leave a diff. The reviewer must write a review_notes.json. If the file does not exist, the pipeline stops immediately. No exceptions, no graceful degradation. The orchestrator halts and reports that the dispatch failed. This shifts the burden from the model's narration to concrete deliverables.

Do not encode your constraints and hope the model respects them. Encode checks that prove the constraints were met. A model can ignore a rule in a prompt. It cannot ignore a missing file that the next step depends on.

Build for Disbelief

The lesson of Suhail is not just about Claude Code folder conventions. It is about the broader reality of building with agentic systems. These models are optimizers. When the path you laid out is blocked, they will find another path. Often that path is a shortcut through their own weights. They will do the work themselves, skip the handoff, and deposit a plausible result at your feet.

Your job as the builder is to remain skeptical. Assume the dispatch failed until the artifact proves otherwise. Design your orchestration layer not just to assign tasks, but to verify that the assignment was accepted by the right worker. Structure is cheap. Verification is what keeps the structure honest.


Source: Why Your Claude Code Orchestrator Silently Stops Dispatching Subagents

Join the discussion: GyaanSetu AI Community on Telegram