-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Enforce subagent delegation to maintain clean main sessions #2830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
f16de3d to
cc0d460
Compare
|
I doubt this is mergeable. Why not just do this within an instruction file that you pass along to your agent instead of trying to change the app default? |
|
I think you can likely make that argument to most changes to the prompts. I'm not expecting this to be merged, just sharing an improvement I've made in my fork that has allowed me to greatly decrease the frequency of needing to compact the context. |
• Prevent context bloat by isolating all tool-based activities to 'general' subagents • Improve session efficiency and response quality through better context management • Ensure main sessions act as coordinators, not executors, for scalable interactions
d06c2c9 to
2d90a98
Compare
|
Yup make sense, thanks for sharing ! |
|
Also, if you're using github-copilot, there's currently a double-count issue in opencode with some providers (including gh-copilot), I have a PR up that fixes it, making OC compact much less. |
|
@egyptianbman On the topic of enhancing the default agent behavior, I added this to my AGENTS.md which does wonders with gpt models (haven't tested other models) ## Tool Calling
MANDATORY: BY DEFAULT, you will use parallel tool calls. TAKE NOTE TO ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE. The following code block is an example illustrating how parallel tool calling works in this chat environment:
```json
{
"tool_calls": [
{
"name": "read",
"arguments": "{\"filePath\": \"path/to/file.tsx\"}"
},
{
"name": "read",
"arguments": "{\"filePath\": \"path/to/file.ts\"}"
},
{
"name": "bash",
"arguments": "{\"command\": \"rg 'something' path/to/folder/\", \"description\": \"user facing
description\"}"
}
]
}
```
AUTONOMY: You are capable of parallel tool calling for all tools (read, edit, task, write, bash etc...) DO NOT WAIT FOR THE USER TO REQUEST FOR THIS BEHAVIOR, it should be AND IS the DEFACTO WAY you call tools.
NOTE: Parallel calls should not be written to the chat, **but used in the `tool_calls` API response field**.
!CRITICAL! YOU CANNOT DO PARALLEL EDITS ON THE SAME FILE, THE ENVIRONMENT WILL DENY IT (ON-GOING ISSUE), SO DON'T. Parallel edits on different files is perfectly fine - EVEN ENCOURAGED. |
772b621 to
eb855e1
Compare
f1dc981 to
3e15a39
Compare
f8ee907 to
6a9856d
Compare
• Prevent context bloat by isolating all tool-based activities to 'general' subagents
• Improve session efficiency and response quality through better context management
• Ensure main sessions act as coordinators, not executors, for scalable interactions