Summary
Define and implement model-facing backgrounding for the V2 shell tool.
Current state
The V2 shell/bash tool runs synchronously with a timeout via AppProcess.run(...). The implementation has TODOs around background jobs, observation, restart recovery, and cancellation. BackgroundJob already exists and subagent background mode provides a useful precedent.
Design questions
- Should shell accept
background?: boolean?
- What should the immediate return shape be when a command is backgrounded?
- How should completion be delivered back into the session?
- What owner-bound get/wait/cancel tools or APIs are needed?
- What output is retained inline vs streamed/stored elsewhere?
- What are the process cleanup and platform guarantees?
- What, if anything, should be exposed over HTTP before durable status/restart recovery exists?
Acceptance criteria
- Background shell semantics are documented.
- Implementation uses owner/session-bound observation and cancellation.
- Completion delivery is defined.
- Output retention/truncation behavior is explicit.
- Related existing shell background/hang issues are linked or closed as appropriate.
Summary
Define and implement model-facing backgrounding for the V2 shell tool.
Current state
The V2 shell/bash tool runs synchronously with a timeout via
AppProcess.run(...). The implementation has TODOs around background jobs, observation, restart recovery, and cancellation.BackgroundJobalready exists and subagent background mode provides a useful precedent.Design questions
background?: boolean?Acceptance criteria