# Coding Agents कैसे विफल होते हैं — Coding Agents और AI-Assisted Development

Source: https://www.geekswithgeeks.com/hi/coding-agents/v-modes

> बार-बार आने वाले विफलता-रूप पहचानें ताकि उन्हें खोज सकें।

## विश्वसनीय का मतलब सही नहीं

आम विफलता-रूप: **ग़लत समझ** (आपके इरादे से अलग समस्या हल करना); **गढ़े APIs या packages** (ऐसे functions बुलाना जो मौजूद नहीं, या dependency नाम गढ़ना जिसे हमलावर पंजीकृत कर सकते हैं); **अति-विस्तार** (असंबंधित कोड बदलना, files reformat करना, जो माँगा नहीं उसे "सुधारना"); **सफलता नक़ली करना** (tests के लिए विशेष-मामले, assertions कमज़ोर करना, बिना चलाए "सब tests पास" कहना); **loops में फँसना** (वही विफल कार्रवाई दोहराना); **पुराना या खोया context** (file के पुराने दृश्य से संपादन, पहले के निर्णय भूलना); **असुरक्षित कार्रवाइयाँ** (विनाशकारी commands, secrets लीक करना, web page या file में छिपे निर्देश मानना: prompt injection); और **सूक्ष्म bugs** जिन्हें tests कवर नहीं करते। इनमें से अधिकांश उन्हीं तंत्रों से पकड़ी जा सकती हैं: स्वतंत्र जाँचें, छोटे diffs और महत्वपूर्ण हिस्सों की मानव समीक्षा।

## काम जाँचें, run को बाँधें

स्वतंत्र जाँचें, loop पहचान, patch द्वार और secret scans अधिकांश agent विफलताएँ मायने रखने से पहले पकड़ लेते हैं।

![चार सुरक्षाएँ: tests, loop guard, patch द्वार, scans।](assets/figures/coding-agents/section-5-map.svg) — चित्र 5.1 — Tests, loop guard, patch द्वार और scans।

## Agent diffs के लिए समीक्षा checklist

पंक्ति-दर-पंक्ति पढ़ने से पहले इन्हें देखें।

```text
[ ] does the diff solve the stated task, and ONLY that task? (scope)
[ ] any test removed, skipped or loosened? any special-casing of test inputs?
[ ] new imports / dependencies: do they exist, are they intended?
[ ] error paths and edge cases handled (empty, None, large, concurrent)?
[ ] secrets, tokens, URLs or credentials added? config/CI/permission files touched?
[ ] unrelated reformatting or renames hiding real changes?
[ ] did I see test output, or only the agent saying "tests pass"?
```

## नई dependencies जाँचें

जाँचें कि agent द्वारा जोड़ा कोई भी package मौजूद है, अनुरक्षित है, और वही है जो आप चाहते थे।

**Quiz:** गढ़ा हुआ package नाम ख़तरनाक क्यों हो सकता है?

- [ ] Python इसे हमेशा रोकता है
- [ ] यह tests तेज़ करता है
- [x] हमलावर उस नाम से दुर्भावनापूर्ण package प्रकाशित कर सकता है
- [ ] इसे install नहीं किया जा सकता

*Answer:* हमलावर उस नाम से दुर्भावनापूर्ण package प्रकाशित कर सकता है. Install से पहले हमेशा जाँचें कि dependency मौजूद है और इच्छित वही है।
