Runs and sessions
Foreground headless work
Section titled “Foreground headless work”spark run waits for the headless run and prints its result:
spark run "Review the current diff."spark run --json "Return a machine-readable repository summary."Resume a known session when continuity matters:
spark run --resume <session-id> "Continue with the next verified step."Background work
Section titled “Background work”spark bg submits a daemon invocation and returns its receipt. Without an
explicit session, Spark creates an invocation session identifier:
spark bg --json "Run the repository validation and report failures."Submit more work to an existing session:
spark bg --session <session-id> "Re-run only the failing check."Inspect the invocation through daemon commands instead of starting another executor:
spark daemon invocation status <invocation-id> --jsonspark daemon invocation stream <invocation-id> --after <cursor> --limit 500 --jsonspark daemon invocation cancel <invocation-id> --reason "No longer needed" --jsonInteractive sessions
Section titled “Interactive sessions”List daemon sessions and attach from the same workspace:
spark daemon session list --jsonspark tui --session-id <session-id>Session identity preserves conversation and execution continuity. It does not override workspace binding or permission checks.
Which mode should you use?
Section titled “Which mode should you use?”- Use
spark runfor one foreground result. - Use
spark bgwhen the shell should return after durable submission. - Use
sparkorspark tuifor interactive exploration and steering. - Use Cockpit to observe and control existing daemon work from the browser.