Skip to content

feat(tasks): show background shell and subagent output in /tasks detail panel - #897

Merged
edenreich merged 5 commits into
mainfrom
fix/issue-692
Jul 13, 2026
Merged

edenreich merged 5 commits into
mainfrom
fix/issue-692

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #692

Summary

Adds a new Output section to the /tasks detail panel for background shell and subagent rows, showing the captured stdout/stderr (for shells) or final result message (for subagents). Previously only A2A tasks showed their result in the detail panel; shells and subagents showed only metadata. The output is bounded to 10KB to prevent a chatty shell from blowing up the panel.

Changes

  • Add JobOutputProvider interface to domain/background_job.go - an optional extension that jobs implement to expose their captured output for the detail panel
  • Add Output field to TrackedJob so the supervisor snapshot carries the output text
  • Implement JobOutputProvider on shellJob - reads from the shell's OutputRingBuffer (the full captured stdout/stderr)
  • Implement JobOutputProvider on headlessSubagentJob - stores and returns the subagent's final result message
  • Update Supervisor.Snapshot() to check for JobOutputProvider and populate the Output field
  • Add Output field to TaskInfo and populate it in jobToTaskInfo()
  • Add renderJobOutput() method to the task management view - renders the output section with a 10KB truncation bound, matching the A2A "Final Result" panel style

…il panel

Add JobOutputProvider interface to domain/background_job.go so jobs can expose their captured output for the /tasks detail panel. Implement it on shellJob (reads from OutputRingBuffer) and headlessSubagentJob (stores the final result). Update Supervisor.Snapshot() to populate the Output field on TrackedJob when the job implements JobOutputProvider. Update the task management view to render the output section for shell and subagent rows, bounded to 10KB to prevent a chatty shell from blowing up the panel.
@edenreich
edenreich marked this pull request as ready for review July 13, 2026 12:46
@edenreich
edenreich requested a review from a team as a code owner July 13, 2026 12:46
@edenreich edenreich added this to 2026 Jul 13, 2026
@edenreich edenreich moved this to QA in 2026 Jul 13, 2026
…y in /tasks

Adds supervisor integration tests (TestSupervisor_SnapshotPopulatesOutput, TestSupervisor_SnapshotOmitsOutputForNonProvider, TestSupervisor_SnapshotPopulatesOutputAfterCleanupReap) verifying the JobOutputProvider -> Snapshot -> TrackedJob.Output data path.

Adds a tmux-based e2e test (TestChatTUIBackgroundShellOutput) that drives the real chat TUI, triggers a detached background shell via a new mock scenario, opens /tasks, and asserts the rendered Output section contains the captured stdout.

Adds background-shell mock scenario to scenarios.yaml for deterministic testing of detached Bash output.
@edenreich
edenreich merged commit ccb0b1a into main Jul 13, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-692 branch July 13, 2026 14:04
@edenreich edenreich moved this from QA to Done in 2026 Jul 13, 2026
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.146.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] Show background shell (and subagent) output in the /tasks detail panel

1 participant