Repository navigation
Description
Coordinator decision: until v0.2.0 ships, A2A sessions must use only background_command for detached commands. Do not modify the release-path oxa-tools::JobRegistry now. Follow-up to oxstack/ox-llm#94 and draft oxstack/ox-llm#176.
Historical reproduction at pre-policy integration fc551b2 (main c679898 plus A2A integration): run python3 -I oxa-orchestrator/tools/native_jobs_demo.py with feature-built CLI/fake. A real isolated TUI invokes native bash with background:true; the fake model declares DONE while the bounded job continues writing. The observed heartbeat grew from 10 to 35 bytes after DONE. No paid provider or production service is involved.
The native registry has no public completion subscription/list/terminal-result acknowledgement hooks for the A2A owner. Its output seen counter and bounded wait_s polling track progress, not goal ownership or terminal-result delivery. Existing A2A cancellation, unread-result guards and completion wakes supervise the separate background_command manager.
Post-release lifecycle bridge design:
- Bind every native job to the exact session and optional goal generation at admission; the native registry remains the sole process/sandbox owner. Never infer ownership by guessed job IDs.
- Add a bounded registry snapshot/completion subscription and explicit terminal-result delivery acknowledgement. Output reads must not acknowledge unseen terminal status; handle jobs with zero output, capped output and rapid exit.
- A2A holds DONE while any owned job is running, cleanup is unconfirmed, or its terminal result is unread. Publish completion once, wake only the same eligible parent under its original budget, and deduplicate delivery.
- Pause/cancel/deadline/Esc/shutdown/session replacement cancel the owned generation and await actual sandbox process-group settlement. Retain status until cleanup is confirmed; do not clear records to imply reaping.
- Session swaps and stale completions cannot wake replacement goals or reset lifetime budgets. Keep offline/permissions/redaction and native foreground execution authoritative; no remote grant widening.
- Preserve native behavior outside the default-off A2A attachment. Decide the adapter/API together with the release-path tools/core maintainers after release; avoid two process owners or tool-output parsing as a protocol.
Acceptance: real TUI plus external control tests cover DONE/unread results, zero-output exit, pause/cancel/deadline/Esc, descendant cleanup, completion/cancel races, late reads, session/goal replacement, output caps and unchanged cumulative accounting. Demonstrate the current heartbeat reproduction fails before the bridge and passes after it. Until then, reject native detached-start/job-read calls in A2A sessions and use background_command instead. This issue authorizes design only, not a release-path implementation before v0.2.0.
Release mitigation is implemented in the A2A crate at 0be9968: native job refusal adapter and real-TUI policy regression. The regression fails without the adapter and passes with it. Foreground Bash remains functional; oxa-tools::JobRegistry is unchanged. The lifecycle bridge above remains post-release work, not part of this workaround.
Activity
n0rpan commentedon Nov 19, 2026
Triage 2026-11-19: this issue is now tracked in #148 (Cluster: Workers and agent-to-agent: steering, yolo inheritance, direct messaging, priority P0), planned PR 3: "Direct a2a". It will be fixed there together with its related issues, not one by one.