Skip to main content

YOLO mode

In YOLO mode a project has one chat and no pull requests. Each Turn that passes its checks is saved straight to the repository's default branch as a Version. You can start a project in YOLO mode, or switch a Collaboration project to it and back, at any time, in every workspace.

A project is in one of two modes. In Collaboration, every chat session works on its own branch and opens a pull request. In YOLO mode, the one chat works on the default branch.

Start a YOLO project​

You have three ways in.

  • Describe it. In the New Project dialog, pick Describe it and write what to build in a sentence. Sensei makes a private repository in Kosuke-Org from a starter, deploys it and starts the chat on your sentence once the first deploy lands.
  • Import as an App. In the New Project dialog, pick Import from GitHub, choose the repository and turn on Import as an App. The switch reads "One chat that saves every passing Turn straight to" the repository's default branch, then "No tasks, no pull requests." It is off by default. The repository stays where it is. Its open pull requests do not become sessions.
  • Switch a project. Open Settings > Advanced and choose App under Workflow, then press Switch to App to confirm. See Switch between YOLO mode and Collaboration.

With the CLI, kosuke projects create --description "<what to build>" describes a project, and kosuke projects create --repository-url <url> --name <name> --workflow yolo imports one. Add --prompt "<first message>" to an import to start its chat on that message when the first deploy lands. The command prints the new chat's chatSessionId. See CLI.

An imported YOLO project shows its deploy while it runs. Once the deploy lands, opening the project creates its one chat and opens it, with the preview beside it. Write your first message there.

The default branch must accept Sensei's pushes​

YOLO mode saves each Version straight to the default branch, so Sensei checks that branch before it imports or switches. Sensei refuses with "BRANCH_PROTECTED" when the branch needs a pull request, approving reviews, passing status checks or signed commits that the Kosuke App cannot bypass. The message names the branch and the rule. A branch that only blocks force pushes or deletion, or requires linear history, passes. If GitHub cannot answer, Sensei says so and you can try again.

To use YOLO mode on a protected branch, change the rule on GitHub or let the Kosuke App bypass it, then try again. A push GitHub still refuses later ends the Turn on "Not saved".

Work in the chat​

Write to the chat as you would to any chat session. When the Turn ends, Sensei runs the project's typecheck and build, and when they pass it commits the changes to the default branch and shows "Version N saved".

  • If the checks fail, the Turn ends on "Not saved" with the error. Fix it sends the failure back to the chat. Discard changes drops the Turn's changes.
  • If someone pushed to the default branch while the Turn ran, Sensei rebases the Turn onto that commit before it checks. When the two cannot be combined, nothing is saved and "Not saved" says the branch moved.
  • Restore on a saved Version brings its files back as a new Version. It also undoes the commits made on the branch after that Version, including commits pushed from outside Sensei. Nothing is rewritten.
  • An idea that is not for now goes to the Backlog tab as a Backlog item. Send it to the chat when you want it built.

Pull requests opened on GitHub create no session in a YOLO project, and Sensei does not react to their reviews or checks.

Publish​

A YOLO project can be published. Publish in the project header puts the latest Version live at <label>.kosuke.app. Roll back puts an earlier Release live again, and Unpublish takes the app down without deleting its data. A project made with Describe it is addressed by its repository's name. An imported repository is addressed by the project's name and the start of its id, such as todo-app-3f9a1c2b.kosuke.app, and publishes only when it has the kosuke-starter layout: a bun.lock, a build script, @cloudflare/vite-plugin, and a wrangler.jsonc, wrangler.json or wrangler.toml naming main and compatibility_date, with no D1 database: the app keeps its data in its own Turso database, which the preview and the published app share through TURSO_DATABASE_URL and TURSO_AUTH_TOKEN. Without it, the Live view says what is missing, and the API refuses Publish with 409 PUBLISH_UNAVAILABLE.

Switch between YOLO mode and Collaboration​

Open Settings > Advanced and find the Workflow setting at the top, above the agent settings. It has two options, Repository (Collaboration) and App (YOLO mode), each with a one-line description. The selected option, marked Current, is the project's mode. Choose the other option to switch: a dialog lists what the switch does to the project's tasks and asks you to confirm. The selection moves only when the switch is done, so Cancel or a refusal keeps the current mode. You can switch as often as you like.

While the App is published, the Repository option is disabled and reads "This App is live. Unpublish it first, then switch."

Switch to App

  • The default branch has to pass the check above.
  • Sensei refuses while any Turn of the project runs, while a queued message carries files, or while a Todo task has attachments. The message names the task.
  • Every Active and Under Review task becomes Completed. Its branch and pull request stay on GitHub.
  • Todo tasks and the messages waiting Up next in a task become Backlog items.
  • The project gets its one chat. Past tasks are hidden while it is in YOLO mode.

Switch to Repository

  • The chat becomes one Completed task, so its history stays readable.
  • Tasks that the switch to YOLO completed come back when their pull request is still open. A pull request opened meanwhile arrives as a task.
  • Backlog items and the chat's messages waiting Up next become Todo tasks, each ready to start on its own branch.

With the CLI, kosuke projects workflow set <projectId> --workflow yolo or --workflow collaboration does the same, and it refuses in the same cases. Sensei can switch a project for you. It lists the tasks a switch to YOLO closes and switches only after you say yes. See Sensei.

Limits​

  • A YOLO project has one chat. A second chat is refused.
  • Nothing is reviewed before it reaches the default branch. Keep that branch for work you are happy to see live.

Next steps​