Specific files for Enhanced Context

I would like to make use of the Enhanced context feature, but when I ask something in the chat, it includes some unnecessary files as context. I would like to know if there is any way to filter out certain files from the context, such as ignoring paths that include ‘Library’
FYI: I am not working on a git repo, I am working locally at the moment.
I created a folder called “.cody” and created “ignore” file in it, and specified these folders to be ignored, but it did not have any effect.

Did you add "cody.internal.unstable": true, to settings.json?

Yes i did, no effect.

Strange, please add your VSCode version, extension version and OS you are on so the devs can debug easier.


  • OS: Windows
  • VSCode: v1.89.1
  • Cody: v1.18.0
  • Its local repo, I am not connected to git
  • Content of .cody/Ignore file is;


  • Settings.json has
    "cody.internal.unstable": true,
    "cody.useContext": "blended",

Sometimes when I start chat, it sends files under Library/ folder as context

Sometimes it does not even send any file.

Example 1;
User: Start new chat, ask “write documentation for test.cs”
Cody: No context is given

Example 2;
User: Start new chat, say “hello”
Cody: Context 17 files, Library/APIUpdater/…

Example 3; (this works)
User: Start new chat, ask “write documentation for UpdateNumbers function in test.cs”
Cody: Context 1 file, test.cs

Example 4;
User: Start new chat, ask “Check Update method of test.cs if there is any bug”
Cody: Context 1 file, anotherFile.cs (because both classes have “Update” method defined)

If your project is not under version-controlled source, then embeddings will not work and you need to re-index your project every time code changes.

yes only “search – indexer” is enabled at the moment, but I am not sure how to trigger re-indexing.
Anyway, I thought it should at least use “Opened Files” as context according to the documentation;

However, that doesn’t seem to be the case either. Am I missing something?

I’ve also seen this log on output. I am not sure if its something important;

█ SimpleChatPanelProvider: getEnhancedContext > symf (end)

█ DefaultPrompter.makePrompt: Ignored context due to context limit: user=0, enhanced=15, previous=0

From the provided logs it seems that you should start a new chat. Long chat conversations lead to a context window overflow which leads to undesired behavior.

Try to provide only necessary code with the @ - mention feature and build up iteratively.

You could also work with a temporary documentation file as .md Markdown file or a simple .txt file to write down findings and let Cody reference these file/s. This is some kind of temporary memory to Cody and retain important information instead of fetching new context from project files not necessary for the issue/question at hand.

I did not have any long conversation so far, most are just 2-3 messages because I start new chat everytime I want to test this context issue.
Please see the video below, same log is printed for a fresh chat screen;

Thank you for providing more context. It seems that no remote repository is linked with the project. Cody will therefore not provide full (or any) context in this case.

One solution is to initialize a Git repository and

  1. publish it as a private repo on GitHub, GitLab etc,
  2. or to add a quasi-remote repository address if you do not want to upload your project.

This should work as a temporary solution.

The problem with this approach will be that embeddings will not update. But you can use at least the enhanced indexing keyword search feature.

1 Like