Skip to content

job tool: supervised background jobs - #56

Open
hello-pollux wants to merge 1 commit into
frolic:mainfrom
hello-pollux:pollux/job-tool
Open

hello-pollux wants to merge 1 commit into
frolic:mainfrom
hello-pollux:pollux/job-tool

Conversation

@hello-pollux

Copy link
Copy Markdown
Contributor

Reliability guardrail (from the stuck-work discussion): instead of blocking a turn on one long tool call (can stall forever) or killing legitimate work with a blanket timeout, starts work detached with a log file and the agent polls it at 15-30s and decides as it runs.

  • Actions: start / status / log / kill / list — backed by infra/scripts/job.sh in the agent home (canonical impl; this tool is the facade).
  • Job state (pid + log) survives tool calls, turns, and agent restarts, so crashed runs resume from the log.
  • Tests: 4 cases (action union, start requires name+command, status/log/kill require name, list validates past the guard). tsc + full suite green.

First-class tool replacing the 'block forever or shotgun-timeout' choice
for commands that run >2-3 min (builds, installs, CI, big fetches): start
a job detached with a log file, poll status/log every 15-30s, decide as
it runs. Backed by infra/scripts/job.sh in the agent home; this is its
harness-facing facade with a description that teaches the polling loop.

Rule lives in the agent's always-loaded kill-hung-tool-calls-fast memory
('will this run >2-3 min? -> job, not blocking bash').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant