hive.terminal-tools-job-control

Manages long-running background terminal jobs with offset-based log polling and signal escalation.

11.0k|5.7k|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/aden-hive/hive --skill hive-terminal-tools-job-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hive.terminal-tools-job-control
Source: https://github.com/aden-hive/hive/tree/main/core/framework/skills/_preset_skills/terminal-tools-job-control
Command: npx skills add https://github.com/aden-hive/hive --skill hive-terminal-tools-job-control

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Long-running commands like builds, deploys, and dev servers block your workflow, and once terminal_exec auto-backgrounds a process you need a reliable way to monitor output, stream logs without duplication, and stop runaway processes gracefully.

Core Features & Use Cases

  • Start-Poll-Wait Lifecycle: Launch jobs with terminal_job_start, stream output incrementally with terminal_job_logs using next_offset bookkeeping, or block until exit with wait_until_exit.
  • Ring Buffer Management: Handles the 4 MB per-stream ring buffer, detects truncated_bytes_dropped when you fall behind, and supports merged or separate stdout/stderr streams.
  • Signal Escalation & Stdin: Escalates SIGINT to SIGTERM to SIGKILL via terminal_job_manage, writes to process stdin, and takes over jobs auto-backgrounded by terminal_exec.
  • Use Case: You kick off a 10-minute test suite, keep working on other tasks, poll its logs periodically with offset tracking, then gracefully interrupt it with SIGINT when you spot a failure early.

Quick Start

Start my build script as a background job, poll its logs until it finishes, and show me the final exit code.

Frequently Asked Questions about hive.terminal-tools-job-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a long command in the background and monitor its output?

Start it with terminal_job_start to get a job_id, then poll terminal_job_logs with since_offset set to the previous call's next_offset. Repeat until status is exited, or block once with wait_until_exit=True and a timeout.

How do I stop a background job gracefully?

Send signal_int first via terminal_job_manage, wait 2-5 seconds, then escalate to signal_term, and finally signal_kill only if the process is unresponsive. Check exit status between steps with terminal_job_logs using wait_until_exit.

What happens when terminal_exec auto-backgrounds my command?

The process moves into the JobManager with output flowing into the ring buffer and you receive a job_id. Take over by calling terminal_job_logs with tail=True for recent output, or since_offset=0 with wait_until_exit to capture everything.

Why am I missing log output from my background job?

Job output lives in a 4 MB ring buffer per stream, so slow polling lets old bytes get evicted. When truncated_bytes_dropped is non-zero, poll more frequently or accept the gap and continue reading from next_offset.

Do background jobs survive a server restart?

No, jobs die when the terminal-tools server restarts and there is no re-attach mechanism. For durability, launch processes with nohup via terminal_exec to detach them into the system process tree and track the PID yourself.

Should I merge stderr with stdout when reading job logs?

Use merge_stderr=True when logs are meant to be read together with ordering preserved, which suits most servers and build tools. Keep streams separate when stderr is purely errors and stdout is data you process differently.