Feature: dynamic workflows (Claude Code parity)

Ouverte
#1,116 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript
Domaine
ai-infra-agents, cli

Piste de recherche

Start by reading the existing agent and agent_output delegation entry points, then trace how the CLI handles background work and interactive views. The issue describes a new workflow script API, resumable orchestration, progress controls, and workflow storage, but does not identify files or tests; first map the relevant subsystems and discuss scope with maintainers. Done means scripts can fan out agents and return a final result, with saved runs and the requested controls covered by tests.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Feature Description

Add dynamic workflows, like Claude Code's: a workflow tool that takes a JavaScript orchestration script, runs it in the background, and fans work out across dozens to hundreds of subagents. Intermediate results stay in script variables, so the main session only receives the final answer and stays responsive while agents run.

The script gets a small API: agent(prompt, opts) to spawn one subagent (optionally returning JSON that matches a schema), pipeline(items, fn) and parallel([...]) to fan out, and phase() / log() for progress. A /workflows view shows phases and per-agent progress, with pause, stop, restart, and save.

Runs can be saved to .commandcode/workflows/ (project) or ~/.commandcode/workflows/ (personal) and re-run as /<name>.

Use Case

Today delegation is turn-by-turn through agent / agent_output: one prompt at a time, and every result lands back in the parent's context. That doesn't fit tasks needing more agents than one conversation can coordinate:

  • audit every route handler for missing auth, then verify each finding
  • migrate hundreds of files, each in its own isolated copy
  • review every changed file in a PR and merge the findings into one ranked summary
  • keep fixing type errors until tsc --noEmit passes or two rounds make no progress

A workflow moves the plan into code, so the orchestration is repeatable and the parent context holds only the final report.

Additional Context

Reference behavior and API: https://code.claude.com/docs/en/workflows

Minimal script shape:

export const meta = { name: 'audit-routes', description: 'Audit handlers for missing auth' }

const { files } = await agent('List every .ts file under src/routes/.', {
  schema: { type: 'object', required: ['files'], properties: { files: { type: 'array', items: { type: 'string' } } } },
})

const audits = await pipeline(files, (file) =>
  agent(`Audit ${file} for missing authentication checks.`, { label: file }),
)

return audits.filter(Boolean)

Worth keeping from the reference design: approval before the first launch, resumable runs (completed agents return cached results on relaunch), a configurable concurrency cap (default ~16), and a total-agent cap. The script itself should have no filesystem or shell access — agents do the work.

How important is this to you?

Important for my workflow

Langage dominant
Aucune donnée de langage
Étoiles
4.2k
Forks
377
Merge moyen
1 j 17 min
PR mergées (30 j)
7

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandCodeAI/command-code

Toutes les issues de CommandCodeAI/command-code

Issues similaires

Plus d'issues AI Infra & Agents

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.