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
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Restore Foreground Subagent Execution
Since subagents are now forced to run in the background, the parent agent gets flooded with unnecessary status updates, repeated completion checks, and messages like "I'm waiting for subagent X to finish."
This pollutes the parent agent's context, wastes tokens, and distracts it from the actual task.
Please consider restoring the ability to choose between foreground (synchronous) and background (asynchronous) execution.
Background execution is useful for parallel tasks, but synchronous execution is equally important when the parent agent needs the result immediately.
Let the agent choose how to execute subagents instead of forcing every subagent to run in the background.
Reacted by Paul Melekhov, Josh Abrams, GeneralProtectionFault, yump, Bert Radke, Pandaren Brewmaster, dudzcom, Anton Abrosimov, Celestial.y, gusya1 and 4 more
Reacted by GigAnon, Maksim Lashkevich, Paul Melekhov, timmothias, Bert Radke, Celestial.y, Mac0r0ni_And_Weed and IT Lackey
Thanks for the request, @wangzheruoyun! You're asking to bring back a choice between foreground (blocking) and background subagents. Then the parent agent can wait for a result it needs right away, without its context filling up with waiting and status messages.
For context: #63382 made subagents always run in the background and removed the subagent tool's background option. The tool's description now tells the model that subagents always run in the background and not to sleep, poll, or check on the child's progress. Your report says models still produce "waiting for subagent X" turns, which is useful feedback on that design.
Maintainers will consider this; I can't promise an outcome or a timeline. Related issues and PRs:
Thanks for the request, @wangzheruoyun! You're asking to bring back a choice between foreground (blocking) and background subagents. Then the parent agent can wait for a result it needs right away, without its context filling up with waiting and status messages.
For context: #63382 made subagents always run in the background and removed the subagent tool's background option. The tool's description now tells the model that subagents always run in the background and not to sleep, poll, or check on the child's progress. Your report says models still produce "waiting for subagent X" turns, which is useful feedback on that design.
Maintainers will consider this; I can't promise an outcome or a timeline. Related issues and PRs:
Thanks for the request, @wangzheruoyun! You're asking to bring back a choice between foreground (blocking) and background subagents. Then the parent agent can wait for a result it needs right away, without its context filling up with waiting and status messages.
For context: #63382 made subagents always run in the background and removed the subagent tool's background option. The tool's description now tells the model that subagents always run in the background and not to sleep, poll, or check on the child's progress. Your report says models still produce "waiting for subagent X" turns, which is useful feedback on that design.
Maintainers will consider this; I can't promise an outcome or a timeline. Related issues and PRs:
💔There's still no PR dedicated to fixing this issue yet, bro. What solutions have you tried?
Updated my agents and system prompts from this (which set background: true 100% of the time w/ qwen3.8):
Every subagent call waits for its answer: never set background on the subagent tool, even for a live run of several hours. A backgrounded subagent ends your turn early [...]
To this:
A subagent call returns at once and the child runs in the background. After a dispatch, do nothing else: no model-driven work, no other dispatch unless the plan runs them in parallel. End the turn only to wait: the child's <subagent> report starts your next turn. A report that says the child's own background work is still running is not a result: wait for the next one. Treat the child as done only when its result file exists and wc -l fits the size table.
I have only started running the tests on opencode 2.3.0 a few hours ago, so results are still coming in. So far, it's flaky: I've seen active wait through subagents_wait, but agents in the current work session have decided to give the hand back and end their round instead (I don't know yet if that's going to work, TBC).
I have much larger unattended workflows coming up this week, I may have to rollback 2.3.0 migration posthaste depending on the results.
EDIT: well, as it turns out, when you have nested subagents, it's complete mess.
Say you have: A -> B -> C1, A -> B -> C2, etc.
EVERY TIME B spawns a subagent and decides to end its turns, it wakes up A for no reason.
Just look at this mess! 'Build' is being woken up TWICE per nested subagent: once when it's spawned, and once when it's completed.
And this has only been running for a couple hours at a pedestrian pace, I can't imagine the disaster this would be at 1000+ tok/s...
Or, for that matter, with an even greater subagent depth. It compounds really fast!
💔There's still no PR dedicated to fixing this issue yet, bro. What solutions have you tried?
Updated my agents and system prompts from this (which set background: true 100% of the time w/ qwen3.8):
Every subagent call waits for its answer: never set background on the subagent tool, even for a live run of several hours. A backgrounded subagent ends your turn early [...]
To this:
A subagent call returns at once and the child runs in the background. After a dispatch, do nothing else: no model-driven work, no other dispatch unless the plan runs them in parallel. End the turn only to wait: the child's <subagent> report starts your next turn. A report that says the child's own background work is still running is not a result: wait for the next one. Treat the child as done only when its result file exists and wc -l fits the size table.
I have only started running the tests on opencode 2.3.0 a few hours ago, so results are still coming in. So far, it's flaky: I've seen active wait through subagents_wait, but agents in the current work session have decided to give the hand back and end their round instead (I don't know yet if that's going to work, TBC).
I have much larger unattended workflows coming up this week, I may have to rollback 2.3.0 migration posthaste depending on the results.
I'm going to use this command to roll back to the previous version. I can't stand the current version anymore
opencode upgrade 2.2.7
Reacted by GigAnon, Rafal Skolasinski, Maksim Lashkevich, Paul Melekhov, Anton Abrosimov, Celestial.y, IT Lackey and Jens Wasielewski
I also really need to be able to run sub-agents in the foreground (interrupting the main agent). I use a self-hosted AI server with only one slot; it CANNOT handle more than one connection at an acceptable speed. Previously (as I understand it), there was an option to choose how a sub-agent could be invoked, but that option is no longer available. This update (2.3.0) has reduced the available choices and restricted the use of self-hosted models.
Reacted by GigAnon, timmothias, GeneralProtectionFault, Bert Radke, Anton Abrosimov and Jens Wasielewski
Below copy of my post on #64096, as requested by @opencodejr bot.
Human maintainers reading this, PLEASE read #64096 as well. It has more details as to why this is a terrible idea to remove the option to programmatically pause the parent agent.
It was predictable, now seen on the field - after a few rounds of waiting, the main agent will ABSOLUTELY start going astray and run troubleshooting.
Also seen on the field: agents not following the 'soft steering' directives, and deciding that "loading a skill" wasn't actually anything.
Cue 10 mins of 3 (or 4) sessions trashing one another on a 2-sessions setup (and 'only 10 mins' was sheer luck - there was no cache eviction or compaction).
EDIT: oh great, subagents idle answers can trigger compaction, too. That's surely not going to cause any issues down the line!
Short version: 2.3.0 cost about 30–50 minutes over roughly 30 hours (≈2%, 1 h as a ceiling. The compaction trigger is about 172k tokens in both versions.
Time lost to 2.3.0’s always-background subagents
The mechanism shows up clearly in the data. Under 2.3.0 the subagent call returns in about 13 ms with no result, and the result comes back later as a synthetic message. Under 2.2.7 the call blocks until the child finishes. For example, the F9 resume call ran 22:48 → 23:38.
The costs I could measure:
Status chatter. The orchestrator ended a turn after each dispatch, and each of those turns woke the build session with a state="running" notice. There were 31 of them. Each cost a ~45 s turn, about 22 min of generation in total. The orchestrator’s own status-only turns add about 9 min. Under 2.2.x all of this is zero.
Gate contention. Token generation never overlapped across sessions (0 of 1,632 turns), so the gate serializes everything. Worker turns that queued behind parent turns waited about 40 min longer for their first token (implementer 21 min, reviewer 10.5, auditor 6, general 2). This is an upper bound, because some of the orchestrator’s overlapping turns were useful, such as checking screenshots during the F5 live run.
Migration downtime. All three active sessions were cancelled at 22:39:52, and the sessions resumed between 22:46 and 22:48. That is about 7–8 min of dead time.
The orchestrator blamed an “LLM-gate timeout”. The simultaneous timestamp points to the 2.3.0 server being stopped instead; the 2.2.7 service started at 22:44:47.
Compaction right after a dispatch. This happened twice, at 02:23 and 21:59. The orchestrator then had to rebuild whether its child was still running, about a minute each.
@neriousy Just trying to get eyes on this before it becomes harder to revert. I noticed you mention the PR that caused this problem here: #49216
...as well as a closed PR here #61414 (@YMoose)
So just to clarify, are y'all doubling down on leaving this in place? If so that's obviously up to you folks, but if that's going to be the case, then my 2 cents would be to close this issue with some explanation as you see fit. Frankly I think that is going to be an uptick in Pi users xD, but so we know one way or the other.
Been using opencode for almost a year now and constantly telling people how great it is. It's almost embarrassing now that I've migrated to Pi and miss a lot of the strengths of opencode and literally can't use it because it's so stupidly broken for locally hosted models now.
Reacted by Björn, gusya1, Miklós Balázs, Celestial.y and GigAnon
@neriousy Just trying to get eyes on this before it becomes harder to revert. I noticed you mention the PR that caused this problem here: #49216
...as well as a closed PR here #61414 (@YMoose)
So just to clarify, are y'all doubling down on leaving this in place? If so that's obviously up to you folks, but if that's going to be the case, then my 2 cents would be to close this issue with some explanation as you see fit. Frankly I think that is going to be an uptick in Pi users xD, but so we know one way or the other.
Been using opencode for almost a year now and constantly telling people how great it is. It's almost embarrassing now that I've migrated to Pi and miss a lot of the strengths of opencode and literally can't use it because it's so stupidly broken for locally hosted models now.
I mean if I were a conspiracy theorist, I'd think this was to push people towards purchasing Zen lol, but folks above have pointed out it seriously messes with workflows even if it's not local. I don't understand why it's a popular workflow at all unless you're building very separate modules to an application.
However, I think it's more tone deafness, like coming from the standpoint of just vomiting text at a huge model with no practical limit. They actually added the experimental config so requests wouldn't time out after 60 minutes, before which I just used something else, because that also broke my local workflow.
That said, there are alternatives, I'm using oh-my-pi, and curious to try Jcode out. I might come back to opencode if they un-feck this xD, but there are actually some things others do better like subagent steering, etc...
@neriousy Just trying to get eyes on this before it becomes harder to revert. I noticed you mention the PR that caused this problem here: #49216
...as well as a closed PR here #61414 (@YMoose)
So just to clarify, are y'all doubling down on leaving this in place? If so that's obviously up to you folks, but if that's going to be the case, then my 2 cents would be to close this issue with some explanation as you see fit. Frankly I think that is going to be an uptick in Pi users xD, but so we know one way or the other.
Been using opencode for almost a year now and constantly telling people how great it is. It's almost embarrassing now that I've migrated to Pi and miss a lot of the strengths of opencode and literally can't use it because it's so stupidly broken for locally hosted models now.
I mean if I were a conspiracy theorist, I'd think this was to push people towards purchasing Zen lol, but folks above have pointed out it seriously messes with workflows even if it's not local. I don't understand why it's a popular workflow at all unless you're building very separate modules to an application.
However, I think it's more tone deafness, like coming from the standpoint of just vomiting text at a huge model with no practical limit. They actually added the experimental config so requests wouldn't time out after 60 minutes, before which I just used something else, because that also broke my local workflow.
That said, there are alternatives, I'm using oh-my-pi, and curious to try Jcode out. I might come back to opencode if they un-feck this xD, but there are actually some things others do better like subagent steering, etc...
I think Hermes is pretty good right now - the configuration file is clear, the code is solid, and initialization is really easy with your own third-party API. Honestly, you should give it a try
Foreground subagents were deliberately removed in #63382 (66e2fb94) and #63223 (f5f5190d) so all subagents run asynchronously via <background-result> jobs. We aren't bringing back blocking subagent calls, so closing as not planned.
Reacted by Ouanax, Michail Angelos Gakis, timmothias, GigAnon, Jens Wasielewski and gonaik
Reacted by Celestial.y, Dr. Hughes, Josh Abrams, Ouanax, Michail Angelos Gakis and timmothias
multiple people already flagged in #63382 that this was a bad idea and it was completely ignored. Why even have a project be open source if you will willingly ignore when users tell you of bugs and then act as if it is intentional?
Reacted by Ouanax, Michail Angelos Gakis, dudzcom, GigAnon, Jens Wasielewski, sczi and gonaik
Foreground subagents were deliberately removed in #63382 (66e2fb94) and #63223 (f5f5190d) so all subagents run asynchronously via <background-result> jobs. We aren't bringing back blocking subagent calls, so closing as not planned.
But... why? You all really see absolutely no reason/use for deterministic blocking calls to at least be an option?
Are there any fixes in the pipeline to expand on better deterministic subagent return handling within the async model, or do we need to open more specific Issues? It seems that any new reference to background issues were being closed and redirected here, which is a dead end now since it's attached to proposing to bring back the blocking calls.
Reacted by Michail Angelos Gakis
Reacted by Dr. Hughes, Ouanax, Michail Angelos Gakis, GigAnon and Jens Wasielewski
1. Context filled with noise
With a simple 3-layer agent structure, the grandparent (root) is continuously woken up by a copious amount of noise from subagents (parents) checking in just to say that a child (child-leaf) has progressed through another step. For long-running processes, the grandparents are woken hundreds or thousands of times, greatly polluting context with noise.
2. Abstraction, Encapsulation, and Separation of Concerns
Explicitly chosen divisions of labor between agents has been violated. Whereas a subagent was designed to be a black-box that can solve a problem with a unique set of tools they have access to, now the the caller is constantly informed about the internal status of the subagent. This violates basic tenants of Abstraction, Encapsulation, and Separation of Concerns.
From my perspective, this is clearly a regression; and if not clearly addressed, we will be forced to continue using OpenCode v1, or build an internal fork of the codebase ourselves.
I have also stopped upgrading past v2.2.7 due to this breaking change.
This is a basic feature that many local serial agent workflows rely on, and it is hard to understand why it was removed without even an opt-in path. With the current rate of feature creep in OpenCode, new behavioral changes should really be opt-in—or at least opt-out. Having that choice is a fundamental cornerstone of open-source software. Leaving users to choose between freezing updates, maintaining a fork, or moving to another agent harness signals that something is off with the release approach.
Sorry if this comes across as pointed. I like OpenCode a lot and appreciate the project, which makes it all the more frustrating to deal with this right after investing heavy effort into migrating my plugins from v1 to v2. Routine breaking changes are forcing me to consider migrating my setup elsewhere.
Activity
opencodejr commentedon Nov 15, 2026
Thanks for the request, @wangzheruoyun! You're asking to bring back a choice between foreground (blocking) and background subagents. Then the parent agent can wait for a result it needs right away, without its context filling up with waiting and status messages.
For context: #63382 made subagents always run in the background and removed the subagent tool's
backgroundoption. The tool's description now tells the model that subagents always run in the background and not to sleep, poll, or check on the child's progress. Your report says models still produce "waiting for subagent X" turns, which is useful feedback on that design.Maintainers will consider this; I can't promise an outcome or a timeline. Related issues and PRs:
background: falseoption for blocking waitswangzheruoyun commentedon Nov 15, 2026
Could you help me put a "important" label on it? Thanks so much!
GigAnon commentedon Nov 15, 2026
Same issue here (#64096)
wangzheruoyun commentedon Nov 15, 2026
💔There's still no PR dedicated to fixing this issue yet, bro. What solutions have you tried?
GigAnon commentedon Nov 15, 2026
Updated my agents and system prompts from this (which set background: true 100% of the time w/ qwen3.8):
To this:
I have only started running the tests on opencode 2.3.0 a few hours ago, so results are still coming in. So far, it's flaky: I've seen active wait through subagents_wait, but agents in the current work session have decided to give the hand back and end their round instead (I don't know yet if that's going to work, TBC).
I have much larger unattended workflows coming up this week, I may have to rollback 2.3.0 migration posthaste depending on the results.
EDIT: well, as it turns out, when you have nested subagents, it's complete mess.
Say you have: A -> B -> C1, A -> B -> C2, etc.
EVERY TIME B spawns a subagent and decides to end its turns, it wakes up A for no reason.
Just look at this mess! 'Build' is being woken up TWICE per nested subagent: once when it's spawned, and once when it's completed.
And this has only been running for a couple hours at a pedestrian pace, I can't imagine the disaster this would be at 1000+ tok/s...
Or, for that matter, with an even greater subagent depth. It compounds really fast!
wangzheruoyun commentedon Nov 15, 2026
I'm going to use this command to roll back to the previous version. I can't stand the current version anymore
opencode upgrade 2.2.7
gugglegum commentedon Nov 16, 2026
I also really need to be able to run sub-agents in the foreground (interrupting the main agent). I use a self-hosted AI server with only one slot; it CANNOT handle more than one connection at an acceptable speed. Previously (as I understand it), there was an option to choose how a sub-agent could be invoked, but that option is no longer available. This update (2.3.0) has reduced the available choices and restricted the use of self-hosted models.
GigAnon commentedon Nov 16, 2026
Below copy of my post on #64096, as requested by @opencodejr bot.
Human maintainers reading this, PLEASE read #64096 as well. It has more details as to why this is a terrible idea to remove the option to programmatically pause the parent agent.
EDIT: oh great, subagents idle answers can trigger compaction, too. That's surely not going to cause any issues down the line!
GigAnon commentedon Nov 17, 2026
Some stats, before and after I rolled back 2.3.0:
Short version: 2.3.0 cost about 30–50 minutes over roughly 30 hours (≈2%, 1 h as a ceiling. The compaction trigger is about 172k tokens in both versions.
18 remaining items
Dr-Hughes commentedon Nov 25, 2026
Been using opencode for almost a year now and constantly telling people how great it is. It's almost embarrassing now that I've migrated to Pi and miss a lot of the strengths of opencode and literally can't use it because it's so stupidly broken for locally hosted models now.
GeneralProtectionFault commentedon Nov 25, 2026
I mean if I were a conspiracy theorist, I'd think this was to push people towards purchasing Zen lol, but folks above have pointed out it seriously messes with workflows even if it's not local. I don't understand why it's a popular workflow at all unless you're building very separate modules to an application.
However, I think it's more tone deafness, like coming from the standpoint of just vomiting text at a huge model with no practical limit. They actually added the experimental config so requests wouldn't time out after 60 minutes, before which I just used something else, because that also broke my local workflow.
That said, there are alternatives, I'm using oh-my-pi, and curious to try Jcode out. I might come back to opencode if they un-feck this xD, but there are actually some things others do better like subagent steering, etc...
wangzheruoyun commentedon Nov 25, 2026
I think Hermes is pretty good right now - the configuration file is clear, the code is solid, and initialization is really easy with your own third-party API. Honestly, you should give it a try
neriousy commentedon Nov 26, 2026
Foreground subagents were deliberately removed in #63382 (
66e2fb94) and #63223 (f5f5190d) so all subagents run asynchronously via<background-result>jobs. We aren't bringing back blocking subagent calls, so closing as not planned.Dr-Hughes commentedon Nov 26, 2026
Hi @neriousy, I worry that you've closed this without understanding that this is a bug, not a feature. It is a breaking change.
Dr-Hughes commentedon Nov 26, 2026
multiple people already flagged in #63382 that this was a bad idea and it was completely ignored. Why even have a project be open source if you will willingly ignore when users tell you of bugs and then act as if it is intentional?
JSApps7 commentedon Nov 26, 2026
But... why? You all really see absolutely no reason/use for deterministic blocking calls to at least be an option?
Are there any fixes in the pipeline to expand on better deterministic subagent return handling within the async model, or do we need to open more specific Issues? It seems that any new reference to background issues were being closed and redirected here, which is a dead end now since it's attached to proposing to bring back the blocking calls.
wangzheruoyun commentedon Nov 26, 2026
I really don't want to use conspiracy theories to explain anything - that's completely irresponsible and just a way to avoid dealing with the issue!
neriousy commentedon Nov 26, 2026
We are taking a look at it
dudzcom commentedon Nov 26, 2026
My observations:
1. Context filled with noise
With a simple 3-layer agent structure, the grandparent (root) is continuously woken up by a copious amount of noise from subagents (parents) checking in just to say that a child (child-leaf) has progressed through another step. For long-running processes, the grandparents are woken hundreds or thousands of times, greatly polluting context with noise.
2. Abstraction, Encapsulation, and Separation of Concerns
Explicitly chosen divisions of labor between agents has been violated. Whereas a subagent was designed to be a black-box that can solve a problem with a unique set of tools they have access to, now the the caller is constantly informed about the internal status of the subagent. This violates basic tenants of Abstraction, Encapsulation, and Separation of Concerns.
From my perspective, this is clearly a regression; and if not clearly addressed, we will be forced to continue using OpenCode v1, or build an internal fork of the codebase ourselves.
edit: typo
wasiejen commentedon Nov 26, 2026
I have also stopped upgrading past v2.2.7 due to this breaking change.
This is a basic feature that many local serial agent workflows rely on, and it is hard to understand why it was removed without even an opt-in path. With the current rate of feature creep in OpenCode, new behavioral changes should really be opt-in—or at least opt-out. Having that choice is a fundamental cornerstone of open-source software. Leaving users to choose between freezing updates, maintaining a fork, or moving to another agent harness signals that something is off with the release approach.
Sorry if this comes across as pointed. I like OpenCode a lot and appreciate the project, which makes it all the more frustrating to deal with this right after investing heavy effort into migrating my plugins from v1 to v2. Routine breaking changes are forcing me to consider migrating my setup elsewhere.