Skip to content

Conversation

@egyptianbman
Copy link
Contributor

• 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

@spoons-and-mirrors
Copy link
Contributor

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?

@egyptianbman
Copy link
Contributor Author

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
@egyptianbman egyptianbman force-pushed the auto-summarize-webfetch branch from d06c2c9 to 2d90a98 Compare September 29, 2025 18:11
@spoons-and-mirrors
Copy link
Contributor

Yup make sense, thanks for sharing !

@spoons-and-mirrors
Copy link
Contributor

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.

@spoons-and-mirrors
Copy link
Contributor

spoons-and-mirrors commented Sep 30, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants