Skip to content

Execution Model

Junior stores work before processing it. This lets a turn continue after a timeout, authorization prompt, or worker restart.

  1. A Slack message, task, or plugin event arrives.
  2. Junior validates and stores the work.
  3. A worker starts or resumes the conversation’s active turn.
  4. The turn uses tools, skills, and sandbox commands as needed.
  5. Completed replies return to the original destination.
  6. Paused work resumes from its latest safe checkpoint.

Queue messages only wake a worker. Stored conversation state remains the source of truth.

A turn covers one request through its final outcome. It may span several bounded attempts while keeping the same conversation and turn identity.

Only one worker owns a conversation at a time. New mentions can steer active work at a safe point. Other messages wait for the current turn to finish.

Progress updates are status, not final replies. Text produced while calling tools stays internal until Junior produces a reply.

Junior saves completed tool work. It resumes from the latest saved state when:

  • OAuth pauses a turn
  • work exceeds one execution window
  • a worker stops unexpectedly
  • delivery fails and can be retried

Sandbox files are temporary. They may disappear between attempts.

  • Accepted work survives process loss.
  • Retries are bounded.
  • Duplicate inbound events should resolve to the same work.
  • Junior does not intentionally repeat an accepted reply.
  • An ambiguous Slack delivery failure may still produce a duplicate reply on retry.

Read Conversations for thread behavior or Security & Authority for action controls.