Repository navigation
feat: job_start/job_poll tools for long-running work - #64
Merged
Merged
Conversation
Formalize the nohup-background + poll pattern agents improvise for CPU-bound jobs exceeding the 30s run_command ceiling (issue #59): - job_start (Write): argv-split like run_command (no shell; bash -c is the explicit shell escape), detached into its own process group, stdin null, stdout+stderr -> tole-jobs/<id>/log inside the file-tools workspace. Returns job id + pid immediately. - job_poll (ReadOnly): liveness via 'ps -p <pid> -o stat=' treating zombie state (Z*) as finished, plus a bounded 8KiB-window tail of the log (stat -> seek -> read; lossy UTF-8 at the boundary). The full log stays reachable via read_file through the same jail. Depends on the --workspace jail (#57, merged): logs live under the file_root so read_file can reach them without workarounds. Closes #59, closes #56 (option b: native shell job control)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (description of the change)
Two tools formalizing the improvised nohup-background + poll pattern (issue #59):
job_start(Write): argv-split exactly like run_command (no shell;bash -cis the explicit shell escape), detached into its own process group (survives CLI exit), stdin null, stdout+stderr appended totole-jobs/<id>/logINSIDE the file-tools workspace. Returns job id + pid immediately, under the normal approval gate.job_poll(ReadOnly): liveness viaps -p <pid> -o stat=(zombie state Z* counts as finished) + bounded 8KiB-window tail of the log (stat → seek → read, lossy UTF-8 at the boundary). Full log reachable via read_file through the same jail.Builds on #57 (merged): logs live under the file-tools root, so read_file reaches them without workarounds.
Why (the problem you're solving)
CPU-bound jobs (30-60s video renders) exceed the 30s run_command ceiling; both vetio missions hand-rolled nohup + result-file polling unprompted. Formalizing the pattern removes improvisation cost. This also resolves issue #56 option (b) for the shell-job dimension.
Testing (how you verified this works)
Closes #59, closes #56