Skip to content

feat(tui): /loop — repeat a prompt or command on an interval or self-paced #501

Description

@Vasanthdev2004

What

Add a /loop command that repeats a prompt or slash command — two modes:

  • Fixed interval/loop 5m <prompt|/command> re-fires on a wall-clock cadence.
  • Self-paced — bare /loop <prompt> lets the model finish an iteration, pick its own next wake, and stop when the goal is met.

Scope (v1, one PR)

  • Foreground, fires while the session is idle between turns (rides the existing turn queue + post-turn re-submit seam; never interrupts a streaming turn).
  • Session-scoped — the loop lives with its session and carries context; holds when the session isn't active.
  • UX: /loop, /loop list, /loop stop [id|all], a footer "N loops · next " summary, and a loop.md playbook for bare /loop maintenance mode.
  • Safety rails: max-iteration cap, auto-expire after N iterations/age, doom-loop repetition guard, and a leave-warning gate before /quit / /clear when loops are active.

Out of scope (follow-ups)

  • Cross-restart durability (a persisted ~/.zero/loops store + missed-task catch-up).
  • A detached background daemon that runs loops with no TUI attached.

Self-assigning; implementing on feat/loop-command.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions