From a10c3e1c5a263c4db919f212f8bd4a6af4864ff4 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Tue, 2 Jun 2026 13:46:36 +0200 Subject: [PATCH] Update additional usage pointers * Remove obsolete/outdated content * git-worktree: - Remove incorrect recommendation to copy the entire .serena folder in order to retain the cache (cache contains abs. paths) - Recommend to add the .serena folder to version control instead (which will not include the cache folder) Relates to #805 --- docs/02-usage/999_additional-usage.md | 28 ++++++--------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/docs/02-usage/999_additional-usage.md b/docs/02-usage/999_additional-usage.md index 275fd190..d4da7ce6 100644 --- a/docs/02-usage/999_additional-usage.md +++ b/docs/02-usage/999_additional-usage.md @@ -3,30 +3,14 @@ ## Prompting Strategies We found that it is often a good idea to spend some time conceptualizing and planning a task -before actually implementing it, especially for non-trivial task. This helps both in achieving -better results and in increasing the feeling of control and staying in the loop. You can -make a detailed plan in one session, where Serena may read a lot of your code to build up the context, -and then continue with the implementation in another (potentially after creating suitable memories). - -## Running Out of Context - -For long and complicated tasks, or tasks where Serena has read a lot of content, you -may come close to the limits of context tokens. In that case, it is often a good idea to continue -in a new conversation. Serena has a dedicated tool to create a summary of the current state -of the progress and all relevant info for continuing it. You can request to create this summary and -write it to a memory. Then, in a new conversation, you can just ask Serena to read the memory and -continue with the task. In our experience, this worked really well. On the up-side, since in a -single session there is no summarization involved, Serena does not usually get lost (unlike some -other agents that summarize under the hood), and it is also instructed to occasionally check whether -it's on the right track. - -Serena instructs the LLM to be economical in general, so the problem of running out of context -should not occur too often, unless the task is very large or complicated. +before actually implementing it, especially for non-trivial tasks. +For very complex tasks, you can make a detailed plan in one session, +where Serena may read a lot of your code to build up the context, +and then continue with the implementation in another, +having persisted the plan in a memory or dedicated file. ## Serena and Git Worktrees [git-worktree](https://git-scm.com/docs/git-worktree) can be an excellent way to parallelize your work. More on this in [Anthropic: Run parallel Claude Code sessions with Git worktrees](https://docs.claude.com/en/docs/claude-code/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees). -When it comes to serena AND git-worktree AND larger projects (that take longer to index), -the recommended way is to COPY your `$ORIG_PROJECT/.serena/cache` to `$GIT_WORKTREE/.serena/cache`. -Perform [pre-indexing of your project](indexing) to avoid having to re-index per each worktree you create. +Be sure to add the `.serena` folder to version control, such that your project-specific settings and memories are available across worktrees.