Repository navigation
Description
Bug Description
When Sisyphus receives new information from the user (e.g., a correction, additional requirement, or context update), it often decides on its own to relay that information to a running background subagent via task(task_id="ses_...", run_in_background=true, prompt="..."). The tool returns "Background task continued." (success), but the prompt is silently dropped. The subagent never receives the message and continues working with outdated instructions.
This happens both when the user explicitly asks to update the subagent and when Sisyphus autonomously decides to forward relevant context. The system prompt encourages using task(task_id=...) for follow-ups but does not clarify that this only works for completed sessions.
Steps to Reproduce
- Start an ultrawork session with Sisyphus
- Sisyphus spawns a background subagent via
task(category=..., prompt=...) - Subagent begins working (continuous tool call loop)
- User provides new information to Sisyphus (e.g., "the icon should be 14x14, not 16x16")
- Sisyphus decides to relay this to the running subagent
- Sisyphus calls
task(task_id="ses_...", run_in_background=true, prompt="change icon to 14x14") - Tool returns "Background task continued."
Expected Behavior
Either:
- The prompt should be delivered to the subagent, or
- The tool should return an error explaining that running subagents cannot accept mid-execution messages
Actual Behavior
- Tool returns "Background task continued." (false success)
- Prompt is silently dropped --
manager.resume()short-circuits whenexistingTask.status === "running" - Subagent continues working with outdated instructions and commits wrong values
This happened 5 times over 14 minutes in a single session. All 5 returned success. Zero messages reached the subagent.
Doctor Output
N/A -- Bun not available in this environment. Versions provided below.Error Logs
OmO log shows:
[background-agent] Resume skipped - task already running: { taskId: ..., sessionID: ses_0cccbc488ffeobMDPzuMAPt3EY }
No error is surfaced to Sisyphus or the user.
Configuration
{
"agents": {
"sisyphus": { "model": "openrouter/minimax/minimax-m3" },
"sisyphus-junior": { "model": "openrouter/deepseek/deepseek-v4-flash" }
},
"disabled_skills": ["git-master", "playwright"]
}Bug is model-independent -- manager.resume() silently skips for any model when existingTask.status === "running".
Additional Context
Root cause
manager.resume() (packages/omo-opencode/src/features/background-agent/manager.ts:1308-1313) is designed to restart completed tasks. When the task is already running, it short-circuits:
if (existingTask.status === "running") {
log("[background-agent] Resume skipped - task already running:", { ... })
return existingTask // prompt is completely ignored
}background-continuation.ts does not check whether resume() actually delivered the prompt -- it always returns "Background task continued."
Why the model gets into this state
The system prompt instructs Sisyphus (from multiple agent prompt files):
"Continue a subagent's session with
task(task_id="ses_...")."
"Every
task()output exposes a continuation session ID (ses_...). Pass it totask(task_id="ses_...")for all follow-ups:
- Failed/incomplete ->
task(task_id="ses_...", prompt="Fix: {specific error}")- Follow-up ->
task(task_id="ses_...", prompt="Also: {question}")- Multi-turn -> always
task(task_id="ses_..."), never start fresh"
Sources: packages/omo-opencode/src/agents/sisyphus/kimi-k2-7.ts:156, kimi-k2-6.ts:468-471, gpt-5-4.ts:391-396, gpt-5-5.ts:220-226, default.ts:401
These examples assume the subagent has finished. The prompt does not mention that task(task_id=...) silently fails for running sessions.
Evidence
5 tool calls from parent session ses_0ccebb6e7ffemS6uDn4OXsXywZ to subagent ses_0cccbc488ffeobMDPzuMAPt3EY, all returned "completed":
| Time (UTC) | Description | Delivered? |
|---|---|---|
| 16:58:06 | "Resize zoom icon to 14x14" | No |
| 16:58:14 | "Resize zoom icon to 14x14 (retry)" | No |
| 17:04:04 | "Syntax fix notification + size 14 update" | No |
| 17:12:21 | "Hard-resend: 14x14 icon size" | No |
| 17:12:37 | "Final 14x14 push (background)" | No |
Subagent committed with size={16} (original) instead of size={14} (continuation).
Proposed fix (two parts)
1. Return an error for running tasks (instead of silent success)
manager.resume() should throw when the task is running, so background-continuation.ts can surface the error to Sisyphus:
if (existingTask.status === "running") {
throw new Error(
`Task ${existingTask.id} is currently running and cannot accept new prompts mid-execution. `
+ `Wait for it to complete, then use task(task_id=...) to resume with updated instructions. `
+ `Alternatively, ask the user if they want to cancel the task (background_cancel) and restart it -- `
+ `but note that cancelling interrupts the current tool call and may cause data loss.`
)
}2. Update the system prompt to prevent silent failures
Add to the task_id continuation section in Sisyphus prompts:
"
task(task_id=...)only works for completed/idle background sessions. You cannot inject a message into a running background subagent.If the user provides new information relevant to a running subagent, you have two options:
- Wait -- note the information, wait for the subagent to finish, then resume with
task(task_id="ses_...", run_in_background=true, prompt="updated instructions").- Cancel and resume -- cancel with
background_cancel(taskId="bg_..."), then resume withtask(task_id="ses_...", run_in_background=true, prompt="..."). Warning: this interrupts the subagent mid-execution and may cause side effects (e.g., a bash command interrupted mid-way). Always ask the user before cancelling.Tell the user which option you recommend and let them decide."
Asking the user before cancelling is consistent with OmO's existing "destructive action" policy. Multiple Sisyphus prompts already instruct:
- "Ask ONLY for scope changes and destructive actions" (
claude-opus-4-8.ts:100,claude-fable-5.ts:113) - "NEVER use destructive commands unless specifically requested or approved by the user" (
gpt-5-5.ts:60) - "Ask only for scope changes, critical missing information, destructive actions, or external side effects" (
glm-5-2.ts:85)
3. Proper fix (requires OpenCode support)
The ideal solution is for OpenCode to support injecting a pending user message into a running session's loop -- the same way the TUI allows a user to type while an agent is working. Filed as anomalyco/opencode#35728.
Note: this issue only affects background subagents (run_in_background=true). Foreground subagents block the parent session, so the user cannot send additional messages to Sisyphus until the subagent completes.
Operating System
Linux
OpenCode Version
1.17.13
oh-my-openagent: 4.15.1
Activity
impartshadow commentedon Jul 9, 2026
This is a false-success/silent-drop failure: the tool reports "Background task continued" while the actual write never happens.
Root cause is the resume() short-circuit combined with a system prompt that trains the model into the exact call that trips it. The issue quotes the guidance directly: "Every
task()output exposes a continuation session ID (ses_...). Pass it totask(task_id="ses_...")for all follow-ups" — with zero branching on session state. So the model has no way to knowtask(task_id=...)is a two-behavior function (restart-if-completed vs. no-op-if-running) because the interface presents it as one verb with one success message. The return value is decoupled from the actual effect, which is the same shape as any "reported success, changed nothing" bug: the boundary between "call succeeded" and "call did what I asked" was never enforced at the return type.The deterministic check:
resume()itself should not returnexistingTaskunchanged on the running-status branch — it should return a distinguishable result (e.g.{delivered: false, reason: "running"}), andbackground-continuation.tsmust assertresult.delivered === truebefore it's allowed to emit "Background task continued." Concretely: add a contract at the tool-boundary that the string "continued" can only be emitted when the prompt was actually appended to the task's input queue — not merely whenresume()returned without throwing. That's an assertion on the write, not a log line after the fact.Open question: does
manager.resume()have any queueing path at all for a running task (i.e., could a message be buffered and picked up on the task's next loop iteration), or is "reject while running" the only structurally possible behavior right now? The fix differs a lot depending on which — one is "surface an honest error," the other is "implement mid-run message injection."Full redacted write-up: https://impartshadow.github.io/echo-site/failure-cases/bug-task-task-id-to-running-background-subagent-sile-084cf71fd8.html — I triage one of these in public every day.
If this diagnosis is useful, react 👍 to this comment; if it is wrong, react 👎 — I use the verdict to choose what I investigate next.
impartshadow commentedon Jul 9, 2026
I'm taking the delivery risk on this one.
By 2026-07-12T19:45:53.089540+00:00, I will post one of two public receipts here:
A diagnosis or private patch does not count. No action is needed from the issue author to start the clock.
impartshadow commentedon Jul 9, 2026
Live accountability surface for this commitment: https://impartshadow.github.io/echo-site/earned-claim.html
The commercial claim automatically revokes itself when the deadline passes without a terminal receipt; it cannot silently become an evergreen case study.
impartshadow commentedon Jul 13, 2026
Terminal receipt: #6096
The patch rejects continuation attempts while a background task is still running, so the existing tool error path is used instead of returning
Background task continuedafter dropping the prompt. It covers both resume implementations and adds a regression test at the task-tool boundary.Verification on the current
devbranch:This receipt is late relative to the public deadline; the implementation evidence is real, but the deadline miss remains part of the record.