You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: bias intent classification toward agent, not plan
Planning should only trigger when the glue model genuinely cannot
proceed without the user choosing between fundamentally different
approaches. Most tasks — even complex ones — go straight to the
agent which can figure things out by reading the codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: glue.go
+20-16Lines changed: 20 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -71,22 +71,26 @@ const (
71
71
72
72
constclassifyPrompt=`Classify this user message into exactly ONE category:
73
73
74
-
- "plan": User wants to BUILD something complex, multi-step, or architectural. Needs clarifying questions before starting. Examples: new features, new projects, major refactors, system design.
75
-
- "agent": User wants a SIMPLE, CLEAR change: fix a specific bug, run a command, edit a known file, add something small and well-defined. Can start immediately without planning.
76
-
- "chat": User is asking a QUESTION, making conversation, greeting, giving feedback, or asking about capabilities. No file changes needed.
77
-
- "clarify": User's request is too vague to act on. They said something like "fix it" or "make it better" without enough context.
78
-
79
-
Key distinction — plan vs agent:
80
-
- "build an auth system" → plan (complex, many decisions to make)
81
-
- "add dark mode to the app" → plan (design decisions, multiple files)
82
-
- "create a REST API for users" → plan (endpoints, schema, middleware)
83
-
- "fix the typo in main.go" → agent (simple, clear)
84
-
- "run the tests" → agent (no planning needed)
85
-
- "add a .gitignore file" → agent (straightforward)
86
-
- "rename the function to camelCase" → agent (simple edit)
87
-
- "refactor the auth module to use JWT" → plan (architectural change)
88
-
89
-
Respond with ONLY the category word: plan, agent, chat, or clarify`
74
+
- "agent": User wants to build, modify, fix, or run something. This is the DEFAULT for any coding task. The agent is smart and can figure out complex tasks on its own. When in doubt, choose agent.
75
+
- "plan": ONLY use this when the request is genuinely ambiguous and you CANNOT start without asking the user to choose between fundamentally different approaches. The agent can handle complex multi-file tasks — plan is for when there are real design decisions only the user can make.
76
+
- "chat": User is asking a question, making conversation, greeting, or giving feedback. No code changes needed.
77
+
- "clarify": User's request is too vague to act on at all (e.g. "fix it" with no context).
78
+
79
+
IMPORTANT: Default to "agent". Most requests — even complex ones — should go straight to the agent. Only use "plan" when you genuinely need the user to decide between different approaches before any work can begin.
80
+
81
+
Examples:
82
+
- "build an auth system" → agent (just build it with sensible defaults)
83
+
- "add dark mode" → agent (standard implementation)
84
+
- "create a REST API for users" → agent (the agent knows how)
85
+
- "refactor the database layer" → agent (the agent can read the code and decide)
86
+
- "build me a full e-commerce site from scratch" → plan (too many unknowns: what products? payment provider? design style?)
87
+
- "fix the typo in main.go" → agent
88
+
- "run the tests" → agent
89
+
- "hi" → chat
90
+
- "how does the routing work?" → chat
91
+
- "make it better" → clarify
92
+
93
+
Respond with ONLY the category word: agent, plan, chat, or clarify`
90
94
91
95
// ClassifyIntent determines what kind of response a user message needs.
0 commit comments