# Cards and the Deck

The app follows what happens to your sessions, pull requests, Deploys and Crons, whether a session runs `/kosuke:ship` or not. Each thing that happens is written once into the thread that holds it, as a one-line **event**. Sensei then reads the new events and decides whether something needs you. If so, it draws a **card** in that thread. If not, the line is all you see. The app draws no card of its own, so every card says what Sensei found worth your decision, in words it chose.

## Events

An event is a short line in a thread's stream, such as "Checks failed on #2161: typecheck, lint" or "Ada approved #2161". It records what happened and asks nothing. It sends no notification. Events come from:

- A session: a turn that ended, stopped or failed, a question from the agent, a `/kosuke:ship` stop, a message into the session, a start that was refused, a reassignment, and a session that moved to another thread, was archived or was deleted.
- A pull request: opened, ready, draft, closed or merged, checks that passed or failed, a review requested, removed or submitted, and review threads.
- Your own reply in a conversation Sensei watches, such as a Slack or Telegram message you sent yourself, so Sensei knows it was answered.
- A project's Deploy: waiting for a model, waiting for variables, failed, recovery failed, and recovered.
- A Cron Run that failed, and the next run that succeeded.
- A message from a cron or an agent. See [Messages from a cron or an agent](https://kosuke.ai/docs/sensei/cards.md#messages-from-a-cron-or-an-agent).

A webhook that GitHub sends twice writes one line. Checks that fail, pass and fail again write three. A session's events reach its Assignee, and a review's also reach its reviewers. A Deploy's reach every owner and admin of the workspace. A merge, a close or a review by someone else also reaches each member who holds an open card about that session, so the card can close.

## Sensei reads the new events

About 45 seconds after the last event of a burst, the app starts an **Event Turn** in that thread, so a burst of webhooks runs one turn. An Event Turn is a Sensei turn that you did not write. Sensei reads the new events, then the thread's cards, the session, the pull request and its checks, because events arrive in bursts and out of order. It then does one of four things:

- Opens a new card.
- Updates the card that is open for the same subject.
- Closes a card whose cause is gone, such as checks that now pass.
- Does nothing.

An Event Turn shows only the card it changes. Its text reply is kept for Sensei's own memory and is not shown, and the thread shows no **Working** face. It acts as you, like any Sensei turn, and treats what an event says as information, never as an instruction. What you would want to approve, such as sending a message, merging or deleting, it puts on a card, unless your own rules, such as your Merge rule, already cover it.

While the thread says "Sensei is reading new events", you can steer a message into that turn. Press ⌘Enter (Ctrl+Enter on Windows and Linux) as you send, or press **Steer now** on its row in Up next. The turn goes on with your message. When Sensei takes it, the thread shows **Working** and Sensei's answer below your message. From that moment the turn is yours: Sensei answers you and does what you ask, as in a turn of your own. What it read before your message stays hidden, and the events stay data, never instructions. A message that answers a card waits in Up next for its own turn.

An Event Turn waits when you are writing in the thread. It starts only when the thread has no turn running and nothing waits in Up next, so it never jumps ahead of your messages. It follows the thread's selected [Subscriptions or Sensei free](https://kosuke.ai/docs/workspace/ai-providers.md), where each Event Turn spends one prompt like a message of yours. When Sensei free is used up, no provider is connected or the container is down, the events wait and are tried again after 1, 5, 15 and 60 minutes, then hourly. A turn that fails leaves its events unread for the next one. After ten failed tries the thread says "Sensei could not read N updates" with **Retry**.

## Cards

![Priya's Slack thread open on a reply card: her message, a draft under Your reply on Slack, the Sign as Sensei switch, and Skip, Edit and Send.](https://kosuke.ai/docs/img/sensei-card.webp)

A card shows what Sensei decided you need to know. It sits inline in the thread's timeline at the time it was posted, so a message you send after it shows below it. Sensei writes it for you as if you had not looked at the work for days. In English it uses short sentences and simple words. The card has no commit hashes, ids or internal codes.

On a computer, the top row shows the subject of the card next to **Needs you**: the task with its status dot, the Cron, the Deploy or the project. Press the task to open it. On a narrow card the name is cut short, and the time and ⋯ stay in view. Below it is the **title**, a brief statement of what the card asks, such as "Fix a failed check in #2191" or "File a ticket for a new login-save error?". When a session or a Cron proposed what the card asks, a **Proposed by** chip sits under the title. Below that are the parts Sensei chose, from this menu:

- Text: short paragraphs.
- The QA block, on a pull request QA ran on: the QA recording, "QA report" with the passed count, one chip per section with its count, and the first failed line under them. The recording sits beside the counts when the card is wide and above them when narrow.
- Evidence: one list of the other findings under the QA block. Each row has a state (passed, failed, waiting or info), a label, and a one-line result. Values wrap by word, never mid-word. Press a row to open its details, and press it again to close them. Sensei opens the row the decision rests on. Another file of a session or a Cron run, or a file of the workspace can sit beside the rows as a preview. It opens at full size, and a file opens to read only. A file that changed after Sensei drew the card says so.
- The questions an agent asked. Sensei rewrites them in plain words, checks them, and shows **Sensei's check** with its verdict (it agrees with the agent, disagrees, or could not check) and why. Each option says what you get. Sensei's pick starts picked and shows **Sensei recommends**. The agent's own pick shows **The agent's pick** when it is another option. An option Sensei advises against shows **Sensei advises against**.
- The teammates to ask for a review, with why. Only a card that asks for a review lists them.
- What changes in a text, such as a QA Guide, a Memory file or a task description. One line counts the changes, the sections they touch, and the lines added and removed. Press it to read the real lines, by section, with removed lines in red with − and added lines in green with +. Unchanged parts are folded and named. Press one to read its lines, and press **Hide** to fold it again. A single small change opens by itself.
- A merge plan: pull requests in the order to merge them.
- The Deploy variables form.
- A person: who a message or a request is from, with their role.
- An image, such as a screenshot.
- An event: a calendar slot, with its time and who is invited.
- A ticket: a Backlog ticket, with its title and priority.

A card about a pull request always shows its QA report and the files it has, such as a prototype or findings.

On a computer, above the footer, a line reads "When you tap" and the name of the button, and says what happens. The footer reads a negative button, a **Reply** button with its icon, and a button named for what it does, such as **Fix**, **Merge** or **Answer**. The negative button reads **Reject** in red on a card with a button that acts, and a neutral **Dismiss** on a card without one. Sensei can word it to fit the card, in one word such as **Skip** or **Cancel**, and choose red or neutral apart from the words. On a card that drafts a reply to a message, **Reply** reads **Edit**, with a pencil. On a computer, the three buttons sit together at the right of a thread card, in one row even on a phone-sized window. In desktop Deck, the negative button sits on the left edge, **Reply** in the middle and the other button on the right edge. It is never a bare "Approve". In the iOS app and in a narrow browser window, cards have the layout described in [Deck](https://kosuke.ai/docs/sensei/cards.md#reels), including in a thread. The card does not show the detailed instruction that **Approve** sends. On a computer, open the ⋯ menu and choose **Show what the session gets**, **Show what Sensei runs**, **Show the ticket prompt** or **Show what Sensei saves**. A card that only points somewhere, such as one that asks you to reconnect GitHub or open billing, has no instruction: it shows **Dismiss** and its link buttons.

A model may get a value wrong. **Reply** is how you correct it before anything runs.

A card has at most three buttons, in this order: its negative button, **Reply**, and its primary button. Each reads one word. Sensei writes the card's own actions: at most one primary, the filled button, and at most one red one, which takes the negative button's place, such as **Reject** on a review. Each action has a label and the message it sends. Pressing an action sends its message to Sensei in the card's thread, as your own message, exactly as written. Every press closes the card. On a computer, point at an action or move to it with Tab to read the message it sends. A phone does not show it. A card drawn before this rule with more actions shows them all, and the extra ones sit beside the primary on a computer and above the buttons on a phone. A card drawn before actions existed has one button, its verb, which works the same way.

The link buttons sit in the card's ⋯ menu and read **Open pull request**, **Open Cron run** and **Open project**. The ⋯ menu has no **Open session**: the task chip in the top row opens it. **Approve** runs the instruction, and Sensei does what the card's title, outcome and request say. A card that asks for a review names the reviewers and why Sensei suggests them. When Sensei can suggest nobody, the card has no button. A merge or an approval pins the commit it was drawn from, in the instruction.

| What happened | What the card tends to show | Its button |
| --- | --- | --- |
| The checks failed | The failed checks with their links | **Fix** |
| QA failed or was blocked | The QA result and what the failures mean | **Fix** or **Retry QA** |
| The agent asked a question | The questions, with the recommended options picked | **Answer** |
| A session drew a prototype for you to approve | The prototype and what you decide | **Approve** |
| The pull request is ready and GitHub requires a review | A short explanation, the QA Report with its recording, and who to ask | **Request review**, which asks them with your GitHub CLI and gives the go-ahead to merge once approved |
| The pull request is approved and has no go-ahead | A short explanation and the QA Report with its recording | **Merge** |
| A teammate asked you to review | A short explanation and the QA Report with its recording when QA ran | A button that names your review |
| Several pull requests are ready | A merge plan | **Merge all** |
| A cron or agent found a ticket | Why it exists and what the sender found | **File ticket** |
| A Cron Run failed, or a Deploy failed | What failed, and a link | A button that fits, or links only |

This is a pattern, not a fixed list: Sensei decides what each card shows.

A question card is interactive. Sensei's recommended options start picked, each pick changes the outcome and the instruction, and **Answer** sends it. **Reply** sends your own words to Sensei instead, without the picks.

On a computer, when a card holds two or more questions, it shows one question at a time in a question box. A bar at the top of the box has one segment per question: the one on screen is dark, the ones you have seen are grey, and the rest are light. Tap the right edge of the box for the next question and the left edge for the one before it; tap a segment you have seen to go back to that question. There is no Next button. Each option is one large row, with what it means under its name. Sensei's check folds to one line, and a tap opens its reason. Before the last question, the footer's button reads how many questions are left, such as "2 more questions". On the last question, the card shows "When you tap **Answer**", one row per question with its pick, and what happens: tap a row to open that question again. Your picks stay while you move, and **Answer** sends them all. A card with one question has no bar and no tap edges, but the same large rows and folded check.

Under the answers of each question, **Add a note** opens a field. With an answer picked, your text is a note on that answer. With no answer picked, or after you choose **My own answer**, your text is your own answer in place of the options. **With my pick** turns it back into a note. While the field is open, a tap on an answer picks it and stays on the question. After **Done**, the note shows under the answers with **Edit**, and the last step shows it under its answer. Sensei receives each note after its answer, and your own answer in place of a pick. This works on a computer and in a narrow browser window. The iOS app has no **Add a note**: write or say your own answer with **My own answer** instead.

**Pictures in a watched message.** When a Slack, Gmail, WhatsApp or Telegram message holds a picture, Sensei can draw it on the card, under the quoted message or under an evidence row. Each picture is read live through your own connection when you view the card, and Sensei keeps no copy. Click or tap a picture to open it larger. A picture that cannot be read, a HEIC photo, or a LinkedIn or X message's picture stays as words.

**Files on a reply.** A reply card to a Gmail, WhatsApp or Telegram message can carry up to 3 of your Files, from your Personal Files or a workspace you belong to. They show under the draft, and each opens. **Send** sends each file as it was when Sensei drew the card. Gmail sends them in one mail, up to 2 MB together. WhatsApp and Telegram send each file as its own message, up to 20 MB each, with your reply as the first file's caption. Photos and videos go as media, other files as documents. A Telegram caption holds 1,024 characters. If a file fails, the card says which files were sent and which was not. Approving it again sends only the files that did not go, never one twice.

## Approve, Reply and Reject

On a card that sends a message through a connected tool, LinkedIn or X, **Sign as Sensei** sits under **Your reply**. A card that draws its draft without the switch, such as one that goes into a session or to a teammate's Sensei, always sends it unsigned, exactly as drawn. It starts from your saved default in **Settings > Signature**, which is on unless you turned it off. Change it for this reply only: the note says whether your default is on or off, and the draft shows the exact message **Send** will send, including the marker when on. Slack, WhatsApp, Telegram and LinkedIn use `[Sensei]`; Gmail uses `Sent by Sensei`. The outcome line also names the marker. Your choice stays with a send while it waits behind **Undo**. Cards in the iOS app have no **Sign as Sensei** switch: a send from the app follows your saved default.

**Approve** sends the instruction to Sensei, in the card's thread, as your own message. The thread shows the card's short request, not the instruction. Sensei reads the current state of the session or pull request, then does what the instruction says: it sends words into a session, sends `/kosuke:sync-branch`, asks for a review, merges, files a ticket, starts one, or retries a deploy. **Approve** on a card that starts a Backlog ticket opens a new thread named after the ticket, and Sensei starts the ticket there with `/kosuke:ship`. The ticket's events, questions and cards then show in that thread. The card's thread keeps one line, Started and the ticket's name, with **Open thread**. When another thread already follows the ticket, Sensei starts it in that thread instead, and the card's thread still keeps the Started line. Nothing reaches a session without a Sensei turn. When the state changed since Sensei drew the card, such as a newer commit or work that already happened, Sensei says what changed instead of running the old instruction.

**Reply** is the card's button in the web app, with a reply icon followed by the word Reply. It works in the browser on a computer, in the desktop app and in the iOS app, where it is a round button at the foot of the card. The Watch and the glasses answer a card their own way.

**Reply** opens the thread's composer empty, with the card as a chip. Write your own words, such as "also cover Cron runs" or "why not wait?", and send them. Nothing is filled in for you. The app stores your words and closes the card at once: its row reads **Replied**, and the card no longer has its buttons. Sensei then reads your words against the card's current state.

Sensei reads the card's current state, then does one of three things:

- A clear decision, such as "yes", "merge it" or "the second option", takes the card as drawn or one of its paths. A full decision with a clear adjustment, such as "A but without arrow", also counts. A reply that adds more of the same work to the same session, such as "also test the handover" on a Retry QA card, counts too, when it stays within what the card allows. Sensei acts on it at once, within what the card promised plus that adjustment, and reports what it did. It does not ask you to confirm that settled decision again. The card stays **Replied**. A clear decision counts as your go-ahead, as **Approve** does.
- A plan change, such as "yes, and also merge it" on a card that only reruns QA, leaves a decision open or asks for something the card did not offer: a different action, another session, or a merge or review. Sensei answers you and puts a new card for you to approve. The replied card stays in the thread as its history.
- A question, such as "why not merge now?", gets an answer. Sensei does not act on it. If the question still leaves a decision open, Sensei puts a new card for you to decide.

A reply that answers a session's question card goes into that session at once, as you wrote it, with no card to approve. Any other reply never reaches a session as you wrote it: Sensei writes its own message.

If the app refuses your reply, the card stays open and says why. If the card changed since you opened it, the app shows the new card and says that Sensei updated it. Your words stay in the composer, and sending again replies to the new card. A reply the app stores has already closed its card, so there is nothing to undo.

A card you replied to reads **Replied**. Older cards approved with edited words, and Watch answers sent as text, read **Approved with your words**.

The negative button closes the card and records the decision, whatever its words: **Reject**, **Dismiss**, or Sensei's own. It sends nothing to Sensei. On a card that drafts a reply to a Gmail, Slack, Telegram or WhatsApp message, the negative button, such as **Skip**, also marks the messages it answers read. If that fails, they stay unread and the card stays closed. On a yes/no card it is the no. Its row in the thread reads **Rejected**, **Dismissed** or **Skipped**, or Sensei's words as they were on the button. Sensei cannot open the same card again for the same state, so it comes back only when the state changes, such as a new commit or a different failing check. If the decision fails, the card comes back with a line saying so, and you can press the button again.

On a phone, swipe a card right to approve it or left for its negative button, or press the buttons. The swipe shows the words of the button it will press. A card the swipe cannot act on, such as a Deploy card that asks for values, springs back and says why.

- **In the iOS app**, on Home, the card goes and an **Undo** pill holds the decision for 5 seconds, with a ring that empties. Nothing is sent until the ring is empty, and **Undo** brings the card back. Your next decision, a reply, or leaving the app sends it at once. Your phone taps as a swipe acts. A card in a thread acts at once, with no **Undo**.
- **In a narrow browser window**, the card goes and **Undo** shows above the composer for four seconds. Nothing is sent until they pass, and **Undo** brings the card back. Leaving the thread sends it at once.

If the turn that carries your Approve cannot start, because no provider is connected, Sensei free is used up or the container is down, the card stays open and says why, with how to fix it. After the send the card closes. If the turn that carried it fails or is stopped, or you delete the message from Up next, the card comes back with "The last attempt stopped" and the reason. Nothing replays by itself. A card changes as events arrive, so a press on a card that changed since you opened it is refused and the new one takes its place.

Only a card's link buttons, the button of a link card and the Deploy variables form act outside a Sensei turn.

Sensei deletes a Backlog ticket only for a card you approved that asks for it, or when you ask it to in a thread, and only a Backlog ticket. It always asks first, naming each ticket, and deletes only the ones you confirm in your next message.

A card closes when Sensei sees its cause is gone. A thread the app opened and you never wrote in disappears from **Needs you** and **Done** when Sensei closes its only card, for example because a teammate approved. It sends no notification, stays reachable by search and by link, and comes back when a new card opens in it. A thread where you wrote anything is never hidden.

## Deck

![The desktop Deck showing Priya's reply card on its own, with Thread and What the agent gets under it, and a row of buttons ending in a wide Send button.](https://kosuke.ai/docs/img/sensei-deck.webp)

Deck shows one card at a time, in an endless feed with the next cards below it. On a computer, Deck and Threads are the two views of the Sensei page. Choose **Deck** or **Threads** in the switch at the right of the title bar, or in the Sensei toolbar in a browser. Press **R** to go from one to the other, and **⌘D** to open Deck from any page. **Deck** counts the threads that need you. Deck keeps the app sidebar with its panel closed and leaves out the Threads list. It shows the card wide, with the composer open under it, which writes to the card's thread. Press the tasks pill, the Tasks toggle or **T** to open the card's thread in a sidebar: its tasks, then its conversation. A task opens in the task modal, and closing it returns to the same card. **Threads** opens on the card's thread, and Deck shows the same card when you come back. In the iOS app, Deck is the **Home** tab. In a narrow browser window, Deck is the whole Sensei page.

Press the card's verb, or **⌘→ / Ctrl→**, to act. Press the negative button, or **⌘← / Ctrl←**, to turn it down. On a phone, swipe right for the verb or left for the negative button. **Reply** puts a card chip in the composer and sends your message to that card's thread. Without a chip, sending starts a new thread, with a link to open it. On a computer, the thread chip opens the card's thread. Go back to return to the same card, or choose **Open in Sensei**.

**Later** hides a card from Deck for 30 minutes. On a computer, press **Later** beside the thread chip, or **⌘↓**. The hold survives a reload on the same device. A new push, check result or review on its pull request brings it back sooner. A new message in its thread also ends the hold. The card returns to its ranked place and keeps its question and picks. **Undo** brings it back at once. The card stays open in its thread as Needs you. On a computer, Later is disabled on the only open card.

In the iOS app, Deck is **Home**, the first tab and the one the app opens on. The **Home** tab and the app icon count the cards that wait for you, leaving out the cards in Later.

- Home shows one card at a time, with the next card peeking under it. A card taller than the screen scrolls inside itself, under its buttons. The top row shows where the card comes from, who and when.
- The round arrows button at the card's top right flips the order between oldest first and newest first. Sensei saves it as your Deck order, so a computer shows the same order.
- The card shows its title and its text. The text is shown whole when it fits, and is cut with **… more** otherwise, which opens the whole text in a sheet. A quoted message longer than four lines is cut with **More**, and **Less** cuts it again.
- The foot of the card holds round buttons for the negative button, **Reply** and **Later**, and a wide button for the verb, such as **Approve**, **Send** or **Fix**. On a card that drafts a reply, **Reply** reads **Edit**. A card without a verb has no wide button.
- Swipe the card right for the verb, or left for the negative button, from anywhere on the card. A swipe the card cannot take springs back and says why, such as "2 more questions" or "Fill in the values". A swipe that starts at the very edge of the screen switches tabs instead.
- Each decision and each Later waits 5 seconds behind an **Undo** pill. See [Approve, Reply and Reject](https://kosuke.ai/docs/sensei/cards.md#approve-reply-and-reject).
- Tap **Later**, or pull the card down from its top, to hide it for 30 minutes. On a card you scrolled down, the pull first scrolls back to the top.
- Tap **Reply** to write to the card's thread, with the card quoted at the top of the composer. You can attach files and pick the model. When you send, the card leaves and "Sent on its thread" shows, with no **Undo**. Remove the quote to send your words as a new thread instead, and the card stays.
- Hold **Reply** to talk. When you let go, the card leaves and **Undo** holds your reply for 5 seconds. See [On iPhone](https://kosuke.ai/docs/sensei/voice.md#on-iphone).
- A question card shows one question at a time, its options as large rows. A pick moves on to the next question. Tap the left or right edge of the screen to go to the question before or after. Before the last question, the wide button reads how many questions are left, then **Next** once you answered. On the last, the verb, such as **Answer**, sends every answer at once. **My own answer** opens a field in the card where you type your answer. Hold its microphone to say it instead.
- A QA card shows a still of its recording. Tap it, or **QA report**, to open the report with its video and steps.
- A prototype card's preview opens the prototype on its own page, where you can comment on it.
- A Deploy card shows fields for its values. **Save** stays dimmed until every value is in.
- The **Open** group at the foot of the card lists **Thread**, **Task**, **QA report**, the card's own links and **What the agent gets**, which shows the detailed instruction. **Thread** and **Task** open in the app. Other links open in your browser.

A card in a thread has the same look and buttons, and acts at once with no **Undo**. Holding **Reply** there does not record.

In a narrow browser window, Deck has the web's phone layout. **New thread** sits in the header: tap it to write a new thread, or hold it to talk. The footer of a card has the negative button, **Reply**, **Talk** and the verb. **Talk** starts recording at once, hands free, and the spoken reply waits four seconds with **Undo** before it goes. **Later** sits beside the card's header row, or pull down from the top of the content.

Deck shows the oldest cards first unless you change its order, so you clear older asks first. A card moves to the back when it opens, when Sensei changes what it says, or when it comes back to you after a failed Approve or a dropped reply. Activity in its session alone does not move it. The card you are reading stays on screen when the others move. A card you open from a thread, Search or a notification shows first. A Later card that comes back on its own takes its place by when it last changed. A history line shows your last decision, with **Undo** when that decision allows it.

Deck shows only cards. Your Backlog tickets stay on the Backlog board and in their projects. When no card remains, a computer shows Sensei's face, "Nothing needs you right now." and the composer, which starts a new thread. The iOS app shows "All clear" and "Nothing needs you.", or, when cards wait in Later, those cards side by side, the one that comes back soonest first. Swipe through them and tap the middle one to bring it back. Pull down to refresh and bring every Later card back. In a narrow browser window, pull down or press **Refresh** to bring Later cards back first on this device.

## Deploy cards

Some cards are about a project's deploy rather than a session. They reach every owner and admin of the workspace. Sensei never starts, answers or changes a deploy itself, and never changes a project's setup, services or environment: only a workspace admin does, in the app. See [Who can deploy](https://kosuke.ai/docs/code/deploy.md#who-can-deploy). They post in one thread for each project, "Deploys of" and the project, and every later Deploy of that project reuses it.

- A workspace Deploy waits when workspace Credentials cannot run the deploy agent. The card links to the Deploy Chat and asks you to tell a workspace admin to fix those Credentials. A personal-project Deploy follows the owner's Deploy model setting, or the first connected provider in catalog order and its catalog default model when unset, and stops with a notice naming the problem and the setting when that choice cannot run. Limits and failures never move a Deploy to Free.
- The deploy agent asks only for what the app cannot start without. When it does, the card shows the Deploy variables form, with a field for each one and the deploy agent's reason. **Save and continue** saves what you filled in as the project's environment variables and resumes the deploy. A field you leave empty is not saved. **Deploy without them** resumes it with none. Both work only for a workspace admin. The values go straight to the Deploy, so no Sensei turn ever sees a secret.
- When a deploy fails, the card says what failed, with the fix the deploy agent proposes and a link to the Deploy Chat. A workspace admin retries the deploy there.
- When a first deploy fails, the app starts one Recovery Deploy on its own. This is a receipt, and nothing asks for your action. When the Recovery Deploy fails too, Sensei can draw a card with the fix. A Recovery Deploy follows the same credential rule and spends no prompt.
- When a deploy lands, a receipt tells you, such as "storefront is deployed. 3 services are up." This sends no notification. When the deploy agent generated values, used test keys or mocks, or turned features off instead of asking, one line sums them up, such as "3 values stubbed, Stripe checkout off. Add real keys in project settings."

Importing a repository adds one line to your Sensei Chat, such as "You imported storefront into Acme. Its first Deploy started." The line says the deploy started only when it did. See [Deploy your project](https://kosuke.ai/docs/code/deploy.md).

## Cron cards

A Cron Run that fails writes an event in that Cron's thread. When the cause is one you can fix, such as no AI provider for the workspace, credits at the limit or a project that is not deployed, Sensei can draw a card with a way to fix it and a link to the Cron. The next successful run lets Sensei close it. See [Crons](https://kosuke.ai/docs/automations/crons.md).

## Messages from a cron or an agent

A [cron](https://kosuke.ai/docs/automations/crons.md), or an agent in a chat session, can send your Sensei a message for something it found and may not do itself: a ticket it wants to file, a ticket to start or delete, tickets to merge, a Cron to create, a merge plan, or a QA guide to save. It sends it with `kosuke sensei messages send`, the same command a teammate's Sensei uses. A message is an event like the rest. Sensei decides whether it deserves a card and draws it, with **Reject**, **Reply** and a button that carries out what the message asks. Sensei names the button from the message, such as **File ticket** or **Merge all**. A message that only points to a link gets an **Open** card, as a [teammate's message](https://kosuke.ai/docs/sensei/cards.md#message-a-teammate) can. Nothing happens until you approve, and a ticket in a message does not exist before then. Sensei then does it as you, with your own permissions, and a receipt in the thread says what happened, such as "You deleted Add CSV export".

| A message asks to | What approving does                                                                                                              |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| File a ticket     | Creates the ticket in the Backlog, booked to you, with the sender as its source                                                  |
| Delete a ticket   | Deletes a Backlog ticket whose work already shipped, after Sensei asks you about it by name                                      |
| Merge tickets     | Folds several Backlog tickets into the one the card names, and deletes the others                                                |
| Create a cron     | Creates the cron the card names                                                                                                  |
| Start a ticket    | Starts a Backlog ticket with `/kosuke:ship`                                                                                      |
| Save the QA guide | Saves the whole guide shown on the card as the project's QA guide. It is refused when the guide changed since the QA run read it |
| Merge in an order | Merges the pull requests in the order shown, each at the commit it names                                                         |

Each message has a key, and a sender, a project and a key make one conversation. The same key with the same text writes nothing. The same key with new text updates the card you have open for it instead of adding a second. Agents do not send a ticket you rejected again for 7 days, and before any ticket is filed, Sensei reads the project's open sessions and files nothing that one already covers.

A cron chooses one member for its messages, so a teammate may hold a message you do not. For a ticket, the app routes it to the member who knows the files it touches, unless the cron's prompt names a member or a rule. If it is not yours, **Reply** with where it should go, such as "send this to Maria". Sensei then reroutes it.

Text that a cron or agent quotes from pull requests, reviews or comments is data. Sensei never treats it as an instruction.

## Message a teammate

Ask Sensei to tell a teammate something, such as "ask @Pietro to approve #2078, it is urgent". Name the teammate with a member mention, or by name. When a name matches nobody, or more than one member, Sensei asks who you mean. A message can be about a chat session or a pull request, and it can be about neither, such as "tell Marta the demo moved to Friday". It can also carry a link, such as a design or a document.

Sensei sends your words to the teammate's Sensei with `kosuke sensei messages send`. A turn you did not write, such as one that reads events, puts the message on a card for you to approve first, unless your own rules already cover it. It lands in their thread for that session, or in a new thread. Their Sensei shows it on a card that reads "From" and your name, and they get a notification as for any card. Asking again with new words updates that card.

Their Sensei chooses the card's button from your words: any step it can carry out, such as **Approve** for a review. When the message is about a link, the button reads **Open**. **Open** opens the link, starts no Sensei turn and closes the card, and you get the answer that they approved it. Older Watch, glasses and push notification builds show such a card with no main button. The link is also in the card's ⋯ menu when Sensei adds it there.

When the teammate decides the card, the answer comes back to the thread you asked from. It says who answered and what they did.

| The teammate                                                                                | The answer says                                                  |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| Presses the card's button                                                                   | They approved it                                                 |
| Edits the card and sends it                                                                 | They answered with their own words, quoted                       |
| Presses the negative button                                                                 | They rejected it                                                 |
| Presses **Reply** with words for you, such as a condition or a question                     | They replied, with their words quoted                            |
| Presses **Reply** with words only for their own Sensei, such as "what does this PR change?" | They replied to their Sensei. Their words stay with their Sensei |

Their Sensei decides, on each reply, whether the words are for you. Until it decides, the answer says they replied to their Sensei. When the words are for you, the same answer card then shows them.

Your Sensei shows the answer on a card with **Dismiss** and **Reply**, so you get a notification.
