## Bug Description Background agents launched with `run_in_background=true` ignore their initial prompt and wait indefinitely until manually messaged via `session_id`. ## Steps to Reproduce 1. Launch a background agent with a prompt: ```typescript task( run_in_background=true, subagent_type="explore", prompt="List files in /tmp" ) ``` 2. Wait for agent completion (it will never complete on its own) 3. Notice the agent shows status "running" but produces no output 4. Only when sending a continuation message via `session_id` does the agent actually work: ```typescript task( session_id="ses_xxx", prompt="Execute your task now" ) ``` ## Expected Behavior - Agent should process the initial prompt immediately upon launch - No manual continuation message should be required ## Actual Behavior - Agent launches, shows "running" status - Never processes initial prompt - Stays stuck until explicitly messaged again ## Workaround Use `run_in_background=false` for synchronous execution, which works correctly. ## Environment - OpenCode Desktop app (macOS) - Model: opencode/big-pickle (parent), nvidia/gemma-4-31b-it (subagent) ## Additional Context This makes background agents unusable for parallel workloads as they effectively become synchronous anyway.
Activity
FilJed commentedon Apr 14, 2026
I cannot see mentioning "run_in_background=true" anywhere in docs or in code search. Is it even working in opencode?
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.