সবচেয়ে খারাপ বাগগুলো আপনার সিস্টেম ক্র্যাশ করায় না। তারা কেবল আপনার সাথে একমত হয়।
Claude Code-এর ভেতরে পাঁচটি বিশেষায়িত subagent-কে সমন্বয় করার জন্য ডিজাইন করা একটি orchestrator, Suhail তৈরি করার সময় আমি এই শিক্ষাটি কঠিনভাবে অর্জন করেছি। প্রতিটি ওয়ার্কারের একটি নির্দিষ্ট ভূমিকা ছিল: প্রেক্ষাপট সংগ্রহের জন্য একজন researcher, কাজগুলো ভাগ করার জন্য একজন planner, ইমপ্লিমেন্টেশন লেখার জন্য একজন coder, আউটপুট পরীক্ষা করার জন্য একজন reviewer, এবং regression চেক করার জন্য একজন auditor। ধারণাটি ছিল সহজ। orchestrator একটি অনুরোধ পড়বে, সিদ্ধান্ত নেবে কার কী করা প্রয়োজন, তারপর সমান্তরালভাবে (in parallel) কাজগুলো পাঠাবে। পরিবর্তে, আমি পেলাম একটি ভদ্র একতরফা আলাপ (monologue)। একটি উইন্ডো। একটি এজেন্ট। একটি অত্যন্ত ব্যস্ত মডেল যা কাজগুলো অন্য কাউকে অর্পণ করার দাবি করলেও সবকিছু নিজেই করছিল।
কোনো রেড ফ্ল্যাগ নেই। কোনো এরর লগ নেই। রানটি সফলভাবে শেষ হয়েছে। Suhail আসলে একটি মাত্র subagent-ও তৈরি করেনি, তা বুঝতে আমার স্বীকার করার চেয়েও বেশি সময় লেগেছে।
Agents Folder-এর ফাঁদ
মূল কারণটি এতটাই সহজ ছিল যে তা প্রায় অপমানজনক মনে হতে পারে। আমি orchestrator ফাইলটি agents ফোল্ডারের ভেতরে রেখেছিলাম।
Claude Code-এ, সেই ফোল্ডারটি কেবল একটি ফাইল রাখার জায়গা নয়। এটি একটি কামারশালা (forge)। সেখানে একটি ফাইল রাখলে সিস্টেম সেটিকে একটি subagent হিসেবে গণ্য করে। সেই পরিচয়ের সাথে কিছু পারমিশন বা অনুমতি যুক্ত থাকে। সেই সময়ে, subagent-গুলো Agent টুলটি ব্যবহার করতে পারত না। তারা ছিল ওয়ার্কার, ফোরম্যান নয়। যেহেতু Suhail ওয়ার্কারদের মাঝেই বাস করছিল, Claude Code সেটিকেও একজন ওয়ার্কার হিসেবে বিবেচনা করেছিল। তাই যখন আমার নির্দেশ orchestrator-কে "researcher-কে পাঠাতে" (dispatch the researcher) বলছিল, তখন সেটি এমন একটি টুলের সন্ধান করছিল যা তার কাছে ছিল না।
প্রথাগত সফটওয়্যার সেখানেই একটি exception ছুঁড়ে দিত। Missing tool. Call failed. কিন্তু এজেন্টিক LLM-এর জগতে তা নয়। যখন একটি মডেল সঠিক টুলটি খুঁজে পায় না, তখন এটি থেমে যায় না। এটি তাৎক্ষণিক ব্যবস্থা নেয় (improvises)। Suhail researcher-কে পাঠানোর নির্দেশটি দেখেছিল, কিন্তু তার কাছে কোনো Agent টুল খুঁজে না পেয়ে সেটি নিজেই গবেষণা শুরু করে দিল। তারপর প্ল্যানিং-এ চলে গেল। তারপর কোডিং। তারপর নিজের কোড রিভিউ করা। তারপর নিজের রিভিউ নিজেই অডিট করা। আউটপুটটি যুক্তিসঙ্গত মনে হচ্ছিল। ট্রান্সক্রিপ্টটি একটি সুশৃঙ্খল প্রজেক্টের মতো পড়া যাচ্ছিল। কিন্তু আর্কিটেকচারটি ছিল একটি কল্পনা মাত্র।
এটাই এই ব্যর্থতাকে এত বিপজ্জনক করে তোলে। একটি ক্র্যাশ আপনাকে সংকেত দেয়। কিন্তু একটি নীরব প্রতিস্থাপন (silent substitution) তা করে না। মডেলটি প্রতারণা করছে না। এটি অতিরিক্ত সাহায্য করার চেষ্টা করছে। একটি লক্ষ্য এবং সক্ষমতার অভাব থাকলে, এটি তার নিজস্ব যুক্তির মাধ্যমে সেই অভাব পূরণ করে নেয়। এর ফলে এমন একটি সিস্টেম তৈরি হয় যা সফলতার রিপোর্ট দেয়, অথচ আপনি যে কাঠামোটি তৈরি করেছিলেন তা পদ্ধতিগতভাবে এড়িয়ে যায়।
সমাধান, এবং কেন এটি কাজ করেছে
এটি সমাধান করতে orchestrator ফাইলটিকে agents ফোল্ডার থেকে বের করে আনা এবং সেটিকে একটি slash command-এ রূপান্তর করা ছাড়া আর কিছুই করতে হয়নি।
Claude Code-এ slash command-গুলো টপ-লেভেল সেশনে থাকে। তারা subagent নয়। তারা হলো ইউজার-ফেসিং এন্ট্রি পয়েন্ট। সেই অবস্থান থেকে, Agent টুলটি উপলব্ধ থাকে এবং orchestrator অবশেষে তার আসল কাজ করতে পারে: ওয়ার্কারদের তৈরি করা, কাজ বরাদ্দ করা এবং আসল ফলাফল ফিরে আসার জন্য অপেক্ষা করা। পাঁচটি বিশেষজ্ঞ তাদের নিজস্ব প্রেক্ষাপটে কাজ শুরু করল। সমান্তরালতা (Parallelism) বাস্তবে ঘটল। হায়ারার্কি বা শ্রেণিবিন্যাসটির একটি অর্থ তৈরি হলো।
কিন্তু আপনি ফোল্ডার স্ট্রাকচার ঠিক করে ফেললেই অন্তর্নিহিত ভঙ্গুরতা দূর হয়ে যায় না। এমনকি orchestrator সঠিক স্থানে থাকলেও, তিনটি নির্দিষ্ট ঝুঁকি আপনার পুরো পরিকল্পনা ভেস্তে দিতে পারে।
তিনটি ঝুঁকি যা এখনও ওত পেতে আছে
Curated tool lists. Claude Code আপনাকে সুনির্দিষ্টভাবে নির্ধারণ করতে দেয় যে একটি subagent কোন কোন টুল ব্যবহার করতে পারবে। এটি 'least-privilege security'-এর জন্য দরকারী। তবে এটি একটি ফাঁদও হতে পারে। আপনি যদি একটি subagent-এর জন্য কাস্টম টুল লিস্ট তৈরি করেন এবং Agent টুলটি অন্তর্ভুক্ত করতে ভুলে যান, তবে সেই subagentটি একটি লিফ নোড (leaf node) হয়ে যাবে। এটি আর নতুন কোনো ওয়ার্কার তৈরি করতে পারবে না। আপনার ডিজাইন যদি আশা করে যে এটি এজেন্টের অন্য একটি স্তরকে সমন্বয় করবে, তবে সেই ডিসপ্যাচটি ঠিক একইভাবে নীরবে ব্যর্থ হবে যেভাবে Suhail-এর ক্ষেত্রে হয়েছিল। মডেলটি নির্দেশটি দেখবে, কোনো টুল পাবে না এবং কাজটি নিজেই সম্পন্ন করবে।
Depth limits. Claude Code নেস্টিং-এর ওপর একটি সীমা আরোপ করে। subagent-গুলো সর্বোচ্চ পাঁচটি স্তর পর্যন্ত অন্য subagent তৈরি করতে পারে। সেই সীমায় পৌঁছে গেলে Agent টুলটি অদৃশ্য হয়ে যায়। এটি কোনো বাগ নয়। এটি অনিয়ন্ত্রিত রিকার্সন (runaway recursion) প্রতিরোধের একটি সুরক্ষা কবচ। কিন্তু আপনার আর্কিটেকচার যদি ষষ্ঠ স্তরের ডেলিগেশনের কথা ধরে নেয়, তবে সেই স্তরটি নিঃশব্দে বিলীন হয়ে যাবে। পঞ্চম স্তরের এজেন্ট তার সন্তানদের জন্য নির্ধারিত কাজগুলো নিজেই গ্রহণ করবে। আপনার ট্রি (tree) একটি ঝোপের মতো হয়ে যাবে, এবং প্রতিটি আউটপুটের উৎস (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
