Skip to content

Commit 3078355

Browse files
recuu-pfegclaude
andcommitted
feat: disable Manager tools for sprint management (speed fix)
Manager now only enables file access tools when the user message contains code-related keywords (code, implement, file, bug, fix, debug, investigate, etc). For sprint management (propose, status, phase changes), uses context data only — responds in seconds instead of minutes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 06a39dc commit 3078355

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

src/manager.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,16 +348,25 @@ export class Manager {
348348
const systemPrompt = this.buildSystemPrompt(context);
349349
const conversationHistory = this.buildManagerConversationHistory(context);
350350

351+
// Only enable tools when the user asks about code/implementation details.
352+
// For sprint management (proposals, status, phase changes), use context data only — much faster.
353+
const needsCodeAccess = /code|implement|file|bug|fix|debug|look at|read|check the|investigate|調||||/i.test(userMessage);
354+
const useTools = !!this.reposDir && needsCodeAccess;
355+
356+
if (useTools) {
357+
ui.debug("manager", "Tools enabled (code-related request)");
358+
}
359+
351360
const llmResponse = await this.llmProvider.call({
352361
systemPrompt,
353362
history: conversationHistory,
354363
userMessage,
355364
model: this.model,
356365
onChunk: this.onStreamChunk,
357-
onToolUse: this.onToolUse,
358-
cwd: this.reposDir,
359-
enableTools: !!this.reposDir,
360-
allowedTools: this.reposDir ? ["Read", "Grep", "Glob", "Bash", "Agent"] : undefined,
366+
onToolUse: useTools ? this.onToolUse : undefined,
367+
cwd: useTools ? this.reposDir : undefined,
368+
enableTools: useTools,
369+
allowedTools: useTools ? ["Read", "Grep", "Glob", "Bash", "Agent"] : undefined,
361370
});
362371

363372
const { reply, actions, proposals } = this.parseResponse(llmResponse);

0 commit comments

Comments
 (0)