Repository navigation
feat(c0mpute): task states in /agents and /tasks, plus & background tasks - #605
Merged
Merged
Conversation
…asks `moshcode agents c0mpute` now tracks every turn as a task with Claude Code's agents-view states: Needs input, Working, Completed, Failed, Stopped. - `& [@agent] <task>` (or /bg) runs a task in the background; a permission prompt parks it as Needs input instead of grabbing the prompt, and `/tasks <id>` shows it and answers. Transitions are announced above the prompt, which shows `[1 working · 1 needs input]` while any run. - `/agents` lists tasks by state above the agent definitions; `/tasks`, `/tasks stop <id>`, `/tasks clear`. - The board is mirrored to ~/.moshcode/c0mpute-tasks.json so `moshcode agents c0mpute tasks` and other sessions see it; a live task whose process died reads as Stopped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan0 finding(s) in the 3 file(s) this pull request changes. Nothing in the files this pull request changes. 125 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 8 | **MEDIUM**: 87 | **LOW**: 30Not introduced by this pull request. The full set is in the Security tab.
…and 105 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
/agents claudeopens Claude Code's agents view, where every task is Working, Needs input, Completed or Failed./agents c0mputehad no task list at all: one blocking turn at a time. This gives it the same states.What changes
src/c0agent-tasks.mjs): every turn is a task in one of Needs input · Working · Completed · Failed · Stopped. It is saved to~/.moshcode/c0mpute-tasks.jsonand merged across sessions. A live task whose process died reads as Stopped.& [@agent] <task>(or/bg) runs one without blocking the prompt. Its permission prompts park it as Needs input, announced above the prompt;/tasks <id>shows the log and result, and answers the prompt. The prompt shows[1 working · 1 needs input]while tasks run, and/exitwarns once before stopping them./agentslists tasks by state above the agent definitions./tasks,/tasks stop <id>and/tasks clearmanage them.moshcode agents c0mpute tasks [clear].Tested
test/c0agent-tasks.test.mjs: state transitions, grouping/order, cross-session merge plus dead-pid → Stopped, the CLI verb andparseArgs.& …→[1 working]prompt,/tasksand/agentsshow it under Working with live node status ("bonita has the job…"), and/exitwarns.node --test: 3 failures locally, all outside this change (apps/pwadeps aren't installed locally, plusinstall-dependencies).🤖 Generated with Claude Code