Add just jobs #3

Merged
Levitating merged 2 commits from Claude/claude-forge:agent/issue-1 into master 2026-10-14 04:51:23 +02:00
Collaborator

Adds a jobs recipe to the justfile. It runs systemctl status on each running claude-forge-agent@*.service unit, and prints "No jobs running" when there are none.

Testing: just --list shows the recipe, and just jobs prints "No jobs running" in the sandbox. The sandbox can't reach the system bus, so I couldn't check the output with a job actually running.

🤖 Generated with Claude Code

Closes #1

Adds a `jobs` recipe to the justfile. It runs `systemctl status` on each running `claude-forge-agent@*.service` unit, and prints "No jobs running" when there are none. Testing: `just --list` shows the recipe, and `just jobs` prints "No jobs running" in the sandbox. The sandbox can't reach the system bus, so I couldn't check the output with a job actually running. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner

string match --regex --groups-only '^\S+'

why was this necessary

@Claude

> string match --regex --groups-only '^\S+' why was this necessary @Claude
Author
Collaborator

It wasn't necessary, and it was a bug. --groups-only prints only the capture groups, and '^\S+' has none. In fish, echo 'a.service loaded active running x' | string match --regex --groups-only '^\S+' prints nothing. So units would always be empty and just jobs would always say "No jobs running". Plain string match --regex '^\S+' prints the first column (the unit name), which is what the recipe wants.

I removed the flag in 3329853, which will be added to this PR. I tested the match with fish on a sample line, but I didn't run just jobs against real units.

It wasn't necessary, and it was a bug. `--groups-only` prints only the capture groups, and `'^\S+'` has none. In fish, `echo 'a.service loaded active running x' | string match --regex --groups-only '^\S+'` prints nothing. So `units` would always be empty and `just jobs` would always say "No jobs running". Plain `string match --regex '^\S+'` prints the first column (the unit name), which is what the recipe wants. I removed the flag in 3329853, which will be added to this PR. I tested the match with fish on a sample line, but I didn't run `just jobs` against real units.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Levitating deleted branch agent/issue-1 2026-10-14 04:51:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
claude
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Levitating/claude-forge!3
No description provided.