A local-first multi-agent app development platform, built on PenguinHarness
A running tool call can be moved to the background from its card
- Date: 2026-09-11
- Type: feature
- Scope:
core,server,web - PR: #691
While an exec_command or run_subagent call is executing, its row in the conversation now
carries a "Send to background" action that hands the work back as a background task: the call
closes with a process_id / subagent_id, nothing is killed, and the turn continues instead of
waiting out the command. The completion arrives later as the usual background-task notice, the
way a run_in_background launch reports, and the detached process shows up in the session's
process list with its Stop and Remove actions.
Details
- Core gives each executing tool call a detach channel of its own, separate from the run's abort
signal, and
Session.detachToolCall(toolCallId)fires it. A detach is not an interruption: the call endscompletedwith a handle and no interruption marker, and only the two tools with a background form observe it — every other tool behaves exactly as before. - A detached
run_subagentchild inherits the launching call's approval sink and live message tap, so it keeps running and streaming after the turn that started it has ended. - New route
POST /api/sessions/:sessionId/tool-calls/:toolCallId/background— 204 on success, 404tool_call_not_foundwhen nothing with that id is executing, 409tool_not_detachablewhen the tool has no background form. - The action is inline text on the row, styled as a link and sized like the rest of the row, so
a row carrying it measures exactly like one that does not. It is offered only while the call
is executing, only on a main-session card, and not on a call already launched with
run_in_background— that one's work is already parked. - A call whose work went to the background is marked
[Background]right of its duration, in the row's own mono type and the same bracketed shape the row uses for an outcome that needs a word. It is read from the note the call returned, so it survives a reload. - The chat header's background-task chip keeps its glyph and its count and moves from the live-status green to the muted tone, so it reads the same as the session row's mark.