Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

disclaimer: i hate this
this solution is pretty bad, but it works, and it (unfortuntaely) might be the best we've got right now. i've spent ~4 hours on this and don't think it's worth sinking more time into it right now, unless someone has a strong opinion against this approach.
Problem
closes #1371
explore sub-agents are very slow and constnatly run out of context.
this happens becuase each one is running haiku with 200k context, and they all start with 180k+ tokens filled with mcp tool instructions.
our primary sessions have tool search enabled, which solves this problem. explore agents specifically use haiku, which does not support tool search, hence the massive ~90+ tool injection.
so, our options are:
either option requires fully overriding the explore agent definition in the agent sdk, because it does not support partial overrides.
the problem then becomes a bug(?) in the agent sdk: you can't actually override built-in agent names. the docs say you should be able to, and the primary session actually initializes with the overrides, but then when the subagents are invoked, they still use the defaults.
Changes
alternatives considered
How did you test this?
manually