We are currently trying to use an SDD development workflow (proposal -> design -> task -> code) to implement features.
One issue we’ve encountered is that in complex feature scenarios, where the task can take 1+ hour to complete, the LLM does not call the CodeGraph MCP tools. Instead, it still uses the AI-native tools such as grep, glob, bash, etc. for code retrieval.
My hypothesis is that because the task runs for a long time and consumes a large amount of context, the CodeGraph MCP tool descriptions may get buried by other context during the design and task stages, where code retrieval is needed. As a result, the LLM does not choose to call the MCP tools.
We tried adding explicit instructions in CLAUDE.md / AGENT.md saying that code retrieval should prioritize the CodeGraph MCP tools, but the results were still not good.
We also looked into the codebase-memory-mcp repository. One approach it takes is to hook into the grep / glob tools and call the MCP tool from inside the hook.
However, in real-world scenarios, the LLM often invokes grep / glob through the bash tool. Hooking that kind of usage would be much more expensive to implement and would likely introduce significant side effects.So we still haven’t found a good solution for this.
Previously, when we tested CodeGraph, it was usually in short tasks, such as within a single Q&A session(how does xxx work?), rather than in long-running tasks. So what are good ways to ensure CodeGraph is used effectively during long-running tasks?
We are currently trying to use an SDD development workflow (proposal -> design -> task -> code) to implement features.
One issue we’ve encountered is that in complex feature scenarios, where the task can take 1+ hour to complete, the LLM does not call the CodeGraph MCP tools. Instead, it still uses the AI-native tools such as grep, glob, bash, etc. for code retrieval.
My hypothesis is that because the task runs for a long time and consumes a large amount of context, the CodeGraph MCP tool descriptions may get buried by other context during the design and task stages, where code retrieval is needed. As a result, the LLM does not choose to call the MCP tools.
We tried adding explicit instructions in CLAUDE.md / AGENT.md saying that code retrieval should prioritize the CodeGraph MCP tools, but the results were still not good.
We also looked into the codebase-memory-mcp repository. One approach it takes is to hook into the grep / glob tools and call the MCP tool from inside the hook.
However, in real-world scenarios, the LLM often invokes grep / glob through the bash tool. Hooking that kind of usage would be much more expensive to implement and would likely introduce significant side effects.So we still haven’t found a good solution for this.
Previously, when we tested CodeGraph, it was usually in short tasks, such as within a single Q&A session(how does xxx work?), rather than in long-running tasks. So what are good ways to ensure CodeGraph is used effectively during long-running tasks?