Podcasts पर वापस जाएंClaude
Claude Code 101
Claude Code में संदर्भ प्रबंधन
is Claw's working memory.
Claude की working memory है।
Every file it reads, every command it runs, every message you send, it all takes up space in the context window.
वह हर फ़ाइल जो वह पढ़ता है, हर कमांड जो वह चलाता है, हर संदेश जो आप भेजते हैं, यह सब context window में जगह लेता है।
Think of the context window as the amount of space that Claude could hold in his memory.
context window को उस जगह की मात्रा के रूप में सोचें जो Claude अपनी memory में रख सकता है।
Whenever you enter a prompt, Claude reads a file, runs a tool call, gets a tool call result.
जब भी आप एक prompt दर्ज करते हैं, Claude एक फ़ाइल पढ़ता है, एक tool call चलाता है, एक tool call result प्राप्त करता है।
This is added on to the context window.
यह context window में जुड़ता जाता है।
And since there's only a finite amount you can put in the context window, it becomes extremely important to optimize this as much as possible.
और चूंकि context window में आप जितना डाल सकते हैं वह सीमित है, इसे जितना हो सके optimize करना अत्यंत महत्वपूर्ण हो जाता है।
Now, when you approach this limit, the context window is automatically compacted.
जब आप इस सीमा के करीब पहुंचते हैं, तो context window स्वचालित रूप से compact हो जाता है।
Compaction will summarize important details and remove the unnecessary tool call results and free up a lot of space in your context window.
Compact महत्वपूर्ण विवरणों को summarize करेगा और अनावश्यक tool call results को हटाएगा और आपके context window में बहुत जगह खाली करेगा।
Do note though that this could potentially lose details in your previous conversation.
हालांकि ध्यान दें कि इससे आपकी पिछली conversation के विवरण खो सकते हैं।
You can run the compaction manually as well with the /compact command.
आप /compact command के साथ compaction को manually भी चला सकते हैं।
This will compact everything that you've done up to that point, which could be handy if you want to clear up context space, but also have a memory of what you previously worked on.
यह उस बिंदु तक आपने जो कुछ भी किया है उसे compact करेगा, जो उपयोगी हो सकता है यदि आप context space खाली करना चाहते हैं, लेकिन पहले जो काम किया था उसकी memory भी रखना चाहते हैं।
If you want to completely start from scratch without memory of what was previously worked on, you can also run /cle and that will remove everything starting from scratch.
यदि आप पहले किए गए काम की memory के बिना पूरी तरह से नए सिरे से शुरू करना चाहते हैं, तो आप /clear भी चला सकते हैं और यह सब कुछ हटा देगा और नए सिरे से शुरू करेगा।
To check the state of your context, run the /context command.
अपने context की स्थिति जांचने के लिए, /context command चलाएं।
Here you'll get a big picture of how large your context size is, the different categories that are taking up the most context, and a graphic showing you all of this.
यहां आपको अपने context size का एक बड़ा चित्र मिलेगा, विभिन्न categories जो सबसे अधिक context ले रही हैं, और एक graphic जो आपको यह सब दिखाएगा।
A general rule of thumb is when you're working on a specific feature and are going over the context window, but need to continue, then compact.
एक सामान्य नियम यह है कि जब आप किसी specific feature पर काम कर रहे हों और context window के पार जा रहे हों, लेकिन जारी रखना हो, तो compact करें।
Keeping the context relevant for this feature is important when continuing development.
development जारी रखते समय इस feature के लिए context को relevant रखना महत्वपूर्ण है।
If you have finished the plan and want to start on a new feature, then clear.
यदि आपने plan पूरा कर लिया है और एक नए feature पर शुरुआत करना चाहते हैं, तो clear करें।
You don't want the previous conversation to present bias in anything new that you want to create.
आप नहीं चाहते कि पिछली conversation किसी भी नई चीज़ में bias लाए जो आप बनाना चाहते हैं।
For things that you do want Claude to remember in other sessions, put it in the claw.md file.
जो चीजें आप चाहते हैं कि Claude अन्य sessions में याद रखे, उन्हें claude.md file में डालें।
That way, it doesn't have to rediscover things from scratch all over again.
इस तरह, उसे हर बार नए सिरे से सब कुछ rediscover नहीं करना पड़ेगा।
Be specific.
विशिष्ट रहें।
The irony behind writing a smaller prompt is that it in the long run, it will take up more context.
एक छोटा prompt लिखने की विडंबना यह है कि लंबे समय में यह अधिक context लेगा।
Without being explicit, Claude is forced to look around your codebase more and do its own thinking, which takes up a lot more context.
स्पष्ट न होने पर, Claude को आपके codebase में इधर-उधर देखने और अपना खुद का सोचने के लिए मजबूर होना पड़ता है, जो बहुत अधिक context लेता है।
window space than if you were just a little bit more clear with a sentence or two.
window space की तुलना में यदि आप एक या दो वाक्यों के साथ थोड़ा अधिक स्पष्ट होते।
MCP servers load all of the tools available into context by default.
MCP servers डिफ़ॉल्ट रूप से सभी उपलब्ध tools को context में लोड करते हैं।
So, if you have a lot of MCP servers for things that are unrelated to the project, it might be worth turning them off.
इसलिए, यदि आपके पास project से असंबंधित चीजों के लिए बहुत सारे MCP servers हैं, तो उन्हें बंद करना उचित हो सकता है।
You can also try out skills, which works similarly to MCP servers, but doesn't put the entire thing into context, saving you space.
आप skills भी आजमा सकते हैं, जो MCP servers की तरह काम करती हैं, लेकिन पूरी चीज़ को context में नहीं डालती, जिससे आपकी जगह बचती है।
Sub agents run in parallel with your main agent but has a complete separate context window.
Sub agents आपके main agent के साथ parallel में चलते हैं लेकिन इनका एक पूर्णतः अलग context window होता है।
So for tasks that require an answer without the journey like where is the authentication endpoints located, you can have the sub agent do the work and return just a summary to your main agent.
इसलिए ऐसे tasks के लिए जिनमें यात्रा के बिना उत्तर की आवश्यकता होती है जैसे authentication endpoints कहां स्थित हैं, आप sub agent को काम करवा सकते हैं और अपने main agent को केवल एक summary वापस कर सकते हैं।
Managing context within cloud code is crucial.
Claude Code के भीतर context का प्रबंधन करना महत्वपूर्ण है।
Use slash compact to summarize long sessions and slashclear to start fresh.
लंबे sessions को summarize करने के लिए /compact का उपयोग करें और नए सिरे से शुरू करने के लिए /clear का।
To use your context window effectively, be specific with what you want.
अपने context window का प्रभावी ढंग से उपयोग करने के लिए, आप जो चाहते हैं उसके बारे में specific रहें।
Check what's using your current context window and use sub agents to delegate tasks you only need the answer for.
जांचें कि आपके वर्तमान context window का उपयोग क्या कर रहा है और उन tasks के लिए sub agents का उपयोग करें जिनके लिए आपको केवल उत्तर की आवश्यकता है।