Anthropic · 14 अक्टू॰ 2026 · प्रमुख
Claude Code 2.1.300 — OpenTelemetry GenAI spans और नए mod hooks
संक्षेप में
Claude Code 2.1.300 में trace spans के लिए OpenTelemetry GenAI attributes जुड़ते हैं, cache-write tokens को 5-minute और 1-hour lifetime के हिसाब से बाँटा जाता है, और mods को prompt.change hook मिलता है। इसके साथ /advisor AWS पर Claude Platform के लिए भी आ गया है।
Anthropic · 14 अक्टू॰ 2026 · 1 जाँचा गया स्रोत

Claude Code 2.1.300 से सेशन का trace करना standard OpenTelemetry tools में आसान हो जाता है, और mods को प्रॉम्प्ट बॉक्स पर ज़्यादा नियंत्रण मिलता है।
मुख्य तथ्य
| संस्करण | v2.1.300 |
|---|---|
| बनाने वाला | Anthropic |
| रिलीज़ की तारीख | 14 अक्टू॰ 2026 |
| टेलीमेट्री | gen_ai.* span attributes; cache_creation_5m_tokens / _1h_tokens |
| नई mod APIs | virtualText, prompt.change hook, $.ui.view({ agentId }) |
| AWS | AWS पर Claude Platform में /advisor (opt-in) |
यह क्या है?
Claude Code 2.1.300 के trace spans में अब OpenTelemetry GenAI semantic-convention attributes दिखते हैं, जिनमें gen_ai.provider.name, gen_ai.conversation.id, gen_ai.tool.name और error.type शामिल हैं। api_request event में cache writes अब cache_creation_5m_tokens और cache_creation_1h_tokens में अलग-अलग बाँटे जाते हैं।
यह कैसे काम करता है?
Mod लिखने वालों के लिए इस release में virtualText जुड़ा है (प्रॉम्प्ट बॉक्स में दिखने वाला टेक्स्ट, जो submit किए गए prompt में कभी नहीं जाता), history recalls, clears, undos और plugin fills के लिए एक prompt.change hook है, और agent के transcript को मुख्य view में दिखाने के लिए $.ui.view({ agentId }) है। agent.spawn hook अब workflow agent को सिर्फ़ रोकने के बजाय उसका prompt और model बदल भी सकता है।
यह क्यों मायने रखता है?
जो टीमें Claude Code का telemetry किसी observability stack में भेजती हैं, वे अब standard GenAI dashboards से उसे पढ़ सकती हैं और देख सकती हैं कि हर cache lifetime पर कितना खर्च हो रहा है। Hook authors के लिए नियम सख्त हुए हैं: PreToolUse और PermissionRequest hooks से आने वाला updatedInput अब Claude के अपने input की तरह validate होता है, और exit अब उन background commands को 1.5 seconds के बाद force-kill कर देता है जो तब भी चल रहे हों।
यह किसके लिए है?
OpenTelemetry pipelines वाले Claude Code users, mod और hook authors, AWS पर Claude Platform का इस्तेमाल करने वाली टीमें
अक्सर पूछे जाने वाले प्रश्न
- Claude Code 2.1.300 ने कौन-से OpenTelemetry attributes जोड़े हैं?
- Claude Code 2.1.300 अपने trace spans में OpenTelemetry GenAI semantic-convention attributes जोड़ता है, जैसे gen_ai.provider.name, gen_ai.conversation.id, gen_ai.tool.name और error.type। api_request event में अब cache_creation_5m_tokens और cache_creation_1h_tokens भी हैं, ताकि cache writes को उनकी 5-minute या 1-hour lifetime के हिसाब से अलग किया जा सके।
- AWS पर Claude Code में /advisor कैसे इस्तेमाल करें?
- Claude Code 2.1.300 AWS पर Claude Platform के लिए /advisor लाता है। जब तक आप /advisor, advisorModel setting या --advisor flag से कोई advisor नहीं चुनते, तब तक कोई advisor नहीं चलता। किसी environment के लिए advisor tool को पूरी तरह बंद करने के लिए CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1 सेट करें।
- Claude Code 2.1.300 में hooks के लिए क्या बदला?
- Claude Code 2.1.300 अब PreToolUse और PermissionRequest hooks के updatedInput को उसी तरह validate करता है, जैसे वह Claude के अपने tool input को करता है। अनजान keys हटा दी जाती हैं, और tool जो input reject करे, उससे call deny हो जाती है। इस release में एक bug भी ठीक हुआ है, जिसमें background command चलते समय exit करने पर SessionEnd hooks कभी-कभी नहीं चलते थे।
- क्या Claude Code mod workflow agent को शुरू होने से पहले बदल सकता है?
- हाँ, Claude Code 2.1.300 में agent.spawn mod hook workflow agent के prompt और model को फिर से लिख सकता है। इस release से पहले यह hook workflow agent को सिर्फ़ रोक सकता था। इसी version में prompt.change hook और virtualText भी जुड़े हैं, जो prompt की सजावट के लिए हैं और submit किए गए prompt तक कभी नहीं पहुँचती।
आज़माएँ
npm i -g @anthropic-ai/claude-code@2.1.300