Using Malini

Workstreams

A workstream is one task in Malini - its own git worktree, branch, and chats - that Malini takes from Draft to a merged pull request.

Open as markdown

One worktree per task

The + next to a repository starts a workstream. Every workstream is its own git worktree on a branch named malini/<id>, branched from a private clone of the repository. A workstream opened from one of your pull requests keeps that pull request's branch. Malini installs dependencies for you from the lockfile: pnpm, npm, yarn, or bun.

Two agents never edit one checkout, so they never clobber each other.

Before the first message

A new workstream opens on what Malini did to set it up, one step a line: Made a fresh copy, then Checked dependencies with what it found. A step still running shows a spinner. A failed install has Retry on its line, and a copy that fails says Copy failed with the reason, Retry and Remove. The copy starts from the default branch origin names at that moment, so a master repository or a renamed branch needs nothing from you. A workstream started before origin renamed its default branch moves to the new name the next time Malini fetches it, as long as the new branch holds every commit of the old one. An empty repository says so in the copy step, and Retry works once it has a first commit.

Once the copy is ready, Quick suggestions labels a box of prompts an agent can take from there:

  • Run it in the browser starts the project the way its README or scripts say, and opens it in the browser beside the chat.
  • Find the biggest CI/CD pipeline optimizations reads the pipelines and their recent runs, and lists the biggest savings first, without changing anything.
  • Find all implicit state machines finds the flags, enums and status fields that track state, and lists their states, transitions and the combinations that should be impossible, without changing anything.
  • Plan a change with me turns on Plan mode, so the agent asks what you want before it writes any code.

Each one fills the composer, for you to edit or send. A workstream another chat started ends its steps on Prompt from that chat instead, and lists no starters: that prompt goes first, once setup is done.

The inspector is on the right from the start, its striped top reading No changes · Build something great until the workstream has a change.

Where checkouts live

Checkouts live in ~/malini unless you pick another folder, where Finder, your editor and your terminal find them:

  • ~/malini/repositories holds the clone of each repository;
  • ~/malini/workstreams/<id> holds each workstream.

Malini's own data, its database and settings, stays in ~/Library/Application Support/malini.

To keep checkouts elsewhere, open Settings, This Mac and press Change…. The folder must be empty and on the same disk, since the move is a rename, not a copy. Malini moves every checkout there the next time it starts, the same way it moved them to ~/malini below; Restart now starts it again right away, and Cancel move keeps them where they are. If a move fails, Malini puts back what it moved, keeps the checkouts where they were and says so in Settings, This Mac. If Malini quits halfway through a move, the next start finishes it.

Malini used to keep checkouts there too. The first launch after the update moves them to ~/malini, archived workstreams included, and leaves a link at each old folder, so an old path still opens. It repairs each checkout's git links, moves its Claude Code chat records along, and reinstalls each moved workstream's dependencies once in the background, carrying on at the next launch if you quit first.

A broken checkout

When git can no longer read a workstream's checkout, Malini checks once what broke and fixes it. Most fixes need nothing from you: Malini runs them as it finds the break. The rest need one press of a button: the failed step in the setup steps of a new workstream has it, and so does the top bar status of every workstream, which says Needs you and what broke. It stops reading that checkout until it works again, so a broken checkout does not fill your log or keep git busy. A prompt you send meanwhile waits in the queue, the composer says what it waits for, such as "Sends once you sign in to GitHub", and it runs once the checkout works. Malini looks again after 5 seconds, then less often up to every 5 minutes, and each time you come back to its window.

Malini fixes these on its own:

  • Its copy of the repository is gone. Each workstream keeps its git data in Malini's clone of the repository, ~/malini/repositories/<owner>__<name>/base. When that folder is gone, Malini clones the repository again from GitHub and links every workstream of it back, with the clone's progress in the step. Your files stay as they are. A branch that is on GitHub comes back from there; a branch that was only on this Mac starts again from where it began, and its commits show as edits; the step says Nothing lost when there were none. When the clone has no room, the step says the disk is full, and Malini clones again once 1 GB more is free.
  • A missing folder, .git link or git record of the checkout. A missing folder comes back from its branch with the newest checkpoint of its uncommitted work.
  • A lock a stopped git command left behind. It goes only when it is more than 2 minutes old and no git command holds it.
  • A damaged index and a HEAD that names no commit.

Each repair moves each git file it replaces to malini-repairs in the repository's git folder first, and it never changes your files. When a repair fails, the step and the top bar show Try again.

The rest takes one button, and Malini goes on by itself once the cause is gone:

What broke The button What Malini does
GitHub is signed out, so the clone cannot start Sign in to GitHub Shows a code to sign in with in the step, then clones
GitHub has no such repository, or not for you Use another account Signs you in again; Show in Finder opens the folder, whose files stay
The folder that holds every workstream is gone Make it again Makes it, clones each repository, and brings back each branch
Git does not trust the folder, as another user owns it Trust this folder Adds the folder to safe.directory in your git config
Git or Apple's Command Line Tools are not installed Install Opens Apple's installer and goes on once git works
Git waits for the Xcode license Accept license Accepts it, after macOS asks for your password
macOS blocks the folder Open Privacy settings Opens Full Disk Access and goes on once Malini can read the folder
The disk is full Open Storage settings Opens Storage and goes on once there is room
Anything else Ask an agent Starts a chat whose agent fixes the checkout and keeps every file

When git says something Malini does not know, the step shows git's own line, such as fatal: bad object HEAD, and Report opens a problem report with that line filled in. Malini never makes the folder that holds every workstream again on its own, since you may have moved it: move it back, and each workstream works again. Once a button's fix is done, Malini repairs on its own whatever else it finds broken.

Disk space

Workstreams share disk space, so you can keep as many as you like.

  • Checkouts are copy-on-write. A new or restored workstream clones its files from the repository's clone, so a file takes no extra space until an agent changes it. Malini first moves that clone to the latest default branch it fetched, so files that changed there are shared too.
  • Dependencies are shared. With npm or yarn, a workstream copies node_modules the same way from another workstream with the same lockfile, instead of installing again. pnpm and bun share packages through their own store.
  • One clone per repository. A repository you open from a folder on your Mac is cloned from that folder and shares its git objects, then fetches the rest from its remote. A GitHub repository is cloned without the old versions of its files of 1 MB or more, and over 1 GB without the history of any file; git fetches an old version the first time something reads it.
  • Archives stay small. Archiving keeps the commits, uncommitted changes, chats, attachments, every image or recording a chat showed, and the text files up to 10 MB in the .context folder, so an agent can still learn from the work. It drops the rest of .context, such as other screenshots, downloads, builds and dependency folders.
  • Scratch goes with the workstream. Agents keep builds, logs and video frames in the workstream's own scratch folder, the $TMPDIR of every command they run. Archiving, saving for later or deleting the workstream deletes it.
  • Old chats are packed. Closing a chat or archiving its workstream compresses the chat's tool calls, their output and the agent's thinking, most of what a chat holds, to about a fifth of their size, and Malini gives the freed space back to the disk. The chat reads the same as before, and restoring the workstream unpacks it.
  • Malini checks first. It starts no workstream, clone or restore when the disk has less than 2 GB free, and says how much is free.

Malini owns git

The agent bridge refuses to commit, push, rebase, reset, or run gh pr create. It refuses git checkout, git switch and git worktree too, and points the agent at a new workstream instead. Agents write code, and Malini writes the history: it commits, pushes, and opens the pull request when you ask it to. It commits as you, with your GitHub name and noreply address, never the email in your git config, so a public repository never shows your private address. Each new workstream writes that name and address into its clone's own git config too, so a commit from your terminal, the agent or Xcode carries it as well. A commit made before that, or that still carries your email, gets the noreply address when Malini pushes it, with its date, message and files unchanged. A commit already on GitHub keeps its address. While Automations, Settings, Sign contributions is on, as it is unless you turn it off, each commit ends with Co-authored-by: malini-agent[bot]; turned off, nothing names Malini.

Ports

Two workstreams that both serve on 5173 fight over it. List the ports your workstreams serve on by name in .malini/workspace.json, and each workstream gets its own:

{ "ports": ["web", "api", "db"] }
  • Each name gets a free port from 40000 to 48999 in each workstream, the same one every turn, until you archive, save for later or delete the workstream.
  • Every command an agent runs, and every command you run from the chat, reads it as MALINI_PORT_WEB, MALINI_PORT_API and MALINI_PORT_DB: the name in capitals, with - as _. MALINI_WORKSTREAM_ID holds the workstream's id, for a database or a Compose project that needs its own name.
  • Keep the usual port as the fallback, so the base checkout and your own terminal still get it: vite --port ${MALINI_PORT_WEB:-5173}, or "${MALINI_PORT_DB:-5432}:5432" in a Compose file.
  • A name is lowercase letters, digits and single dashes, up to 32 of them. An object keyed by name works too, such as { "ports": { "web": 5173 } }, and Malini reads only its names. A name you add counts from the next turn, and agents add one when they need a port the file does not list.
  • What keeps running shows a leased port with its name, such as web :40000.

The sidebar

  • The focus strip at the top narrows the sidebar. All shows everything, and + pins an organization or a repository beside it. Click a pin to see only its chats and workstreams, and right-click it to unpin it. A dot on a pin means something in it needs you.
  • The sliders button beside it, Sidebar options, sets up the sidebar, and Malini remembers. Its panel opens beside the sidebar, so the rows stay in view while you change them. It asks three questions. Repositories picks Separate, grouped by organization and repository, or Mixed, one flat list grouped by Status, where each row names its repository. Show picks Everything or Only what needs me. Only what needs me groups by Status and lists only Needs you and In review, with Nothing needs you. when both are empty and an N hidden row at the bottom whose Show all lists everything again. Row height picks Compact or Comfortable, the same setting as Settings, Look & sound.
  • Advanced, under the three questions, opens the grouping and the order, and reads Custom once they differ from what your answers make. Grouping picks Organization, an owner row above its repositories, Repository, every repository on its own, Status or Day. Status splits your work into Needs you, In progress, In review, Idle, Stale and Merged. Stale work has had no agent run for a week. Day splits it into Today, Yesterday and Older, by when an agent last ran in it or you started a chat there. Under Status or Day, Sub-grouping lists each section by Repository, by Organization, or flat with No grouping, where each row names its repository. Click a section to fold it. Ordering picks Manual, the order you drag, Last active, Created, newest first, or Name. A repository or an owner sorts by the newest work in it. Rows drag only in Manual order, grouped by organization or repository. Reset goes back to what your answers make, in Manual order.
  • A new install starts on Organization grouping, Everything and Compact.
  • New chat opens the command center on your repositories, connected ones first, and a pick starts a workstream in that repository. Nothing starts without a repository. Grouped by Status or Day with a repository's pin open, New chat stays on top and starts a workstream in that repository.
  • By organization, every repository sits under a row named for its owner. Click the owner to fold or unfold it, and Malini remembers. The repository list groups them the same way, one line per repository, and folding an owner in either place folds it in both. A search opens every owner it matches.
  • Every repository you connect shows, with or without workstreams, until you hide it. A clock and a count on its row say how many wait saved for later.
  • Lines added and removed, unread marks, queued prompts, and pull request status on every workstream. A row's icon turns blue when its agent waits on an answer or an approval, and red when its run failed. Amber means a problem, such as a pull request Malini could not merge. A workstream an agent started shows its own state like any other, and the row of the chat that started it shows none of it.
  • Settings → Look & sound → Sidebar density picks Compact rows, the default, or Comfortable ones.
  • Sorted by Manual, drag to reorder, or use ⌥↑ and ⌥↓. An owner moves with everything under it.
  • Hide in a repository's right-click menu takes it out of the sidebar and keeps its workstreams. Unhide brings it back from Hidden in the repository list, and so does cloning or opening it again.
  • Recently archived, at the bottom of the sidebar, lists archived workstreams, newest first. Drag its top edge to make it taller, or click Show all. Click one to restore it, or open the pull request it merged. Archiving stops everything still running from its folder: the commands its agents left in the background, what those commands started and let go, its Docker Compose containers, and every container that mounts a folder inside it. A command you run in your own terminal keeps running, and so does a service you start from the repository's base checkout, which every workstream shares. When Malini starts, it stops whatever is still running from the folder of a workstream that is no longer live. It also clears a folder that comes back where an archived workstream was, and keeps every file that git does not ignore and no saved commit holds.
  • Chats at Home and in an organization no longer exist. Malini archives the ones you had on its next launch, and they neither show in Recently archived nor come back.
  • The clock beside a workstream's archive button saves it for later. Like archiving, it keeps its commits, uncommitted changes and chats, and frees its checkout, but it keeps all of .context until you archive it. It waits on its repository's page instead of Recently archived.
  • Connect another repository from the button at the bottom of the sidebar, by right-clicking an empty part of the sidebar, from the File menu, or from Malini's icon in the menu bar. Open folder… connects a folder on your Mac, and Find repository… finds any repository you work on, on GitHub or already here. Or press ⌘K and type its name. Each one starts a workstream in that repository and opens it.
  • File → New Workstream (⌘N) starts a workstream in the repository you're in, and File → New Chat (⌘T) opens a chat in the workstream you're in.
  • Open a workstream in your editor or reveal it in Finder.
  • Open a repository on GitHub from its right-click menu, the repository list, or its page.
  • A click outside an open menu closes it and does nothing else, so the next click is yours again.
  • Each workstream holds many chats, as tabs, named for you. A new workstream is New workstream until its first chat has a name, and that name names the workstream too. Double-click a workstream's name, or pick Rename in its right-click menu, to name it yourself. Enter or a click elsewhere keeps the new name, and Escape keeps the old one. Malini never renames a workstream you named, and its branch and folder keep their id. Name chats names a chat from your message as you send it, and again from the reply once the turn ends. A name is three words at most. A message with no task in it, such as hi, leaves the name as it is, and the next turn tries again. A shimmer writes each name in as it arrives: on the chat tab, on the sidebar row, and on the commands an agent leaves running. ⌘W closes one, and the ones that don't fit wait behind the … at the end of the tabs. A closed tab folds away, and the tabs after it slide into its place. The clock at the start of the tabs lists the last ten chats you closed, and ⌘⇧T reopens the latest one where it left off. A chat you closed before writing in it is not kept.
  • Files open as tabs beside the chats, from the Files tree or a file the chat names, and you edit them right there. Drag a chat or file tab, or press ⌥← and ⌥→ on it, to put them in any order, and the order stays. Malini saves as you type, so there is nothing to press, and only a save that fails says so, under the file. The first edit keeps a preview tab, and the tab marks what your branch added and removed. A strip along its right edge marks every change in the file, and a click on a mark goes there. A file tab you come back to opens where you left it. A change the agent makes to an open file shows in its tab, unless you have typed something it has not saved yet.
  • A Markdown file opens Raw, its text to edit, and Rich beside it renders it for reading. Switching keeps your place, the tab remembers which one you picked, and a file opened at a line opens Raw. Rich marks your branch's changes too, down to the words that changed. Its links open their files in tabs, and its images show from the worktree.

A repository's name in the sidebar opens its page, on its scratchpad, where you keep ideas and checklists. The bar at the top of its page names it as owner / name, and the name opens the repository on GitHub. Any paragraph moves into a new workstream, and a heading takes the text under it, up to the next heading. Saved for later, in the bar, counts the workstreams you saved for later, and hovering it lists them, newest first. Click one to resume it where you left off, or archive it to move it to Recently archived.

Your open pull requests

Hover Pull requests, in the bar of a repository's page, to list the pull requests you have open in it, each with its number, whether it is a draft, and when it last changed. It shows once the repository has a GitHub owner and its clone is ready. Malini reads them from GitHub each time the list opens, and leaves out pull requests from forks. Hover one and click Continue here to open it as a workstream on its own branch, at the commit GitHub has, so you pick up where you left off on another Mac. Claude names it from its title. One you already work on here says Open, catches up with what you pushed elsewhere, and takes you to it, and one you archived comes back from Recently archived. Malini opens none of them on its own, so a pull request you merged or closed on another Mac never turns into work here. Like every workstream, each one stays on its own commits while main moves elsewhere, and Malini merges main into it once main conflicts with it or changes a file it changed.

From prompt to merged

  • Draft opens a draft pull request. The agent writes the commit subject and the pull request title in your repository's convention, and Malini commits, pushes, and opens it. From then on, the top bar shows its number under the status, such as #203 · 2 of 5 pending under Checks running: the number opens it on GitHub, and the status opens its checks, review and notes. Malini then watches the checks of what it pushed until they pass or fail, for an hour at most. While it waits on them, the top bar says Checks starting until GitHub lists them, never the result of the commit before. A check that fails gets one re-run of its GitHub Actions jobs, then Fix checks fixes it and Malini pushes the fix to the draft, never marking it ready or merging it. When the same failure outlasts Fix attempts before asking you, the top bar says Fix gave up, and the chat that opened the draft hears which checks failed, with their links and the head. Turn off Fix failing checks on drafts in Defaults to leave a failing draft to you until you press Merge. A turn without a commit subject commits under the pull request title or the files it changed, and a pull request without a title takes the branch or the files changed, never your prompt, the chat's name or the agent's reply. An automation's edits commit under the Commit: line its agent ended with, but that line never titles the pull request; Fix checks and Address review fall back to "Fix failing checks" and "Address review feedback" only when their agent wrote none, and a merge keeps its merge message. While Sign contributions is on, the description ends with 🧑‍🍳 Cooked with Malini, which opens into a table: Chef links your Bestboy profile once it is public, and your GitHub profile until then, Kitchen counts the agents that worked in the workstream, and Dishes says who did them. Turned off, a pull request Malini already opened loses the footer the next time Malini retitles it, unless you edited the description yourself.
  • Merge queues it: push, mark ready, update from main, wait for checks and review, and merge with the repository's own merge method. The workstream archives itself when it lands and moves to Recently archived. Keep, beside Cancel while the merge is queued, leaves it open on Merged instead, with Archive.
  • A check that hasn't reported yet still counts. Some checks, such as Cloudflare Workers Builds, show up on GitHub only once their build finishes. Malini waits while the head commit has a check suite with no check run yet, from an app that reported on the base branch's last 10 commits, for up to 20 minutes after GitHub created the suite, so the merge never lands before the build that deploys it. Once such a suite posts its run, Malini gives GitHub up to 30 seconds to list that run with the pull request's checks before it merges, and stops waiting as soon as it is listed. An app that never reports on your repository, such as one whose suites stay queued forever, holds nothing.
  • Your next prompt continues it. A prompt you send in a workstream on Merged first moves its branch onto the latest main, and the agent works from there. When it cannot, because you are offline or GitHub does not answer, a toast says why and the composer keeps your prompt.
  • It runs on events. Draft, Merge, Cancel and Keep each log a Button clicked, and the Reconciler's Shipping rule takes the workstream from there. It moves only when Malini logs something, such as a turn or an automation that ends, a change on GitHub, or a wait that ends, and it picks up where it left off after a restart. A chat or an automation ships with the Open draft or Merge automation, and that automation finishing moves the workstream on.
  • A dev server doesn't hold it. Malini merges past a command the agent left running in the background, and archiving stops it. When the branch needs main merged in first, Malini stops those commands before it merges, since the checkout cannot move under the agent's open run.
  • While it waits, it works. Malini merges main into the branch when GitHub says it is behind or conflicts, and runs the Fix checks, Resolve conflicts, and Address review automations as needed, then replies to and resolves the review threads it fixed.
  • A failing check gets one re-run first. When GitHub Actions jobs fail for the first time, Malini re-runs the failed jobs once, and the top bar names them, such as Queued for merge · Re-running e2e on macOS 3/5. When the re-run passes, the merge goes on with no agent. When it fails again, Fix checks starts, the top bar says Fixing e2e on macOS 3/5, and its agent hears that the failure repeated, so it fixes the cause instead of re-running it. A check outside GitHub Actions, or one GitHub will not re-run, goes straight to Fix checks.
  • What GitHub says is on the record. Malini reads the pull request on GitHub each time the pull request bar does, and on its own only while shipping waits on GitHub: every 15 seconds for a queued merge, every 45 seconds while its checks run, on a draft too after Malini pushes to it, and every 2 minutes while it waits for a review or for you, never while an agent or an automation works. Each read that finds something new is a pull-requests:pull-request-changed event: its checks, its review with each change request and open thread, how far it is behind its base, whether it conflicts, and whether you may merge it. Every automation Malini starts for it names that read as its cause, so the Explorer traces a Fix checks back to the prompt behind the change it fixes.
  • Blockers clear themselves. When a reviewer requests changes, Address review runs on its own, and the top bar says Clearing blockers. Each review is addressed once, then Malini waits for the reviewer, and a new review that requests changes again is addressed in turn.
  • The top bar says when an agent works. While a chat or an automation in the workstream works, it says Agent running, and Needs you while one waits for your approval.
  • Main reaching your files merges it in. Malini fetches main every five minutes and compares it with each workstream, and again after every commit there. When merging main would stop on conflicts, or main changed a file the workstream changed too, Update from main merges main in once no agent works there, nothing is uncommitted, no merge is queued and its pull request has not merged or closed on GitHub, Resolve conflicts resolves what conflicts, and a workstream with a pull request gets the resolved merge pushed. A merge without conflicts stays local, and the workstream's next push carries it, so it starts no checks of its own. This happens before you click Draft or Merge, so a conflict never waits for the merge to surface. Main changing only other files starts nothing: the workstream stays on its own commits until you merge it. Lockfiles, changelogs and files .gitattributes marks linguist-generated count only when they conflict. Turn it off, make it ask, or narrow it to conflicts on Update from main's page in Automations.
  • Errors are retried, in plain sight. After a step fails, Malini tries again in 30 seconds, then waits twice as long each time, up to 10 minutes. The top bar and the workstream in the sidebar turn amber and say what failed and since when, such as Couldn't open draft · 3 tries since 14:02. A note above the composer says why, how many times Malini tried and when it tries next, and What GitHub said when GitHub refused the push; the strip under it names what failed, with Retry now, and Cancel draft while it opens a draft. The agent reads the same note with your next prompt, so asking it why the pull request is not open gets the real reason.
  • A workflow refusal waits for you. GitHub refuses a push that adds or changes a file under .github/workflows/ when the sign-in that pushes lacks the workflow scope, and no retry fixes that, so Malini stops trying and the note says waits for you. When your gh sign-in lacks the scope, Allow workflow changes in the note shows a one-time code and opens GitHub, the same way Sign in to GitHub does, and once you approve it every workstream waiting on it pushes again on its own. Running gh auth refresh -s workflow in a terminal works too; then press Retry now. When a personal access token or a GitHub App pushes instead, give it the workflow permission on GitHub, then press Retry now.
  • A push without write access waits for you. When your GitHub account can read a repository but not push to it, GitHub refuses every push, so the note names the account and the repository, such as octocat can't push to acme/app, and waits for you. Once an owner gives that account write access, press Retry now.
  • Offline or GitHub down, it says which, on every page. The top right corner says Offline as soon as your Mac loses its connection, and Malini reads GitHub again the moment it is back. Online, it says GitHub is not responding when GitHub doesn't answer, GitHub is down when it answers with a server error, or GitHub rate limit reached when it limits your account, and Status opens githubstatus.com. It clears on its own once GitHub answers again: Malini asks every 30 seconds while it waits. To ask now, press Refresh in the pull request detail.
  • Needs you, only when it does. A reviewer asks something only you can answer, a fix gave up, GitHub blocks the merge, your GitHub sign-in expired, or a git operation stopped part-way. The top bar names the reason, and once it is resolved, the merge picks up again on its own: when GitHub shows a change, its branch moves, a turn in the chat ends, a git operation you aborted or finished leaves the checkout, or a retry comes due. There is no Retry in the top bar for these, because a retry without the details does nothing new; Retry shows only beside a failure whose reason is on screen. When a fix gave up, See why shows that automation's chat and why the merge stopped, with Retry merge, which queues it again.
  • A limit doesn't stop it. A fix automation whose turn hits a usage limit or an outage pauses and keeps the merge waiting, without spending an attempt.
  • Exactly the commit that passed. Malini merges with --match-head-commit.
  • Closed on GitHub? Reopen brings the same pull request back, with its number and reviews, or Archive puts the workstream away.