ddflow_job_run
Launch a long-running command in a detached session so it outlives the agent, and get its job ID, PID, and log path for monitoring.
Instructions
Launch a LONG-RUNNING command for an item -- a training run, a data generation, a model server -- detached into its own session so it outlives you, this server and a restarted remote-control service, and record it. Runs in the item's worktree. Returns the job id, pid and log path. Then WAIT with ddflow_job_list rather than polling the process yourself; ddflow_brief shows running jobs to whoever starts the next session. Declare the item's resources (ddflow_update) so nobody else starts a run on the same GPUs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (default: the item's worktree). | |
| log | No | Output file (default .ddflow/local/jobs/<item>-<t>.log). | |
| item | Yes | Item the job is for. | |
| command | Yes | The shell command. | |
| as_agent | No | Subagent sharing the parent's connection: your own stable name, for this call only (see ddflow_identify). |