Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

121 KB
Raw Blame

Changelog

Unreleased

Security: bots can't be steered by what they read

  • Bots are never relaxed. 1.5.2 stopped asking about planted instructions when a strong model was in use, because large models resist them. That also applied to bots, which have nobody watching. A bot on a strong model that read a poisoned file or page could schedule runs, save memory or message the fleet. Bots and scheduled runs now keep the full protection, whatever the model; it's relaxed only in a chat you're in.

  • A bot's own tools are guarded too. They were added after the protection and were never checked.

    • After a bot reads outside content: scheduling its own runs (bot_schedule), creating or retiring bots (bot_spawn, bot_retire) need your yes.
    • Once hidden instructions are found: messaging or delegating to the fleet (bot_send, fleet_tasks, fleet_delegate, fleet_pipeline), writing its standing notes (bot_state) and delivering files (bot_deliver) need your yes too.

    Plain web research doesn't ask, so fleets keep working.

  • Bots ask instead of failing. The question comes to the Needs-you card in Mercury Desktop and to your phone. No answer within the bot's wait time (10 minutes by default) is a no. These questions offer only "Allow once" or "Deny".

  • No laundering across the fleet. Work handed from one bot to another used to start clean. Now mail, delegated tasks, results and batch digests carry what the sender had read, including "hidden instructions found". Hidden instructions inside the mail itself are caught as well.

1.5.2 — bots you can watch, approvals one at a time, complex work done properly

Chat: complex work done the way Mercury Code does it

A real chat ("install the HyperFrames skills, then make an intro video with an ElevenLabs beat") went wrong in a chain:

  • the HyperFrames CLI refused to run ("requires Node.js >= 22");
  • Mercury tried to upgrade Node with brew, then switched to an AI video model, which hit its quota;
  • it made a black MP4 with ffmpeg and announced "Video created & sent!";
  • it wrote six summary documents nobody asked for.

Each link is fixed:

  • Commands use Mercury's own Node. A service PATH often lists an old system Node (/usr/local/bin) before a newer one, so every Node tool the model ran used Node 18 even though Mercury runs on 22. The Node that runs Mercury now comes first in a command's PATH, so npx, hyperframes and other Node CLIs get the right version.
  • A video that never rendered isn't sent as if it worked. Before send_file sends a video, ffmpeg's own detectors look at it once. If it's black for most of its length, or the same frame the whole time (the animation never ran), it isn't sent, and the model is told why, so it fixes the render or says plainly that it couldn't. Without ffmpeg, files are sent as before.
  • Mercury Code's discipline, in chat, when the work is real. It applies when the model makes a plan of three or more steps, which is its own sign that this is multi-step work. Quick questions and ordinary chats don't change.
    • Working rules with the plan:
      • act, don't announce;
      • a step is done when its result exists and was checked;
      • when a tool or requirement fails, fix the cause or ask: never switch to a method you didn't ask for, or present a workaround as the result;
      • no summaries nobody asked for.
    • One check before "done": if the turn made something (files, renders, sent files), the model gets one round to look at what it produced and fix it, then reports only what it verified. It's the chat version of Mercury Code's verification gate.
  • Always: never call something done without checking it, and no unrequested summary or README files.

Plans that keep up

  • A plan no longer freezes mid-way. The checklist moved only when the model ticked a step, and models often finish the work and forget the last tick. Stopping a task also left its step "in progress" for good. In one owner's chats, 7 of 21 plans were stuck like that (✓✓✓✓◐). Now, when a turn ends:

    • finished, only the last step unticked: it's marked done, since the reply is that step;
    • a reply with several steps still open: "Plan paused" at the first open step, with "say continue to pick it up";
    • stopped by you, or failed: "Plan stopped", with no guessed ticks.

    Only the turn that worked on a plan settles it, so a quick question asked in between leaves it alone. The plan tool also reminds the model to tick its finished steps before its final reply. The terminal's checklist gets the same end-of-turn tidy.

  • An open plan in an idle chat never looks in progress. No pulsing step while nothing runs, plans saved before this release included.

Desktop: "Needs you", one at a time

  • Approvals look like the rest of the app. A question Mercury is waiting on (allow a command, write a file, use an MCP tool, keep going, pick one) used to be an amber box in the conversation, with the raw request dumped in monospace and one box stacked under another. It's now a card pinned above the message box, in the same style as the plan:
    • a plain title ("Run a command", "Write a file", "Use create_issue", "Suspicious request: schedule a task");
    • the exact command or path underneath, folded when long;
    • what it read and any warning in a quiet line;
    • the main answer as the primary button, and Deny quietly on the right.
  • Several questions are a carousel: "1 of 4", ‹ › or ←/→ to move between them. Answering one shows the next, and the card leaves when none are left. Y / N and 1–9 still answer from the keyboard.
  • Bots ask the same way: their questions use the same card on every bot screen, and in Live it sits above the message box, with how long the bot will wait.

Bots: watch them live, talk to them, fewer false alarms

  • Live, the first tab of every bot and fleet. What the bots are doing as it happens, one card per run:

    • who started it (you, a schedule, another bot) and what was asked;
    • each step as it runs: tool, running → done or failed, with the error;
    • what the bot is writing as it writes it;
    • how it ended.

    A run's status comes from its latest event, so it can't go stale: "Waiting for you" appears only while a question for that very run is pending, and a run cut short by a restart says it ended instead of "working" forever. Long runs fold their earlier steps, and a fleet shows every member's runs together. Opening the screen mid-run shows what already happened: the runtime keeps a short, capped log of recent events, in memory only. The old Activity tab is now History.

  • Talk to them from the same place. The box under the feed messages the bot, or any crew member in a fleet. A message to a busy bot shows as queued and runs after the current one. A bot's question sits inside its run with its buttons, and every finished run has Reply, which answers with that run quoted.

  • Far fewer "needs you" questions that weren't needed. A bot's shell command used to be scanned for anything that looked like a path, and each one was asked about as a file to write. Now the scan reads the command the way the shell does:

    • code inside a heredoc no longer counts (it used to ask to write to "/", "/*" and "/\s+");
    • quoted paths with spaces stay whole;
    • /dev/null is not a file;
    • ls, find, cat and grep read, they don't write;
    • -o only means an output file to curl, wget and sort (to find it means "or").

    A read-only command (with pipes and 2>/dev/null) that touches only folders the bot may read now runs without asking. Writes, the network and anything that can run other commands still ask.

  • Bot faces always have colour. A face shown in two places shared one colour gradient. If the first copy sat in a hidden tab, macOS drew the others black, or as bare white eyes. Each face now has its own gradient, written in notation every engine reads, with a solid colour under it.

Voice: only the words are spoken

  • Directions stay out of the audio. Asking for a natural reading ("keep it natural, don't make it sound like it was shared by AI") could put that request into the recording itself. The cause was Gemini, which takes the style as words in front of the text ("Say this …:") and reads anything that isn't a short description of a voice out loud.
    • Only a short tone goes to Gemini now ("calm and warm", "like a news anchor"). Requests about the audio itself are dropped, since they shape how the words are written, not how they're read.
    • Anything that still slips into the script is taken out before it's spoken and used as the style instead: an opener like "Here's the script:", "Tone:" lines, "Narrator:" labels, "[soft music]" and "(pause)" cues, titles and markdown. A plain script, a poem with real parentheses for example, is left exactly as written.
  • The voice service you name is used. "Read it with ElevenLabs" uses ElevenLabs (likewise OpenAI, Gemini, Deepgram). If it isn't set up, Mercury tells you instead of quietly using another.

Skills: the one you name is the one used, for the whole chat

  • Skills installed for other agents work in Mercury. Mercury now also reads the shared skill folders ~/.agents/skills (where npx skills add installs) and ~/.claude/skills, so asking for HyperFrames finds the official HyperFrames skills: how to build, animate and render the video. Before, Mercury only had satellite pieces, rendered a composition whose animation never ran (solid colours), then reached for an AI video model instead.
    • Kept small: a family of related skills is one line, so the shared list adds about 3 KB to the cached prompt.
    • Safe: shared skills are read-only, and they can't raise Mercury's permissions. Mercury's own skills win on a name clash. Set MERCURY_SHARED_SKILLS=0 to turn this off.
  • Named means that one. "Use hyperframes", "via Hyper Frames", "beats with ElevenLabs": Mercury loads the matching skill, even written loosely, and follows it to the finished file. It passes the named service to the media tools, which now accept a service by name ("elevenlabs", "lyria", "veo"). It never swaps in a different method on its own. An AI video model is not a HyperFrames render, and Google is not ElevenLabs. If the named one isn't there or fails, Mercury says so and asks.
  • Remembered for the chat. Skills and services you named or used in a chat are re-stated on every later turn of that chat, so "where is the video?" or "try again" continues with HyperFrames instead of drifting.
    • A skill's instructions are loaded again when the work continues.
    • A skill named like an everyday word ("documents") counts only when it's clearly picked: next to "skill", after "use", "using", "via" or "through", or as #documents.
  • Skills can use their own files. Loading a skill now says where its folder is, so the references and scripts it mentions can be read.

Second Brain: one copy of each thing, real people

  • No more copies. The same fact was being saved again under each new wording: "Heer is my wife", "User's wife is Heer", "User is married to someone named Heer", "Heer is user's spouse"… The match only looked at beliefs of the same kind with near-identical words. Now one check sees past wording:

    • you count as one person however you're named ("I", "my", "the user's", your name);
    • "wife", "husband", "spouse" and "married" are one relation, and "buy" and "purchase" are one action;
    • the kind no longer has to match ("fact" vs "relationship").

    A second wording now supports the first instead of being saved as a new belief. When it adds a little detail ("…, married since 2019"), the belief takes the fuller wording, unless the original is in your own words.

  • Copies already saved are folded once, after a backup (second-brain.pre-tidy-1.db), and again after each reflection pass. The belief that's kept takes over the copies' evidence and support. It's chosen in this order: your own word, then the best established, then the one that says the most.

  • What it never folds:

    • claims with different numbers ("married in 2019" vs "married on October 9, 2025": that's a conflict to settle, not a copy);
    • a claim and its negation;
    • a longer claim that adds a relation or feeling ("…, about to become a father", "Zaid dislikes Shehzen");
    • anything into a shorter one that would lose what the longer one says.
  • One person, one entry. A short name that is the start of exactly one other person's name is the same person ("Shehzen" / "Shehzen Sidiq Malla"), and the two merge, keeping the full name as an alias. Ambiguous first names and anyone you edited yourself are left alone.

  • Names nobody checked get checked. Names saved before the "is it a person?" check existed were never checked, which is how "Calcutta", "Kobo" and "Password" got onto the people list. They're queued once for the same slow check: 20 names a call, under the daily cap.

Security: prompt injection

  • Text Mercury reads can no longer steer what it does. A report showed a weather page with an HTML comment telling the AI to create a schedule and keep it from the user: big models refused, a small one (on Mercury Free Router) created the cron job. Mercury now enforces this in code, whatever the model:

    • Untrusted reads raise the bar, in every mode. Once a turn has read anything from outside the chat (a file, web page, search result, command output, attachment, GitHub issue, or someone else's message), certain actions need your explicit yes, even under Allow All: creating schedules, writing memory, creating or installing skills, granting permissions, sending messages or files, pushing or opening issues and PRs, and plugin actions that change something. The approval shows what was read and the full action.
    • Hidden instructions are found and flagged. Mercury looks for instructions aimed at an AI in HTML comments, hidden markup, zero-width text and wording like "ignore previous instructions". When it finds some, it tells you in the chat, notes it after the content for the model, and asks before commands, file writes, fetches and delegation too.
    • Unattended runs refuse instead of asking. Scheduled runs and bots can still deliver a scheduled task's results to you.
    • Schedules are always visible. Every new scheduled task is announced by Mercury itself with the prompt it will run, and its approval shows that prompt rather than a short description. A task that asks to keep something from you is always asked about, even under Allow All.
    • Delegation doesn't reset it. Sub-agents inherit what their parent read. Each bot turn keeps its own record.
  • Data can't leave quietly through a web address. A page doesn't need a hidden instruction to leak something: it can ask, in plain words, for "https://…?key=" to be opened. After reading outside content, Mercury checks the request itself before opening a page, searching, or running a command. It asks you first, showing what would leave, when the request carries something like a key or token, an encoded blob, a long value, or a long subdomain. Commands that upload data (curl -d, piping into curl or nc, scp to another host) are checked the same way. Opening links that were in what Mercury read, or in your message, never asks, and neither do plain lookups.

  • Memory only learns from you. After a turn that read outside content, Mercury's learning pass uses only your own words: its reply is left out, and anything it would learn must quote you. A turn that found hidden instructions learns nothing. Pasted text written to an AI, messages from other people and group chats are never learned as yours, including in the background reflection pass.

  • Fewer false alarms. Documentation about AI isn't an attack. Mercury's own ARCHITECTURE.md ("Agent loads system prompt") was flagged, and from then on every command in the turn asked for approval. In visible text, only the two signatures of an attack now count: "ignore previous instructions" and "don't tell the user". Wording like "system prompt", "the agent should" or "assistant:" counts only when it's hidden (HTML comments, invisible markup, zero-width text). Across Mercury's own docs, false alarms fell from 36 files to 4, and those 4 quote attack phrases on purpose.

  • Approvals depend on the model. Large models notice and refuse planted instructions; the report that started this was a small model obeying them. So with a strong model (Claude Sonnet/Opus, GPT-4o/4.1/5, o1/o3, Gemini Pro, Grok 4, DeepSeek V3/R1 and similar), Mercury no longer asks before actions after reading outside content, even when it found hidden instructions. It still:

    • warns you in the chat when hidden instructions were found;
    • notes after the content that it is data, not a request;
    • asks before data leaves in an address or a command (a key, a token, an encoded blob), whatever the model.

    Small, local and unknown models (mini, nano, flash, Haiku, 7B/8B, Free Router "auto") keep every approval, and so does any model the rule doesn't recognise.

  • No cost when nothing outside is read: turns that read nothing from outside the chat behave exactly as before. The checks are pattern scans, with no extra model calls.

Desktop: a new chat that knows you

  • Ready to type. The cursor goes to the message box when you start a new chat, switch to another chat, or come back to the chat view, so there's no need to click into it first.
  • Suggestions made for you. A new chat opens with a greeting for the time of day, a line about what you're up to, and four things you might want next. They're grounded in what Mercury knows: your recent chats and what you last asked, your goals and projects, your scheduled tasks, what it made for you, and the day of the week.
    • Click one to put it in the message box. Edit it, or press Enter to send it. More ideas shows others.
    • Different each time. Each new chat shows the ones you've seen least lately. One you use leaves the list, and recent ones aren't suggested again soon.
    • Lightweight. The suggestions are remade at most every 6 hours, and only after you've used Mercury since the last time. That takes one small call on the learning model, in the background and never while you wait. When learning is paused or the budget is low, simple rules make them at no cost.
    • Nothing runs by itself: the text you send is the text you saw.
  • It never breaks a new chat. If suggestions can't load (an older runtime, a fresh install, a failure), the page shows the greeting and the box; a crash in the page shows a plain greeting, never an error.

Desktop: batches of images

  • Several images for one ask are one group. While they're being made, the chat shows one placeholder grid (pairs for two or four, rows of three for three or five or more), and each tile turns into a tick as its image is ready. The finished images land in the same grid, so nothing jumps, with the prompt under it.

  • Progress shows in one place. Before, each image call added its own step row, its own placeholder and its own timer, stacked one under another. Now the turn's status line says it once: "Creating 5 images · 4 of 5 ready · Adding detail".

  • Fixed: a batch showed one image. All the images were made and saved, but only the first reached the chat and Artifacts. The image tool lists each file on its own line, and chat folders are named after the chat ("2026-11-11 Go to the GitHub training"). The space in that name cut each path short, and only the first image, quoted in the tool's "to edit it" hint, was found. A list line that holds one path is now read to its end, so every image arrives.

  • Slide through them. Clicking an image opens it full screen:

    • arrows, ← → keys or a swipe to move between images, a "3 / 5" counter, and a strip of thumbnails to jump to any of them;
    • behind each image, a blurred copy of it fills the screen with its colours;
    • Info opens the details (save, copy path, delete).

    In Artifacts, a batch's preview has the same arrows and keys, and a full-screen button.

  • Artifacts keeps a batch together. Images made together are one card with a mosaic and a count. Opening it lets you step through them.

Artifacts: deleting for real, and cleaning up

  • Deleting an artifact deletes it. Before, delete removed only Mercury's own copy, which is usually a hard link to the file in your output folder. The file stayed in ~/mercury-artifacts and no space came back. Now the file goes too when it's Mercury's own (its output folder, a generated image, video, sound or voice). A file Mercury wrote into one of your projects is never deleted; only Mercury's copy goes, and the button says so.
  • Clean up, behind the ⋯ menu in Artifacts. It shows the space artifacts take, counted the way the disk counts it, and has:
    • Clean up…: space per kind with a bar, delete a whole kind, delete everything older than 7, 30 or 90 days, or delete all. After each action it says how much was freed.
    • Select…: tick several cards (a batch counts as one) and delete them together.
  • A delete made in one Mercury process (the desktop app's server, Mercury Code, the CLI) is no longer undone when another process saves an older copy of the artifact list.

Optimus: screenshots per model

  • Cheaper screenshots. Optimus took every screenshot at 1280×800, whatever the model. Mercury now asks for the size each model is billed least for:

    • Claude and OpenAI: 1024×640, about 30–35% fewer image tokens.
    • Gemini: 768×480, about 75% fewer.
    • Open vision models: 896×560.

    Optimus 0.5.2 follows this, and the model still clicks in the picture it saw. Use zoom for a closer look at small text. Set MERCURY_SCREENSHOT_BOX=1280x800 to keep one size for every model.

  • Vision models on OpenAI-compatible APIs can see the screen. Before, a screenshot reached the model only on Claude and the OpenAI API. OpenRouter, LiteLLM, Mercury Cloud, Ollama and LM Studio vision models got no image at all and used Optimus blind. The screenshot now follows the tool result as an image.

  • Models that can't see images no longer cause a screenshot to be taken. With Optimus 0.5.2, look and act say which window is in front instead.

  • Vision models named "…-vl" (nemotron-…-vl, kimi-vl, InternVL, MiniCPM-V and others) are recognised as seeing images.

Fixed

  • The device token from /server token showed cut off on a terminal. The menu that shows it counted the token as one screen row while the terminal wrapped it over several, so redrawing the menu overwrote part of it. It is now shown whole.

Video and music

  • Mercury makes videos and music. Ask in your own words, use the desktop chat box's Create menu (it replaces the Image button; image, video or music), or type /video <the shot> (--portrait, --seconds 6) or /music <style, mood, lyrics> (--instrumental, --seconds 60).
    • They take a minute or a few. Mercury says it has started and posts the clip or song into the same chat when it's ready, even if you've moved on. The desktop app shows it as a new message with a player, Telegram and WhatsApp receive the file, and the terminal shows where it was saved.
    • /media jobs lists what's being made. Stop also stops the video or song that chat is making.
  • Where they come from:
    • Video: Gemini Omni (3–15 s with sound, from a Gemini key in Settings → Voice), or video models on gateways that serve the OpenAI Videos API (LiteLLM, Mercury Cloud once it adds it).
    • Music: Gemini Lyria (clips and full songs), or ElevenLabs Music (from an ElevenLabs key).
    • Images too: a Gemini key also brings Gemini's image models (Nano Banana).
    • Choosing: pick defaults in Settings → AI → Media or with /media video <n> and /media music <n>.
  • No dead ends. When a provider says your account has no quota for a model (a free tier, no billing), Mercury skips that model in automatic picks for a day and uses the next one. /media marks it as skipped.
  • If Mercury restarts while a video or song is being made, that chat is told to ask again, instead of waiting forever.

Speech and voice notes

  • Voice notes both ways in Telegram. Send Mercury a voice note and it's transcribed and answered, as WhatsApp already did. Replies come back as a voice note too, as Telegram's real voice-note bubble, not an audio file. By default this happens when you sent a voice note; /media replies always speaks every reply, /media replies off never does. The text reply always comes as well. WhatsApp follows the same setting.
  • /say <text> speaks it, as a voice note in chat apps and as audio in the apps (add --style "calm"). Or just ask: "send me a voice note", "read this out loud", "narrate this".
  • Choose what speaks and in which voice in Settings → AI → Media (the Images page, renamed), or with /media speech <number> and /media voice <name>.
    • The choices are OpenAI, Gemini, Deepgram, ElevenLabs, or a text-to-speech model found on your providers (OpenAI's tts-1/gpt-4o-mini-tts, LiteLLM, Mercury Cloud).
    • A style ("warm", "excited") is followed by OpenAI's newer voices and Gemini.
    • Reading replies aloud in the apps uses the same choice. With none set, everything follows Settings → Voice, as before.
  • Gemini and ElevenLabs audio is turned into a voice note with ffmpeg when it is installed. Without ffmpeg it is sent as an audio file.

Images

  • Mercury makes real images. Ask for a picture in your own words, use the new Image button in the Mercury Desktop chat box (square, landscape or portrait), or type /image <what to draw> in the terminal, Telegram, WhatsApp, Discord, Slack or Signal. An image model draws it; Mercury no longer writes an SVG when you asked for a picture (it still does when you ask for SVG, a diagram or a chart).
  • Edit what you made. "Make it blue", or send a photo with /image make this a watercolor: the earlier image (or yours) goes to the model as a reference.
  • Found on your providers, automatically.
    • OpenAI (gpt-image, DALL·E), OpenRouter (Gemini image, FLUX, Seedream…), LiteLLM, AI/ML API, Atlas Cloud, Runcrate and Ollama image models are listed without any setup.
    • Mercury Cloud models appear once its model list says which ones make images.
    • Pick the default in Settings → AI → Images, or with /media (/media image 2, /media image auto). Automatic prefers the provider you chat with.
    • If a model fails, the next one is tried.
  • Delivered where you asked.
    • The desktop app shows the image in the reply and keeps it in Artifacts.
    • Telegram, WhatsApp, Discord, Slack and Signal receive it as a photo.
    • The terminal prints where it was saved: the chat's artifacts folder, or ~/mercury-artifacts/Images.
  • Telegram no longer tries to send SVG or BMP files, or photos over 10 MB, as photos (Telegram rejects them); they go as files, and GIFs as animations.

Seeing Mercury work

  • A reply reads top to bottom as it happens. In Mercury Desktop the thinking, each tool it runs, the answer and any notes appear in order at the bottom of the chat, where you already are. Before, the activity sat above the answer and scrolled out of view as the answer grew.
  • Tools show while they run. Each tool appears when it starts, with a live timer, and gets a tick or an error with the real duration when it ends. Before, a tool appeared only after it had finished, so a long command showed nothing. Failures show their reason, and long runs fold earlier steps away.
  • A status line under the running reply always says what's happening ("Running npm test", "Thinking", "Calling anthropic") and how long the reply has taken. If the model sends nothing for 20 seconds it says it's waiting on the model, and after two minutes it suggests stopping and trying again.
  • No more flicker. The status no longer flips back to "Thinking" every few seconds. A reply no longer appears to end while Mercury keeps working, and notes like "Checking my work…" stay inside the reply.
  • Thinking you can read.
    • Claude: Claude 5 models (Opus, Sonnet and Haiku 5.x, Fable) already think, but showed nothing; Mercury now asks for a readable summary.
    • ChatGPT: ChatGPT sign-in models now send a reasoning summary.
    • Other servers: Ollama, LM Studio, vLLM, LiteLLM and other OpenAI-compatible servers had their thinking dropped. It now shows.
    • While and after: thinking stays open while it streams and folds to "Thought for 12s" when the model moves on. Reopened chats keep their thinking and steps.
  • Choose how hard the model thinks, per chat (#188). An Effort picker next to the model in the composer (Auto, Low, Medium, High, plus Off, Extra high and Max where the model takes them) sets the effort for that chat. "Model default" goes back to the model's own setting, which the picker's last item (or /effort global <level>) changes for every chat without its own. In the terminal and chat apps: /effort, /effort high, /effort default. /status shows the effort in use and where it comes from. On Claude 4.6–4.8, thinking turns on when a level is picked and stays off on Auto, as before.
  • Effort on OpenAI-compatible servers.
    • Ollama is asked which models can think, and only those get a picker. gpt-oss gets Low/Medium/High; other thinking models get Off/High.
    • LiteLLM reports each model's supports_reasoning.
    • OpenRouter lists each model's supported parameters, and the effort is sent in its own reasoning field.
    • Other servers (LM Studio, vLLM, custom endpoints) get a picker for known reasoning models: o-series, GPT-5, gpt-oss, Gemini 2.5+, Claude 4.6+ and Grok 3 mini.
    • If a server rejects the effort, the request is resent without it and Mercury stops sending it to that model, instead of the reply failing.

Mercury Desktop

  • See which chats are working. A spinner in the sidebar marks a chat Mercury is working on, and a clock marks one waiting for a free slot. The status bar shows how many chats are running (for example 2/4), and clicking it lists them so you can open one.
  • Choose how many chats run at once in Settings → AI → Chats at once. Automatic picks a number from your computer's memory. A change applies right away.
  • Stop clears what was waiting. When Stop drops a chat's waiting messages, that chat stops showing "Waiting…" and tells you they weren't sent.
  • What each reply cost. Hover a reply to see its tokens, how much came from the prompt cache, its steps and how long it took. The tooltip shows the exact numbers and the model.
  • Today's token split (cached, new and output) appears in Settings → Budgets and in the status bar's token panel. A new "Prompt cache" setting lets cache hits count at their real price. The provider and source breakdowns now add up to the daily total.

Skills

  • Six useful built-in skills. Alongside web-search: computer-health (why the computer is slow or full, what's running, why a container is down), tidy-files (clean up and sort folders safely), data-analysis (spreadsheets and CSVs, computed and checked), long-documents (long PDFs and logs, with page references) and documents (make or convert Word, PDF and slides). None of them can act without asking. Each is installed once: delete one and it stays deleted.
  • tweet-notifier and screenshot are no longer installed or reinstalled on start. If your copy is exactly as Mercury installed it, it's moved to ~/.mercury/skills/_retired-<name>/ (nothing is deleted). A copy you edited stays as it is.
  • No more guessing which skill you meant. Mercury no longer matches your message to skills by similar words. The model picks a skill when its description fits, or you pick one with #skill-name.
  • No default skill can run commands without asking. The old screenshot skill let shell commands and file writes skip approval while it was in use.

Token usage

  • Token usage is now counted correctly (#296, thanks @parz1val-t). Mercury used to record only the last model call of each turn, under-reporting usage by about 6–12×. Every call is now counted, including the steps of a turn that ended early (a failed provider, a pause), so dailyBudget fills up and Token Saver kicks in much sooner than before. If you hit the budget earlier than expected, raise tokens.dailyBudget, or set tokens.cachedWeight (0–1, e.g. 0.1) to count prompt-cache hits at a discount. /budget now shows today's cached, uncached and output split. Usage from past days is not recalculated.
  • Each provider is billed for its own steps when a turn moves from one provider to another.

Faster, cheaper requests

  • Repeat turns hit the prompt cache. The parts of Mercury's instructions that change between turns (what it knows about you, bot status, the clock, the folder) now come after the cached part. A new message reuses most of the previous request on Anthropic, OpenAI, DeepSeek, Gemini and others, instead of about 900 tokens.
  • Long screen tasks cost far less. Only the two newest screenshots are sent on each step. On Anthropic, each step reads the conversation so far from cache instead of paying for it again.
  • No more "Starting" for minutes. If a provider accepts a request and then sends nothing for 150 seconds, Mercury moves to the next provider. Set MERCURY_FIRST_RESPONSE_TIMEOUT_MS to change the wait.
  • No more invented skill picks. Mercury no longer stops to ask which skill you meant, or tells the model you chose a skill (often web-search) when you didn't. Matching skills are suggested and the model decides; #skill-name still picks one directly.
  • Smaller requests. The draw.io tools are only sent when you're working on a diagram.

Chats at the same time

  • Mercury answers several chats at once. A long research run or coding task in one chat no longer makes the terminal, Telegram, the desktop app or a scheduled task wait. Each chat still handles its own messages in order.
  • Sized to your machine. Up to 4 chats run at once, 3 under 8 GB of RAM, and 2 on Termux or under 4 GB. When memory runs short, new chats wait for a free slot, and if memory keeps growing the most recently started task stops while the rest carry on. Set concurrency.maxTurns in mercury.yaml (or MERCURY_MAX_CONCURRENT_TURNS) to choose the limit; 1 restores one chat at a time.
  • Stop really stops. A stopped task no longer comes back a few seconds later. Before, it could resume through an automatic retry after a tool had run, through a stall retry, or through the next message waiting in that chat. Stop also ends everything a running command started (npm run build and the like keep going no more) and drops the messages that chat had waiting. A stopped sub-agent stays stopped.
  • No more "(no text response)". When Mercury Code (or a sub-agent or bot) finishes by writing files or running commands without a closing message, you now get what it did: the files it wrote or edited, and each command with whether it succeeded.
  • /stop stops the chat you're in. Esc in the terminal, the Stop button in Mercury Desktop and /stop in Telegram stop that chat's task and the sub-agents it started. /halt still stops everything.

Providers

  • Remote Ollama behind a username and password. Set username and password on Ollama Local, OpenAI-compatible, LM Studio, LiteLLM or Atomic Chat in mercury.yaml. Mercury sends them as HTTP Basic auth for chat and for model lists, instead of a Bearer key.

MCP

  • MCP text resources can be enabled per server: list bounded catalog pages and read sourced documents or schemas, with separate URI permissions and exact unattended approvals. Resource reads still ask under Web Allow All; cancellation and reconnect never replay a read.

1.5.1 — speech uses the voice you chose, Gemini included

Speech

  • Your voice choice counts everywhere. Reading a reply aloud, voice typing and voice notes from Telegram or WhatsApp use the voice service chosen in Settings → Voice when it has a key. A fresh install with only a Gemini key no longer asks for an OpenAI key.
  • Gemini speaks and listens. Gemini reads replies aloud (about 4 seconds for a sentence) and transcribes what you say, with the same key Optimus uses. A Gemini model that's busy or retired falls through to the next one.
  • The "needs a speech service" notice points to Voice settings and names every option (Gemini, OpenAI, Deepgram, ElevenLabs) instead of an "Add OpenAI key" button.

Mercury Desktop

  • "Update Optimus" says what happened on the microphone & permissions card: updated, no newer version yet, or why it failed. It used to spin for a second and show nothing.

Plugins

  • Optimus 0.5.1 is in the catalog (a plugin-only update, works with Mercury 1.3.9 and newer): the microphone picker, live voice-level test, off switch and permission checks on Mercury Desktop's Optimus page. Update it under Plugins → Optimus.

1.5.0 — Mercury Desktop, updates that roll back, remote access you control

Mercury Desktop (new)

  • One app for chat, code, bots and research. It installs and starts Mercury on this computer for you, or connects to any number of Mercury servers and switches between them from the top bar.
  • Download it at mercuryagent.sh/download. This first release isn't code-signed yet: macOS asks you to allow it once (System Settings → Privacy & Security → Open Anyway), Windows SmartScreen once (More info → Run anyway). On a Mac, curl -fsSL https://mercuryagent.sh/install-desktop.sh | sh installs it with no prompt.
  • Bots 2.0 in the app. An inbox of run reports, create and edit bots in words, answer a bot's question mid-run (Allow once, Always allow, Deny), design a fleet's crew or let Mercury decide.
  • Commands and skills in the composer (/ and #), saved chats, microphone and permissions for Optimus on every OS.

Updates that never leave you broken

  • An Update button, top right, like Chrome's. It appears only when the app or one of your servers has an update, gets more noticeable the longer it waits, and shows what's new before you update. Settings → About checks the app and every server in one go, and "Update everything" does them all.
  • Server updates roll back by themselves. mercury upgrade (and the desktop) waits for running work, downloads with checksums (resuming if interrupted), backs up, installs, starts the new version and checks it works. If it doesn't, the old version and your settings come back on their own.
  • Desktop updates download in the background, resume after a dropped connection, are verified before install, and install when you restart or quit.
  • Required updates (for example a security fix) show a full screen; continuing without updating takes ticking every risk. Everything else is dismissible.
  • One signed update notice tells every install what's current; an unsigned or tampered one is ignored, and being offline never blocks anything.

Remote access you control

  • New devices need your approval. A phone or laptop signing in shows a code; you approve it with approve CODE on Telegram or WhatsApp, in /server, or in Mercury Desktop.
  • Sensitive actions from a remote device ask you first (the shell, Allow All, plugins, channel tokens, restarts, server updates). Remote shell is off by default.
  • Tunnels no longer count as "this computer", unused devices expire after 30 days, revoking a device cuts it off at once, and a known device from a new address tells you.
  • /server and mercury server: remote access on/off, allowed IP addresses, device tokens (list, make, revoke), approvals and the security log. mercury doctor --security checks it all.

Research

  • One visible run: a plan you can approve, live progress with failures and their reasons, "Write the report now", and a report even when a run is cut short.
  • Reports export as PDF and Word, sources show their site icons, and everything Mercury makes is saved in ~/mercury-artifacts (one folder per chat) instead of loose in your home folder.

Also in this release

  • Chat attachments (photos and PDFs), bots take files too, bot avatars, renaming bots.
  • Runcrate provider preset; a declared vision capability beats the name-based guess; a zero daily budget means no ceiling; Telegram keeps typing while Mercury prepares.

MCP servers (ADR-029)

  • MCP servers: Mercury can use tools from Model Context Protocol servers. Add a local server (mercury mcp add files --stdio npx -- -y @modelcontextprotocol/server-filesystem ~/Documents) or a remote one (--http <url>), allow the tools you want (mercury mcp allow), and the agent can call them next to its built-in tools. Every MCP call asks first in Ask Me mode, and Allow All does not cover MCP tools; only tools you list in autoApprove run without a prompt, and only those run when nobody can be asked. Secrets stay in .env as ${env:NAME} references and are masked everywhere they could appear. Local servers get a minimal environment, never Mercury's API keys, and remote servers go through the SSRF guard. Check health with mercury mcp test, mercury doctor --mcp, /mcp in chat, or the new read-only MCP dashboard page. The agent's file tools now always ask before writing mercury.yaml, permissions.yaml or .env, even under Allow All. See MCP Servers and ADR-029.
  • Allow All in the terminal, the web dashboard and Mercury Cloud no longer skips MCP prompts. The terminal attached to the background service (what mercury opens), the dashboard and Cloud sessions share one web channel, and in Allow All it answered every approval with yes on its own. So MCP tool calls, shell commands that change MCP setup, and writes to mercury.yaml, permissions.yaml or .env ran without asking there. They now ask in every channel, as documented. Other prompts still follow the session's mode.
  • MCP tools can show the model pictures. Up to 4 images per call (PNG, JPEG, WebP or GIF) from an MCP server now reach the model as images, the same way plugin screenshots do, when the model and provider can take images in tool results (Anthropic, and OpenAI's Responses API). Elsewhere the model is told an image was left out. Chat history and logs keep only the text, never the base64.

Plugins

  • Plugin images reach the model only where the provider can take them. On Chat Completions providers (Mercury Cloud, GitHub Copilot, Ollama, LM Studio, LiteLLM, AI/ML API and other OpenAI-compatible endpoints) the AI SDK sent a plugin's screenshot as JSON text, so the model got megabytes of base64 instead of a picture. Images in tool results now go only to Anthropic and to OpenAI's Responses API; every other provider, Grok and ChatGPT Web included until they are verified, gets the usual "this model can't view images" note.

1.4.2 — search that finds things, and a research prompt that asks only when you mean it

Web search

  • Three web sources, the ones that work. web_search asks Parallel's public search first (keyless MCP built for agents, about a second, with excerpts and dates), then DuckDuckGo's html page, then its lite page. Brave, Wikipedia, Hacker News and Bing's web feed are gone from web search: Brave refuses automated requests and the others answered general questions badly. News keeps Parallel (article links only, section fronts dropped), then Bing News, Google News and Hacker News.
  • DuckDuckGo parsed exactly. Both pages are read from their real markup: each result's title, the real address behind DuckDuckGo's redirect, and the snippet; ads (result--ad, sponsored rows) are dropped. A challenge is retried once after a short pause, and a page that is neither results nor "No results" is reported as "page not recognised" instead of silently empty. Tests run against saved copies of both real pages.
  • News links open the article. News search used Google News first, whose links are Google redirects (news.google.com/rss/articles/…) that can't be turned into the publisher's address. Bing News now comes first and its links are unwrapped to the real article; Google News is the fallback, and its links are marked as redirects.
  • Search never depends on the model. Results come only from Mercury's own search tools, never from a provider's built-in web search, so search works the same with every model.
  • The web-search skill (1.3.0) explains the sources and tells the model to report which ones failed and why when a search comes back empty.
  • You can see what happened. Every result ends with the trail, for example Searched: Parallel: timed out → DuckDuckGo: 8 results, so "nothing found" and "everything was blocked" read differently.

Chat

  • The research prompt asks only when you want research. It used to fire on words ("latest", "recent", "explain", "today's news"), so "convert the latest epub" or "explain how my build works and fix it" got a research question. The words now only decide whether to check; one short model call decides whether you asked for an in-depth, multi-source write-up. Instructions, quick questions and today's news never get the prompt, and a failed or slow check means no prompt.
  • Quick answer comes first. The picker starts on "Quick answer", so an accidental Enter never starts a long research run.

1.4.1 — Mercury learns how you work, saves its own skills, and searches again

Owner Model: Mercury learns how to work with you (ADR-026)

  • Memory became beliefs with evidence. Every claim about you now carries support and counter-evidence, a confidence that fades unless it is seen again, the context it applies in, and a status: candidate → held → confirmed by you; contested; retired; forgotten. What you say outright beats what Mercury inferred and never fades. Nothing is deleted behind your back.
  • It learns working traits, not personality types: reply length, when to ask before acting (per project or domain), options vs a recommendation, tone, your expertise and risk appetite per domain, when you are usually around, how you give feedback. It never infers health, religion, politics, sexuality or personality types, never stores credentials, and never generalises about other people beyond what you said.
  • Two loops. After each turn a strict extractor turns the turn into belief operations (or nothing; Mercury's own replies are never evidence about you). Every hour of activity, and at shutdown, a reflection pass reads your messages and behaviour across sessions, infers traits, merges duplicates, flags contradictions and rewrites the owner brief.
  • The model finally sees it: "About you" and "How to work with you" sit in every prompt, plus the beliefs relevant to each message. Beliefs it acted on without objection gain support; a correction retires the old belief and holds the new one.
  • You hear about it. Behaviour-changing learning ends the reply with one line: ☿ Noted: … Say "forget that" to undo. Contradictions are asked about once. /memory learned|beliefs|contested|confirm|correct|forget|settle, /forget <text>, "forget that", the forget_memory / confirm_belief / correct_belief tools, a dashboard view with Confirm/Forget, and an editable ~/.mercury/soul/owner.md whose notes are read back.
  • Hygiene: the old extractor saved Mercury's own replies as your preferences (about half of a typical store). Those rows are quarantined, not deleted (dashboard → Quarantined, with Restore); real memories became beliefs. The prose fallback is gone, merging works, conflicts no longer delete at random, and soul files you edited are never overwritten by migration.
  • One source. /memory, the dashboard, the save_memory / search_memory tools, the bots and cloud sync all read and write the belief store now; the old memories table is a read-only archive. Your name, email and handles stay in identity.owner in mercury.yaml and are never stored as beliefs.
  • Chat can actually use what it read. Per-message recall shows held beliefs first and fills with unverified candidates (labelled as hunches), so what Mercury learned today and what the upgrade migrated is visible now, not after a second session. "What do you know about me?" injects the strongest beliefs directly. Stopwords and channel scaffolding no longer pollute the search, and the "About you" section pads with hedged candidates until enough is held.
  • Two extractor leaks closed. A correction that opens like an acknowledgement ("No no, I said British spelling…") is no longer skipped as trivial, and an operation the model emits without an excerpt now cites your message instead of being thrown away (that alone dropped whole turns on Haiku).
  • Pick the model that learns. memory.learning.provider: anthropic (or LEARNING_PROVIDER) runs extraction and reflection on a capable provider while chat keeps its own; unset falls back to the default.
  • Safe upgrade. The first boot after upgrading backs second-brain.db up to second-brain.pre-owner-model.db before migrating, the migration runs once and never crashes the boot, every memory you could see before is still listed (or waits in Quarantined), and "☿ Noted" lines are limited to one per channel every few minutes.

Self-made skills (ADR-027)

  • Mercury turns long work into skills. After a multi-step task it would do again (a recurring report, a conversion pipeline, a deploy, a site or device it operates) has worked end-to-end, Mercury saves the procedure with the new create_skill tool — exact commands, paths, checks and pitfalls — and tells you in one line. Next time it is one use_skill away.
  • Kept apart from your skills. Self-made skills live in ~/.mercury/skills/self-made/, carry origin: mercury, are listed under their own "Self-made" label and count as unverified until used again. Drafts are rejected unless they are a real, verified, credential-free procedure; a self-made skill never shadows an installed one.
  • Skill categories and intents work again. Discovery registered each skill's category, intents and tags and then rebuilt the index, wiping them; the prompt fell back to a flat list and intent routing matched on names only. Fixed by building the index first.
  • No junk shelf. /skills self-made shows each one with use counts; unused ones go dormant after 30 days (disabled, never deleted) and the shelf is capped at 40. /skills self-made enable|disable|remove <name>. Bots and channel members cannot create skills.

Web search

  • Search returns real results again, still free and keyless. Bing's web RSS feed, the main engine, now answers automated requests with pages unrelated to the query (train timetables for a TypeScript question), and DuckDuckGo, Mojeek and Startpage answer with bot challenges. web_search now asks Brave Search first, then Wikipedia, Hacker News, Bing News and Google News, and keeps only results that mention the query, so a source serving junk counts as empty and the next one is tried. A thin answer is topped up from Wikipedia, the same page is never listed twice, and Brave rests for a minute after rate-limiting instead of being retried every query. No new dependency.
  • Old DuckDuckGo skills stop failing. fetch_url on a search-engine results page (DuckDuckGo, Google, Bing, Yahoo, Brave, Startpage, Mojeek) runs the query through web_search instead of returning the challenge page. An installed web-search skill that scrapes such a page and never mentions web_search is replaced by the built-in one on start, with the original kept as SKILL.md.replaced.bak; skills you edited that already use web_search are left alone.
  • The built-in web-search skill (1.2.0) tells the model to rephrase once before giving up and never to fetch search pages directly.

Chat

  • Regular chat works like an agent again. Its instructions forbade helper scripts and batching ("call write_file for each one individually"), so a task like converting an EPUB to Markdown was done file by file by hand. Chat now reaches for the strongest existing tool (pandoc, ffmpeg, a Python library) or one script, does a quick web search when it isn't sure what the best tool is, and checks the output before saying it is done. It also gets a short working contract like Mercury Code's: do the work, plan multi-step tasks, report what was checked.
  • /model and /cloud offer the arrow-key picker in the attached terminal again. The picker was only wired to the foreground terminal; since the default launch attaches, /model printed a list and left you typing /models use <name>. Both now open the same ↑↓ picker on your own screens (attached terminal and dashboard), and Esc keeps the current model instead of silently taking the first option.
  • A model switch says what it does. /model used to answer "Saved for future sessions", which read as "takes effect next session". It now says ✓ Switched to <model> (<provider>). In effect from your next message, and kept as the default., and the status row shows the new model at once.
  • Pickers answered in the attached terminal reach the runtime. The answer endpoint only resolved permission prompts, so choosing in /permissions, /model or a question picker did nothing: the command waited out its 2-minute timeout behind a "Thinking" spinner. Choices and Esc now resolve at once, and the spinner is hidden while a picker waits on you.
  • /new no longer leaves the attached terminal "Thinking" forever. After /new or /session <ref> the runtime re-bound your screen to the new session, but the terminal kept listening on the old one, so every reply went where nobody was looking and /stop seemed ignored. The runtime now tells the screen to follow, and the terminal also follows whenever a message is routed to another session.
  • Yes-or-no and "which one?" questions come as a picker, not prose. Chat now asks decisions through its question tool (↑↓ and Enter) and keeps prose for questions that need free text (a name, a path).

Permissions

  • Every new session asks for its permission mode again. Since 1.3.1 the default mercury launch attaches to the background runtime, which never showed the "Ask Me / Allow All" prompt, so everyone was silently in Ask Me. The prompt is back wherever a session starts: the foreground terminal and Mercury Code at launch, the attached terminal when you start a new session or type /new. Your current mode is listed first, so Enter keeps it and ↓ Enter switches; the pick is remembered as the default for next time and applied to every screen. Resuming an existing session prints one dim line with the mode in effect instead.
  • /permissions works everywhere you are the owner (attached terminal and dashboard too, not just the foreground terminal), including /permissions allow-all and /permissions ask-me.
  • "Always" on a command prompt now covers that command for the rest of the chat (every pandoc …, git commit …), not just the exact string. Installs, wrappers like sudo/sh -c, and remote Mercury Cloud requests stay exact-match.
  • Telegram and Signal can switch back from Allow All to Ask Me (the switch used to be ignored until restart).

Bottom bar

  • The session picker fits the screen, new session first. mercury used to list up to six sessions under the launch pad regardless of the terminal height, so on a 24-row terminal Ink dropped the wordmark off the top. The list is now budgeted to the height (the tip goes first, then sessions fold into … N more · /sessions in the chat), and "Start a new session" is the first, pre-selected row instead of the last.
  • One useful row, not a dump. The row under the input is status only. Left: the session (⚿ copper-mint-thd · hi). Right: permission mode, today's budget meter, model, Code mode, Optimus, an update — fitted to the terminal width in priority order with compact forms (claude-haiku-4-5 not claude-haiku-4-5-20251001, ⚡12% when narrow), so a long model or session name never crowds out the rest; what does not fit is dropped, lowest priority first, never cut mid-word.
  • Optimus wins the row. While Optimus is listening or working, its activity is the first segment on the right and the last one the fit ever drops; the session on the left shrinks to its alias to make room.
  • Model only on the row. The provider name is gone from the status row (claude-sonnet-4-5, not Anthropic · claude-sonnet-4-5); the model name already says who serves it.
  • The budget meter is back on the row. ⚡ ██████░░ 76% shows today's token use as a bar that goes green → yellow (70 %) → red (90 %), the colours the completion footer has always used. It outranks the model when the row is narrow, so it stays visible as ⚡76% down to very small terminals. The attached terminal and the foreground TUI share one builder.
  • The bar updates live. The attached terminal (what mercury opens) read the model once on connect and never again; model switches, Code mode, permission changes and Optimus activity never reached it. The runtime now pushes a status update on every model switch and checks every 2 seconds for anything else. The bar shows the thread, model, Code mode, Ask Me / Allow All, today's token use and Optimus activity; the foreground and Mercury Code bars show the permission mode too.
  • The launch pad's budget row works again (it read field names the runtime never sent).
  • Said once, in the chat. While a turn runs, one line above the input shows the spinner, the phase (Thinking, the running tool, Writing) and the elapsed time, cyan then yellow at 30 s and red at 90 s, under the finished steps' ✓ marks. The status row under the input never repeats it. Choosing a permission mode no longer prints a confirmation line either: the row shows the mode.
  • No key hints on the row. ↵ send · /help · ctrl+c detach is gone; Enter sends, /help lists the commands, and the row keeps its width for status. The right half is a single truncating line now, so it can no longer wrap onto a hidden second line and end in Anthropic · .

1.4.0 — Pluggy Mercury: plugins, WhatsApp calls, and Optimus uses your computer

The first stable release since 1.3.8. It also carries the 1.3.9 hotfix below, which only shipped on the dev channel.

Plugins (#203)

  • Optional plugins. /plugins install|enable|disable|update|rollback|uninstall, from a checksum-verified catalog at mercuryagent.sh. Plugins run out of process, so a crashing plugin can't take Mercury down, and they declare their network hosts, secrets and permissions up front.
  • Plugin API 1.2. Plugins can return images to the model (kept out of chat history), request desktop access (permissions.desktop), and add whatsapp or desktop channels.
  • Plugins use Mercury's own providers. You set a key once; plugins borrow it. A missing optional key is explained once, with what it turns off.
  • Guided setup and a flatter /plugins <id> menu. Settings are listed on the menu itself, yes/no options say what each answer does, and the follow-up settings appear right after you save. No dead ends.
  • Installing a plugin into a running Mercury now starts it immediately (it used to wait for a restart).

WhatsApp plugin 0.1.1 (#202)

  • Chat with Mercury on WhatsApp from a spare number, as a linked device.
  • Voice calls in both directions. Mercury can call you ("call me at 9pm", "call me when it's done"), keeps you posted while it works, takes approvals by voice or in the chat, and sends links, photos and documents mid-call.
  • Choose the voice engine (OpenAI by default, Gemini, Grok, ElevenLabs, Azure, Qwen, or your own Mercury model), access levels (General / Extended), and link or unlink from the dashboard.

Optimus plugin 0.4.7 (new)

  • Mercury uses your computer. It looks at the screen, then moves the pointer, scrolls and types the way a person does, with a "Mercury is driving" overlay while it has control. macOS, Windows and Linux; no developer certificates needed.
  • Talk to it. A talk key starts listening mode with spoken replies, a mute key stops listening without stopping the work, and saying "stop" halts every action at once. Silence ends a session, so nothing is captured or spent while you're away.
  • Honest about results. Optimus checks the screen before it reports something as done, and failed actions are reported as failed.
  • Consequential actions ask first; Mercury declines to play or automate games that use anti-cheat (Vanguard, Easy Anti-Cheat, BattlEye), since automated input there can get your account banned. The TUI status bar shows when Optimus is listening or working, and a soft tick-tock plays while it works.
  • Voice settings are shared with WhatsApp.

Also new

  • Built-in web_search.
  • Mercury reads photos and PDFs, and listens to voice notes, from chat.
  • Mercury always knows it comes from Cosmic Stack.
  • Web dashboard: plain-language model names, renaming, a reasoning picker, every local Ollama model, ChatGPT Plus/Pro plan models.

Fixed

  • The desktop channel no longer loops broadcasts. One failing alert used to fan out into hundreds of WhatsApp messages; repeated alerts are now sent once.
  • ChatGPT OAuth turns no longer fail after a tool call.
  • Long messages no longer fail memory search ("Expression tree is too large").
  • New dashboard chats no longer land in the previous conversation; dashboard permission prompts render and resolve.
  • Plugin tar calls work with GNU tar on Windows.
  • The web dashboard works on the Windows standalone binary. Mercury looked for its web/ folder inside the binary's virtual filesystem, because it only recognised Bun's macOS/Linux marker ($bunfs) and not Windows' (~BUN), so the dashboard reported "web UI not found". Found and fixed by @farena-ai in #189; the same check is now shared by the login page and the memory-graph fallback.

1.3.9 — hotfix: mercury doctor and dashboard saves take effect

  • mercury doctor applies what you changed. Providers, keys and channels are read at boot, so a reconfigure that only wrote the file looked like it did nothing until a manual mercury restart. Doctor now restarts the running daemon when the configuration actually changed (the Telegram/Discord commands already did this).
  • Dashboard saves say "restart to apply" and offer a Restart button (Settings → Restart Mercury), backed by a loopback-only POST /api/restart.

1.3.8 — hotfix: live reply rendering and spinners in the attach TUI

  • No more cyan bar beside a streaming reply. The attach TUI (what mercury opens) drew the live reply with a cyan │ strip that disappeared once the reply settled. The live tail now renders exactly like the settled block — same MERCURY: header, indent and markdown.
  • Working/step indicators animate. The attach TUI showed a frozen ⠋ working… and static → steps; they now run on the shared 100 ms ticker like the main TUI.

1.3.7 — hotfix: first-run setup exited at the mode menu

  • The setup wizard quit silently at "Choose your mode" (1.3.1 – 1.3.6, every platform, binaries and npm). The shared readline used for the name questions released itself a tick later and paused stdin after the arrow-key menu had taken it over; nothing was reading the terminal, so the process ran out of work and exited 0. The menu now releases the readline synchronously before it owns stdin. Reproduced and verified under a pseudo-terminal.

1.3.6 — hotfix: mercury upgrade is a no-op when already current

  • mercury upgrade / mercury-dev upgrade re-installed (and restarted the daemon) even on the latest build. They now resolve the channel's newest version first — stable from /releases/latest, dev from the rolling mercury-dev-latest release — and stop with "Already on the latest version" without touching the daemon or the binary. --force reinstalls anyway.

1.3.5 — hotfix: the Windows installer on Windows PowerShell 5.1

  • irm mercuryagent.sh/install.ps1 | iex failed with "checksums.txt must contain exactly one checksum for mercury-win-x64.exe" on stock Windows PowerShell 5.1 — and the window closed before you could read it. GitHub serves checksums.txt as application/octet-stream, for which PowerShell 5.1 returns a byte[] from Invoke-WebRequest; the installer now decodes it (PowerShell 7 was unaffected). A failure now waits for Enter before closing the window (MERCURY_NO_PAUSE=1 for automation).
  • Running the saved script (powershell -File install.ps1) failed to parse under PowerShell 5.1: the file had UTF-8 characters and no BOM, so the ANSI code page turned a ✓ into a quote. The installers are ASCII-only now.
  • CI runs the Windows installer under PowerShell 5.1 against a local release served as application/octet-stream.
  • install.sh (1.3.4) died with "Illegal instruction" instead of switching to the baseline build when the default build crashed in the smoke test (set -e on a failing command substitution). Fixed; the CPU-detection path that picks baseline up front was unaffected.

1.3.4 — hotfix: binaries for CPUs without AVX2 (#155)

  • "Illegal instruction (core dumped)" on older x86-64. Bun's default x64 build uses AVX2; Intel CPUs before Haswell (2013) and some VMs crash at start. Releases now also ship mercury-linux-x64-baseline and mercury-win-x64-baseline.exe. The installers pick the baseline build when /proc/cpuinfo has no avx2, and switch to it automatically if the default build dies with an illegal instruction during the post-install smoke test. MERCURY_ASSET=<asset name> forces a build.

1.3.3 — hotfix: bots always get a provider that works

  • A bot never fails on a provider that cannot answer. A new bot (from Telegram, the TUI or the web) runs on the default LLM; if the configured default has no key or its key is rejected (401), Mercury uses the first usable provider instead, and a provider that rejects its key is remembered and skipped — for bots, the main agent's fallback chain and the default — until the key is changed. A bot turn that hit a bad key now retries on another provider instead of dead-lettering.
  • mercury doctor flags keys that cannot be right (e.g. an OpenAI key that starts with 2sk- instead of sk-) before anything is tried.

1.3.2 — hotfix: /code, the launch pad, and /stop from the default launch

  • Launch pad on mercury. The default launch attaches to the daemon (ADR-024) and the attach screen had dropped the launch pad — the wordmark, provider/skills/web/budget rows and tip the main TUI opens with. It is back, fed by real runtime state, above the session picker.
  • /stop then a command. /stop aborts asynchronously; a slash command typed before the turn finished unwinding was answered "Agent is busy…". The launcher now waits for the stop to complete (up to 5 s) and runs the command normally.
  • /code works again from mercury. Since 1.3.1 the default launch attaches to the daemon, and /code typed there was forwarded to the daemon's web channel — which has no terminal to switch into — so it printed "Programming mode: Off". The attach TUI now hands the terminal to Mercury Code (/code or /code <dir>), exactly what mercury code does; the runtime keeps running in the background. /code plan|auto|off inside the attach TUI explain where to run them.

1.3.1 — Steady Mercury

The release where Mercury stays out of your way. One process runs the fleet and your channels; the terminal just attaches to it — instantly. Bots do real work, deliver files you can find, stay online without burning tokens, and can be run from a phone. The 1.3.1 "Honest Mercury" line (chat that answers, "done" that means verified, security fixes) was never published on its own and ships here.

Upgrading

  • Node.js 22 or newer is required for npm installs. Standalone binaries carry their own runtime — nothing to do. On npm: run node -v first; on Node 20, nvm install 22 && nvm alias default 22, then npm i -g @cosmicstack/mercury-agent. mercury upgrade now checks this before it removes anything, and the package refuses to install on an older Node with a readable message instead of installing something that will not start.
  • Your login service is re-pointed automatically the first time the new build launches (it used to keep starting the old install). mercury doctor shows Login service: points at this install.
  • First start moves bot outputs from ~/.mercury/bots/outputs/ to ~/Documents/Mercury/<Bot name>/ (one-way; the old folder gets a README saying where things went).
  • No config migrations. ~/.mercury (config, bots, memory, Telegram pairing) carries over untouched.

Known limitations

  • Launching mercury now attaches to the daemon (ADR-024), and the attach TUI does not yet have bot threads (/bots open) or the /telegram, /discord, /slack menus — use /bots send <id> <message> and mercury telegram ... from the shell, or mercury code for the in-process TUI. Closing this gap is the first item of the next release.
  • Bots still share the daemon's thread with the main agent: bounded (turn caps, async tools) but not isolated. /api/health.loopLag tells you if it ever matters.

One runtime (ADR-024)

  • git tools no longer hold the runtime. git_status/log/diff/add/commit/push (and /code diff) ran git synchronously — a push over a slow link froze Telegram, every bot and the attach TUI for up to 60 s. They now run async; errors and output are unchanged.
  • Windows service drift is detected too (Task Scheduler XML and the Run key are read back), so a stale autostart is re-pointed on every platform.
  • The login service follows the install. After a reinstall (npm → binary, stable → dev, a new Node under nvm) the old LaunchAgent / systemd unit kept resurrecting the old daemon on every login, so the new build could never own its port. Mercury now checks what the service launches on every launch and re-points it (unloading the old job first); mercury doctor shows Login service: points at this install / STALE, and the "port owned by another Mercury" message names the service when it is the cause.
  • The terminal no longer runs a second copy of Mercury. Launching mercury with no daemon used to spawn the daemon and boot a full runtime in the terminal — Telegram, the scheduler and every bot ran twice, and the second copy ran on the thread that paints your keystrokes. That was the typing lag, and the Telegram "terminated by other getUpdates" (409) conflicts. Now the terminal spawns the daemon and attaches to it; a foreground runtime beside a live daemon (mercury code, recovery) is a terminal for the main agent only — no bots, no channels, no web port.
  • Attach waits for a booting daemon (token not written yet, token rotated at bind) instead of failing on the first read.
  • Event-loop stall monitor: /api/health reports loopLag (p99 / worst stall over the last 10 s) and stalls ≥250 ms are logged with a warning, so lag is a number, not a feeling.

Instant attach

  • Slash commands no longer show "Processing". /memory, /bots, /help and friends are answered without the model; the turn indicator and heartbeat are raised only when a command actually falls through to a model turn. (/memory opens a menu that stays open as long as you use it — with the spinner up it looked like a hung agent.)
  • mercury attaches instantly to a running daemon. The daemon binds its web listener first at boot (channels and bots come after), an unauthenticated loopback /api/health answers with pid/version/booting, and the launcher polls every 250 ms instead of 750 ms. A port owned by another process (an old global install, another Mercury) is now reported in one line — Port 6174 is owned by another Mercury (PID …) — stop it or set web.port — instead of a 15-second wait followed by a pointless restart. The web server also retries a busy port for 5 s, so a restart right after a stop no longer loses the dashboard.

Bots in your pocket (ADR-023)

  • Onboarding from Telegram. /bots create <id> "Name" "Description" in Telegram (or the web chat) now runs the same flow as the TUI: your next message is the persona (keep as-is or convert to the template), then permissions tier, solo vs fleet, and the daily budget — each a tap on Telegram's native buttons that settle in place. Every reply lands in the chat that asked; nothing is lost to the TUI-only bot thread any more.
  • Telegram controls. /bots and /bot are in Telegram's command menu; the roster arrives with buttons — Stop/Start, Run and Runs per bot, plus Cost, Outputs, Doctor and Stop all for the fleet. A tap runs the slash command behind it as if you had typed it (same permissions, same reply). /bots outputs carries a 📎 button per delivered file.
  • Files, not paths. A task asked for from Telegram (or any remote chat) comes back with its delivered files attached. /bots fetch <id> [name|latest] sends one on demand.
  • /bots doctor runs the fleet health check from any chat; /bots help lists the commands. The TUI's slash completion, the busy-mode /help, and the docs now list every /bots subcommand.

Bots stay online

  • Idle, never dead. A routine that keeps producing nothing is cooled down instead of parked: 6 hours, doubling to 24, then it resumes by itself (/bots start resumes it now). Budget pauses lift at midnight and queued work is pumped then.
  • Declared cadence is honoured. A schedule in bot.yaml runs as written; the 30-minute floor applies only to routines a bot creates for itself.
  • Doctor stale check flags a bot whose routine has not fired in twice its cadence; the roster shows when a cooled-down routine resumes.

See what the bots cost and did (ADR-022)

  • /bots cost [days] — token spend per bot and per fleet: today against the cap, the window's runs, failures, deliveries and empty runs. Also GET /api/bots-cost.
  • /bots show <id> [runId] — what a run actually did: the tool trace, delivered files, the reply, and a flag when the reply claimed more than the trace shows. Also GET /api/bots/:id/runs[/:runId].
  • Kill switch — /bots stop all halts every bot and holds queued work; /bots start all resumes. Also POST /api/bots-stop-all / -start-all.
  • /bots dlq clear [id] — drop dead-lettered jobs (the journal keeps the runs). Also DELETE /api/bots-dlq.
  • Onboarding budget presets — light (1M/day), standard (the default, 5M), heavy (20M), a number, or none; the step also tells you where the bot's results will appear.
  • GET /api/bots/:id/tasks lists a lead's delegated tasks.

Fleets that coordinate (ADR-021)

Wave 2 of the bots work: how a lead hands out work and gets it back, how a bot remembers, and how a fleet's standard job runs without a lead turn between every step.

  • Typed tasks with fan-in. fleet_delegate hands several tasks to the crew in one call — each with a goal and what "done" means — and the lead is woken once with a digest (status, outcome, delivered files, summary per task) when the batch completes or its deadline passes (default 120 min; stragglers report once each). bot_send(task: true) is now a batch of one. fleet_tasks lists and cancels; fleet_status shows open tasks. Tasks are durable (tasks.json) and deduplicated, so a replayed delegation turn never double-dispatches.
  • Pipelines as data. A lead's standard job in bot.yaml (pipeline.stages: name, bot, goal with {{input}} / {{previous}}, optional final). fleet_pipeline runs it: stages chain themselves, each handing its deliverable to the next, with no lead turn in between; the lead is woken at the end; a final stage's deliverable is promoted to the top of the fleet folder.
  • Bots remember. After a productive run, 0–3 durable facts (sources and their quality, decisions, where things are, what to avoid) are extracted into the bot's own memory (memory.learn: false disables). Every turn also starts with a digest of the last five runs from the journal and the bot's own working-state note (bot_state, ≤1500 chars, replaced not appended) — the legitimate version of the status files bots used to write.
  • Cheaper crew. bots.fleets.crewProvider routes crew bots without a provider of their own to a cheaper lane; leads keep the default.
  • /bots tasks <leadId> shows a lead's open and recent tasks from the TUI.

Bots that do work (ADR-020)

An audit of eleven days of real fleets found bots spending 617M input tokens (a median turn of 750k, the largest 6.6M), failing 38% of runs, and mostly writing notes about earlier runs. This wave gives every bot turn a governor, every routine a gate, every run an outcome verdict, and every owner a folder they can find.

  • Per-turn caps. A turn stops at 300k tokens or 20 minutes (autonomy.maxTokensPerTurn / maxTurnMinutes). A cut-off is journaled as turn_budget / turn_time — terminal, no dead-letter, no "needs you", one notice a day.
  • Context compaction. Tool results older than the last 8 are stubbed on every step; any single result is capped at 24KB. Prompts stop growing with the number of steps.
  • Budgets on by default. Every bot has a daily cap (5M tokens unless /bots budget says otherwise; none = unlimited) and the fleet has one (bots.fleetDailyTokenBudget, 20M). You are warned at 80%.
  • Routine gate. A cron tick is skipped — never stacked — while the bot is busy or within 30 minutes of its last run (schedules[].minIntervalMinutes). Bot-created routines run at most every 30 minutes, at most 3 per bot; self-scheduled follow-ups are at least 10 minutes out.
  • Outcome verdict. The tool trace, not the reply, decides what a run did: deliverable, action, delegated, message or none. An unattended run that only wrote notes gets one nudge to deliver or admit it. A reply that claims delivery with no matching tool call is flagged. Three empty runs in a row pause the routine; /bots start resumes it.
  • Shared-folder budget. Writes to _shared/ are limited per run (warn at 2 files / 32KB, refuse at 6 / 128KB). The private workspace is unlimited.
  • Deliverables you can find. Results go to ~/Documents/Mercury/<Bot name>/ (Windows: Documents; Termux: shared storage; bots.deliverablesDir overrides) — finals on top, crew work under work/, a README index, files named YYYY-MM-DD <title>. Shown at onboarding, in the roster, and in every "delivered" message. /bots outputs [id] lists them, /bots folder <id> opens the folder. The hidden outputs/ zone is migrated once.
  • Honest failures. Network cuts ("terminated", socket closed, interrupted streams) and empty streams retry instead of dead-lettering; the provider's real error (an invalid key, a 429) reaches the journal instead of "No output generated".
  • Journal v2. Real turn start, steps, tool calls, peak prompt size, outcome and delivered paths per run, plus a compact transcript per run (last 50 kept). /bots journal shows them; mercury bots doctor flags bots whose unattended runs mostly produce nothing, paused routines, and write access to the whole home directory.
  • Bot file tools and shell commands now resolve relative paths inside the bot's workspace, never the daemon's working directory. The roster scan ignores profile copies in sandbox/ and outputs/.

Ink 8

Mercury's terminal renderer moves from a heavily patched ink 5.2.1 to ink 8.0.0, which now does most of that work itself.

  • Requires Node.js 22 or newer. Ink 7+ needs it, and Node 20 reached end of life in April 2026. On an older Node, Mercury now exits with a clear upgrade message instead of crashing at the first render.
  • Smoother rendering — incremental rendering rewrites only the changed part of each line, and every frame is painted atomically (synchronized output).
  • Upstream fixes Mercury lacked — CJK and emoji truncation, control characters stripped from rendered text, dropped keypresses when several keys arrive together, Backspace vs Delete, Windows stale frames, and many <Static> fixes.
  • Smaller patch — four Mercury hunks remain (Static itemKey, freeze gate, live-region guard, cursor anchor); the rest are upstream. See docs/ink-patch.md and ADR-019.
  • React 19.3.

Honest Mercury — the earlier 1.3.1 work (never published separately)

The release where Mercury stops pretending. Chat answers instead of forcing tool rounds, "done" means a check actually passed, every channel shows the same evidence, and the terminal UI takes paste, Esc and IME like a real editor. Built from a full audit (ROADMAP.md); every change below is covered by tests, including a replay eval harness that drives the real agent loop.

Conversation and feedback

  • Chat is no longer forced through tool rounds — the Mercury Code narration guard and verification gate ran in plain chat, so "make me a workout plan" could trigger up to ten tool-only rounds and end with "I couldn't get started". Both now run in execute mode only.
  • Done means verified — a build/test/typecheck counts as evidence only when it exits clean (timeouts and kills are failures) and runs after the last edit; otherwise the task pauses with "the last check didn't pass" instead of "Task complete". Streamed turns now reach this gate too (they reported no finish reason and skipped it).
  • One feedback contract on every channel (TaskSurface) — begin, done-with-evidence, pause and fail behave the same on CLI, web, Telegram, Discord, Slack and Signal. Verification notes and a trace id reach messaging channels; pause and failure banners are persistent messages, never truncated status-card notices.
  • /trace [id] — provider, tokens (incl. cached), steps, timing, verification and every tool call for a turn.
  • /new on every channel — fresh conversation, memory kept (#38).
  • Telegram prompts — timeouts say what they defaulted to, taps settle the card, keyboards are removed (#23).

Context, memory and speed

  • Context window v2 — history is budgeted by tokens and includes a compact per-turn tool trace, so the next turn knows what was read and written. Retrieved memory goes into a per-turn system block instead of fake dialogue.
  • Prompt caching — the stable system prompt carries an Anthropic cache marker and no longer changes every minute.
  • Faster steps — per-step channel edits no longer block the agent loop; niche tool schemas (Spotify) are left out of unrelated turns; the cloud memory pool is skipped when local recall is strong.
  • Providers — DeepSeek thinking for V4/reasoner models with reasoning passed back (#24); per-provider output ceilings; the configured default always leads (fallback is no longer sticky).
  • Long builds — run_command reports progress so a 10-minute build is not killed as a stalled provider, and stops its child when the turn is interrupted.
  • Tool results — read from the AI SDK v6 output field, so failing-loop detection works.

Terminal UI

  • Paste — multi-line and bracketed paste; Shift+Enter inserts a newline.
  • Esc interrupts a turn; Ctrl+C clears input, double-tap to quit.
  • Concurrent prompts queue instead of overwriting each other.
  • Smoother streaming — fence-aligned tail rendering, one shared tick, async git header, correct repaint on resize; grapheme-aware cursor for emoji and CJK; history persists to ~/.mercury/history.

Platforms

  • Windows — service install via Task Scheduler XML with an HKCU Run fallback (#13); graceful stop and upgrade; wizard no longer exits silently on closed stdin (#64); update check over HTTPS.
  • Termux — detected on android; mercury service install writes a Termux:Boot script.
  • Bots — retried jobs can no longer run twice; a fleet lead's synthesis reaches its thread; "needs you" survives restarts.

Engineering

  • Agent split — command handlers moved to src/core/commands/; one step handler instead of four copies; agent.ts from 8,362 to about 5,000 lines.
  • Replay eval harness (npm run eval) in CI.
  • CI — binary smoke tests per OS (built, run and discarded, never published), installer and script checks, Node 24, linux-arm64, ESLint ratchet (provisional baseline), vendored-Ink integrity check.

Security

  • Argv-lane auto-approval (ADR-016) — auto-approved commands no longer go through a shell or PATH: they must tokenize to plain argv, use an allowlisted program with an allowed flag set, stay inside the workspace, and run via execFile on a binary resolved from pinned system directories with a minimal environment (#103). Everything else is shown to the user for approval. Some read-only one-liners (pipelines, && chains) now prompt; see SECURITY.md.
  • Reads are authorised against the real file — symlink targets must be in scope, hard-linked files prompt, and read_file verifies the opened file is the one that was checked (#104).
  • Git helpers run argv, not a shell string — git_status, git_log and git_diff built a command string from a model-chosen path and ran it through execSync with no permission check. They now pass the path to execFileSync('git', [...]) as a single argv element after -- (or -C <resolved>), and refuse any path that fails the same read-scope check read_file uses. git_push rejects option-looking remote/branch values (--receive-pack=…, --exec=…) and also uses argv. Regression tests: src/capabilities/git/git-helpers.test.ts.
  • Safe-read bypass fixes, now closed with regression tests — the read-only auto-approval lane in Ask Me mode denies: find action flags (-exec/-execdir/-ok/-okdir/-delete, since 1.2.2; -fprint/-fprintf/-files0-from since 1.3.0 — #71, #77, #101, #110); shell redirection (>, >>, 2>, <, &>, since 1.2.2 — #72, #82, #109); and shell expansion ($VAR, ${VAR}, $(…), backticks, $'…', ~, since 1.3.0 / PR #128 — #76, #80, #95). An explicit find -exec case was added to src/capabilities/permissions.test.ts.
  • Sub-agent approval routing — delegate_task workers no longer switch the shared permission manager into allow-all with a / write scope; their shell and filesystem calls go through the same Ask Me prompts as the parent (since 1.2.2 — #75, #99). allowedTools is enforced at runtime, not just in the prompt (since 1.3.0 — #74, #97, #98). In 1.3.1 sub-agents only see and stop their own descendants and get orchestration tools only when granted (#74), and each agent runs under its own immutable permission context, so a concurrent internal-channel turn can no longer widen a worker's approvals (#75/#99 residual).
  • Symlink write canonicalisation — create_file/write_file/edit_file check the resolved target of a symlink against the writable scopes, not only the lexical path (since 1.3.0 — #105).
  • SSRF guard — unchanged; see the 1.2.3 entry below (hardened in 1.3.0 by #121 and #124; response record in docs/security/ssrf-108-response.md).
  • Disclosure process — SECURITY.md added (private reporting, response targets, scope); issue-closure and advisory drafts in docs/security/2026-10-backlog-closure.md.

Fixed

  • SQLite in the standalone binaries and on toolchain-less installs (ROADMAP P1.9, #96, ADR-018) — the binaries bundled better-sqlite3's JavaScript but never its native addon, so every SQLite probe failed inside them: Second Brain was silently disabled and bots/boards fell back to JSON. A shared driver (src/utils/sqlite-driver.ts) now selects better-sqlite3 → bun:sqlite → node:sqlite → JSON: binaries use Bun's embedded engine, Node ≥ 22.13 installs work without a compiler via node:sqlite, and the better-sqlite3 path is untouched. Second Brain, the bots queue, boards and the cloud pool-search cache all go through it; the pool cache now degrades to uncached instead of throwing when no engine loads. New mercury doctor --storage prints the active backend (with why the others were rejected), every database file, its size and row counts, and warns loudly when storage is JSON-only. MERCURY_SQLITE_BACKEND=better-sqlite3|bun:sqlite|node:sqlite|json forces a backend. Contract tests run the same assertions against every engine the process can load (src/utils/sqlite-driver.test.ts).
  • Patched ink is bundled, not post-installed (ROADMAP P2.4, ADR-017) — the TUI's ink fixes no longer depend on postinstall: vendor/ink (stock ink 5.2.1 + the patch set, regenerated by scripts/vendor-ink.cjs) is bundled into dist, so --ignore-scripts installs, Termux and the standalone binaries all run the patched renderer. mercury doctor reports "Ink TUI patch: vendored". Hunk-by-hunk rationale: docs/ink-patch.md.
  • IME input lands on the input line (#41, #66) — the real terminal cursor is now parked on the input's cursor cell after every frame, so preedit text and candidate windows appear where you type, and terminals that suppress IME while the cursor is hidden compose again. It is hidden while a prompt or a non-input pane has focus. MERCURY_HW_CURSOR=0 opts out.
  • Narrow terminals (P2.8) — widths derive from the terminal's columns: below 60 columns the splash and side panels collapse, and the input header, hints and Mercury Code hint table truncate instead of wrapping into extra live-region rows.

1.3.0 — Mercury Bots

Persistent, persona-scoped agents that run outside your conversation — each with its own persona, workspace, skills, permissions, and durable queue. Onboard specialists, chain them into multi-level fleets, and let them work 24/7 while you keep talking to Mercury.

New

  • Persistent bot runtime (P0) — Bots are long-lived agents with a persistent persona (bot.yaml + permissions.yaml), their own private sandbox at ~/.mercury/bots/<id>/, and journals that survive restarts. A wake turns them on; they work through a durable job queue; results land in the bot's own thread — never dumped back into the session that dispatched work.
  • Durable queue + HTTP API (P1) — Jobs survive restarts and lease-expire when a worker dies (timed out classification, non-destructive DLQ replay via /bots replay). Fleet health is one command away: mercury bots doctor (exit 1 = actionable), mercury bots list, mercury bots storage. Telegram /pair-style ingress: every bot reachable through the channel you already use.
  • Fleets — lead bots + crews — Promote a bot to fleet lead; it recruits and organizes its own crew (imperative self-organization). Multi-level hierarchies supported. Crew results bubble up through the lead. Fleet onboarding walks tiers: solo → lead auto-build → lead manual.
  • Web cockpit — Mercury Bots section — The local web dashboard gained a fleet section: roster with live states, per-bot threads, needs-you escalation badges, and a fleet step view that mirrors the TUI.
  • Persona system — Two-pass persona builder keeps big personas big; hand-edited bot.yaml/permissions.yaml apply live. Persona file declares access scopes (read/write/execute per directory), so each bot gets exactly the surface it needs — no more.
  • Sandbox + bot_deliver — Every bot gets an isolated workspace; final artifacts go out through bot_deliver. Sandbox retention janitor caps per-bot disk usage; fleet-shared folder at ~/.mercury/bots/_shared for cross-bot files with implicit grants.
  • Bundles — /bots export produces a shareable bundle (manifests + personas + permissions + skills; a lead's bundle carries its whole crew, whole-fleet export supported). /bots import recreates them — imported bots start disabled by design. Sandbox, journals, and .env never travel.
  • Bot-facing tools — dispatch_bot, bot_schedule (bots schedule their own future runs), bot_deliver (finalize artifacts), fleet_status, journal_append. Skill access for bots: native skill library + per-bot skill libraries with auto-synthesis.
  • Lifecycle + observability — Full create/edit/budget/delete lifecycle, stop/start/run with held-queue semantics (stop holds, never kills), needs-you alerts to your active channel, journal hydration restores per-bot threads on open, live activity bus feeds the roster and cockpit, per-bot token budgets, mtime-cached manifests, tail-read journals, mercury bots storage for disk usage.
  • Permission tiers at onboarding — Bots get ask / allow tiers per capability, set explicitly — nothing defaults silently. Per-bot shell allow-lists flow from permissions.yaml autoApproveCommands; malformed scope entries skip + warn, never crash turns.

Fixed

  • Fleet duplication on reopen; /bots stays inside the bot thread it opened.
  • Bot thinking streams into its thread live; fleet speed fixes (single-provider lease wait, batched roster fetches).
  • Web fleet step mirrors the TUI step view exactly (solo / auto-build / manual tiers).
  • Results no longer sliced at 800 chars in bot threads; delivery-contract gaps closed with durable retries + durable mailboxes.
  • Windows hardening: queue teardown EBUSY on SQLite backend, EBUSY on heartbeat test backends, EINVAL on retention backdating, separator-agnostic traversal guard; post-close queue ops degrade to no-ops, not crashes.
  • JSON backend lease-expiry race closed; SQLite queue handle released on teardown; doctor closes its queue.
  • Telegram member installs blocked install_skill — tool surfaced only where it's safe.
  • mercury bots doctor scheduler linkage: routines registered in schedules but missing from bot.yaml are flagged before they silently never fire.

Internal

  • New src/bots/ module: store.ts, queue.ts (SQLite + JSON backends), bot-manager.ts, bot-turn.ts, journal.ts, bundle.ts, doctor.ts, persona-template.ts, fleet-*, skill-synthesis.ts, retention.ts, tools/ (dispatch-bot, bot_schedule, bot_deliver, fleet_status, journal_append).
  • mercury bots — new CLI command group (doctor / list / storage) mirroring the in-chat /bots surface.
  • PRs #131–#139 + PR #117's RevShare integration carry this release.

Migration from 1.2.7

No breaking changes. Bots are opt-in — onboard your first bot with /bots create <id> "Name" "Description"; the doctor and fleet surface appear as soon as you have a fleet. Existing config, memory, and channels are untouched.

1.2.7 — Polished Mercury

UX-polish on the Mercury Code surface: every command in autocomplete, honest completion stats, and status verbs that describe what's happening without an extra model call.

New

  • 50/50 RevShare Integration: Mercury & AIML API (#117) — revenue-share program integration.
  • Dynamic status verbs (#119) — one LLM call per session generates live status verbs ("Compiling", "Sweeping"), chat stays static.
  • "Did you know?" tips (#120) — surface-categorized, rare, system-voice tips about features you haven't used.

Fixed

  • Step narrations render as separate blocks in the live tail; the │ rule stays on settled messages, only the live tail drops it.
  • Slash autocomplete + /help cover every recent command, on every surface.
  • File-change stats in the completion banner are smart-conditional (no noise for prose-only turns).
  • CLI uninstall discovery works on machines with no real install.

1.2.6 — Command Surface Fixes

Hotfix on 1.2.5: slash autocomplete and /help now list every recent command on every surface; the live tail renders step narrations as separate blocks with the │ rule behavior corrected.

1.2.5 — Restore & Republish

Recovery release: restores the Release/1.23 work dropped by a bad merge (40f5aea), rebuilds Pages output without merge-conflict markers, and re-publishes the 1.2.4 line cleanly.

1.2.4 — Landing & Cards

Website/branding release: richer per-page OG social-card generator with sections and breadcrumbs, inline SVG icons replace emojis on the landing page, and the v1.2.3 release page fix ships in the built docs bundle.

1.2.3 — Unstoppable Mercury

The release where Mercury Code stops dying and starts telling the truth. The completion pipeline was rebuilt around a completion contract: every task ends in a verdict — verified completion, or an honest pause that names its blocker and resumes. Tasks can no longer fake success, die silently, or loop forever.

New

  • Completion contract — Every task end is classified (completion-verdict.ts): budget exhaustion is a pause, never a fake "Task complete". Evidence-gated completion: implementation tasks must run a build/test/typecheck before claiming done. Honest banners: "Response delivered · no file changes" when git shows nothing, "Task paused · send continue" when resumable.
  • AUTO mode — Mercury Code's new default: plan and build in one flow, one ask_user confirmation only for large changes. No more manual plan/execute switching.
  • Live plan checklist — the update_plan tool maintains a visible checklist in Mercury Code (pending / ▶ active / ☑ done), so you always see which step is being implemented.
  • Escalation harness for narration-locked models — the agent mechanically forces action: harness grounding (deterministic directory listing), provider-enforced toolChoice: 'required' on mutating-tools-only steps, provider rotation per guard round, and a wake-up call (doubled bound, blunt directive) before any pause.
  • Compact-on-pressure — OpenCode practice adopted: memory pressure now compacts the conversation in place and continues; abort only if pressure persists.
  • No Mercury-imposed output size limit — the model's native limit governs (32,768 ceiling); providers that reject it get an adaptive halving. Big single-file writes land in one call.
  • Write-truncation recovery — severed file writes get sectioned-write guidance (create first ~80 lines, then edit_file appends) with full-budget resume rounds.
  • Stall watchdog — 3 min silence → visible pulse; 8 min → abort into resume machinery. MERCURY_STALL_SOFT_MS / MERCURY_STALL_HARD_MS.
  • Automatic continuation — step budgets and provider failures continue automatically (6 fresh budgets, provider hard-deadline counts as one attempt); the manual "continue" gate is a backstop, not a checkpoint.
  • Interactive choice picker in Mercury Code — ask_user prompts now render in the full-screen TUI (previously invisible → hang) and own the keyboard; Esc cancels safely.
  • Live thinking preview — model reasoning streams as a quoted preview in the TUI instead of 52 seconds of dead air.
  • Trackpad/wheel scrolling in Mercury Code — full-screen transcripts scroll with the wheel via a filtered stdin proxy (mouse sequences never leak into input).
  • Change summary at completion — per-file +/− stats and verification evidence ("✓ Verified: npm test ✓") in the completion banner.
  • File-change previews — bounded, syntax-highlighted excerpts of every created/edited file in the transcript.
  • /code chat — instant exit from Mercury Code to regular chat; /chat teardown fixed.

Security

  • SSRF guard — fetch_url and install_skill validate scheme + private ranges (DNS-resolved) on every redirect hop; 512 KB caps. MERCURY_ALLOW_PRIVATE_FETCH=1 opt-out.
  • Credential file hardening — web-config.json / web-sessions.json written 0600 and repaired on load.
  • Random initial web password — no more hardcoded default from a public repo.
  • Secret redaction — API keys masked in logs (pino error serializer) and command output echoes.
  • Shell blocklist — swapped-flag rm -fr variants added to the never-execute tier.

Fixed

  • Yoga WASM "memory access out of bounds" crashes (ink patched: freed-node hygiene + <Static> identity dedup) and the duplicate-message render loop.
  • Scroll repair after long-session trims (/mc scroll-set was dead code — parsed as a NaN delta).
  • Prose questions no longer fight the guard; AUTO-mode banner gating; not-a-git-repo false "no file changes" claim.
  • Mercury Cloud recovery error now says "run mercury cloud connect" instead of an opaque 401 loop.
  • Chat-mode thinking indicator surfaces live provider/phase activity.

1.1.13 — Chatty Mercury

Mercury gets chatty. Three new channels — Discord, Slack, and Signal — bring Mercury to where you already are, with end-to-end encryption, organization access models, and real-time streaming. Plus long-running loop fixes, CLI heartbeat improvements, and crash recovery.

New

  • Discord channel — Full bot integration with slash commands, streaming responses, rich embeds, organization access with admin roles and pairing codes, DM + channel support, and rate limiting. Config: DISCORD_ENABLED, DISCORD_BOT_TOKEN, DISCORD_GUILD_ID, DISCORD_CHANNEL_ID, DISCORD_ADMIN_ROLE_NAME, DISCORD_STREAMING.
  • Slack channel — Socket Mode bot (no public endpoint needed) with slash commands, streaming edits, organization access with admin/member roles, channel + DM support, and @mention awareness. Config: SLACK_ENABLED, SLACK_BOT_TOKEN, SLACK_APP_TOKEN, SLACK_CHANNEL_ID, SLACK_TEAM_ID, SLACK_STREAMING.
  • Signal channel — End-to-end encrypted via signal-cli bridge. Group mode (named "Mercury" group) and private DM mode. Auto-managed signal-cli binary (download, register, start, health-check). Pairing-code access control. Phone number redaction in CLI output. Linux (x64/ARM64) native binaries available; macOS requires Java 17+; Windows not supported. Config: SIGNAL_ENABLED, SIGNAL_PHONE_NUMBER, SIGNAL_MODE, SIGNAL_GROUP_ID, SIGNAL_GROUP_NAME.
  • Crash recovery — New crash flag system (~/.mercury/.crash-flag) writes a JSON file on ungraceful exit. On next startup, Mercury reads the flag, reports what happened, and deletes it. The watchdog also writes a crash flag on max-restart exceeded, with a synchronous stderr write as last-gasp logging.

Fixed

  • CLI heartbeat updates in place — The CLI now updates the same message instead of stacking new "⏳ Working..." messages during long-running tasks. Other channels (Telegram, Discord, Slack, Signal) continue sending separate heartbeat messages.
  • All 12 silent task failure paths eliminated — Every loop condition, tool limit, and stall now sends an explicit error message to the channel. No more silent disappearances mid-task.
  • Step log collapse — Active step logs show at most 3 visible steps (running + last 2 completed). Full history available via Ctrl+D or /log. Idle shows compact summary line.
  • ThinkingIndicator shows "Processing" — Replaces agent name with a neutral label; long operations show /bg current hint.
  • Ollama Local routed through OpenAI compat — ollamaLocal now uses OpenAICompatProvider with useChatApi: true, bypassing the ollama-ai-provider v1 specification incompatibility with AI SDK v6.
  • Daemon graceful shutdown — stopDaemon is now async: sends SIGTERM, waits up to 5 seconds, escalates to SIGKILL. Stale signal-cli processes are cleaned up on stop.
  • Channel send errors logged — All .catch(() => {}) on channel sends replaced with .catch((e) => logger.warn({ e }, 'channel send failed')).

Internal

  • New src/signal/ module: binary.ts (download/verify signal-cli), jsonrpc.ts (JSON-RPC client), process.ts (lifecycle), setup.ts (registration flow).
  • New src/core/crash-flag.ts — crash flag read/write/clear.
  • src/types/channel.ts — new types for Signal, Discord, Slack access models.
  • src/utils/config.ts — config sections, access functions, and legacy migrations for all three new channels.
  • src/channels/registry.ts — notification priority: Signal → Telegram → Discord → Slack → CLI.
  • package.json — new dependencies: discord.js v14, @slack/bolt v4.

Migration from 1.1.12

No breaking changes. All new channels are off by default — enable via mercury doctor or environment variables. Existing configs, providers, threads, kanban boards, and Second Brain data carry over unchanged.

1.1.12 — Daemon fix for standalone binaries

Hotfix on top of 1.1.11. The standalone single-file binaries shipped in 1.1.11 could not start in the background — which also meant Telegram never came online when Mercury was installed via the one-line installer (the recommended path for servers).

Fixed

  • Daemon now starts correctly from standalone binaries — src/cli/daemon.ts used to spawn the daemon as [process.execPath, process.argv[1], 'start', '--daemon']. For npm installs that became node dist/index.js start --daemon and worked. For bun --compile standalone binaries, process.execPath is the Mercury binary itself and process.argv[1] is a bun-virtual $bunfs/... path, so the spawn became mercury "$bunfs/..." start --daemon — Commander treated the bunfs path as an unknown subcommand, the child died immediately, and channels.startAll() (the only place Telegram is started in daemon mode) was never reached.
  • mercury service install no longer persists broken commands — the LaunchAgent plist, systemd unit, and Windows Task Scheduler entry now contain the binary-only invocation (no script path) when running from a standalone binary, so auto-start on boot works end-to-end.
  • Telegram now comes online in background mode for standalone-binary users — direct consequence of the daemon fix.

Internal

  • New isStandaloneBinary() / buildDaemonSpawnArgs() helpers in src/cli/daemon.ts plus getServiceLaunchArgs() in src/cli/service.ts, wired through every OS installer. Detection uses process.versions.bun, $bunfs / ~BUN markers in argv[1], and the execPath basename — so node, bun <script>, and standalone mercury invocations all do the right thing.

Migration from 1.1.11

No changes required. After upgrading, run mercury restart (or mercury service uninstall && mercury service install if you had the service installed under 1.1.11 with the broken command persisted).

1.1.11 — Token Saver Mode, Skills System & Standalone Binaries

The biggest release since the 1.1.x line started. Adds a full Skill System, a Token Saver Mode for cheaper sessions, standalone binaries for users who don't want npm, and a redesigned bottom status bar with per-step spinners.

New

  • Token Saver Mode + bottom status bar overhaul + per-step spinners (#69) — opt-in mode that aggressively trims context, plus a new persistent status bar at the bottom of the TUI showing provider/model/token usage live, with per-step spinners replacing the single global one.
  • Skill System (#67) — Mercury can now load and route to user-defined skills. Skills are markdown-defined behaviors that get injected on demand based on keyword/semantic match.
  • Screenshot skill — full website capture with viewport sizing and dark/light mode toggle.
  • Standalone binaries + one-line installers (#61) — mercury now ships as a single executable for macOS (arm64/x64), Linux (x64/arm64), and Windows (x64). No Node install required. Per-OS docs and a hero install widget on the website.
  • Domain migration — mercury.cosmicstack.org → mercuryagent.sh.
  • Chinese translations for README, ARCHITECTURE, and CHANGELOG (#53).

Fixed

  • Skill ambiguity prompt (#68) — no more 10-skill fan-out on weak matches; users get a numbered picker when the router is uncertain.
  • Spurious ambiguity prompts on weak keyword overlap — the matcher used to trigger the picker on incidental word overlap; now requires real signal.
  • Release asset names aligned with published binaries (#63) — fixes installer scripts that were pointing at the wrong filenames.
  • Per-segment shell pattern checks (#48) — the shell permission guard now validates each shell segment independently instead of trusting a single combined check.

Maintenance

  • Removed anonymous-file-uploader skill — no longer needed.
  • pino upgraded 9.14.0 → ^10.3.1 (#51).
  • Spinner polish and docs updates throughout.

Migration from 1.1.9

No breaking changes. Skill system is opt-in (drop markdown files in ~/.mercury/skills/). Token Saver Mode is off by default — enable it from the session menu or via config. Standalone binaries are an alternative install path; npm i -g @cosmicstack/mercury-agent keeps working exactly as before.

Note: 1.1.10 was skipped to keep numbering aligned across publish channels.

1.1.5 — Smoother Onboarding

Fixed: Onboarding no longer blocks users without Ollama

The onboarding flow had a critical UX problem: if a user didn't have Ollama running locally or an API key handy, they'd get stuck in infinite loops with no way to skip. This release makes onboarding smooth and forgiving.

Key changes:

  1. Ollama Local is now skippable — If Ollama isn't running, you can skip it entirely or manually enter a model name. No more infinite retry loops.

  2. All provider setups allow skipping — Every API key prompt now offers manual model name entry when the provider API is unreachable, and a clear skip option. The error messages changed from red (failure) to yellow (warning) to reduce frustration.

  3. "No provider" trap removed — Previously, if you couldn't configure any provider, you were stuck in an infinite loop. Now you can type "skip" to save your config and return later with mercury doctor. A hint about DeepSeek's free API is shown.

  4. Ollama Local default model cleared — The default was gpt-oss:20b (a non-standard model). Now defaults to empty, and the preferred model list uses common names like llama3.2, mistral, phi3, etc.

  5. Clearer first-run instructions — The LLM Providers step now says "You can skip any provider by pressing Enter" and notes DeepSeek offers free keys.

Summary of Changes

File Change
src/index.ts promptOllamaLocalModelSelection — allow skipping base URL, manual model entry on fetch failure
src/index.ts promptApiKeyWithModelSelection — manual model entry on API fetch failure, skip option
src/index.ts configure() — "skip" option when no providers configured, hint about free keys
src/utils/config.ts Ollama Local default model changed from gpt-oss:20b to empty string
src/utils/provider-models.ts Ollama Local preferred models updated to common names

1.1.4 — OpenAI Compilations & Provider Visibility

New: OpenAI Compilations Provider

A new dedicated provider for self-hosted, third-party, or any OpenAI-compatible API — whether it's on your system, self-hosted, or a cloud service. The community asked for a way to connect to any OpenAI-compatible endpoint without it being tied to a specific vendor.

Setup wizard flow:

  1. Enter server base URL (required) — e.g., http://localhost:8000/v1 or https://my-llm.example.com/v1
  2. Optionally enter API key (press Enter to skip — local/self-hosted servers often don't need one)
  3. Mercury tries to fetch models from /models endpoint
  4. If successful — shows interactive model picker with option to enter a custom name
  5. If fetch fails — prompts you to manually enter the model name
  6. You can always type a custom model name before saving

Key design points:

  • API key is optional — local and self-hosted servers often run without authentication
  • Uses Chat Completions API (/chat/completions), not the Responses API (/responses)
  • isProviderConfigured requires baseUrl + model but not apiKey
  • No model name filtering — accepts all model IDs returned by the server
  • Can be set as the default provider
  • Environment variables: OPENAI_COMPAT_API_KEY, OPENAI_COMPAT_BASE_URL, OPENAI_COMPAT_MODEL, OPENAI_COMPAT_ENABLED

New: Provider & Model Visibility at Session Start

The active provider and model are now prominently displayed when a session starts — a magenta badge (⚡ Provider · Model) makes it immediately obvious which LLM is being used. The full provider list is shown below with ← default markers.

Before:

  Providers: DeepSeek, OpenAI
  Models: DeepSeek: deepseek-chat | OpenAI: gpt-4o-mini

After:

 ⚡ DeepSeek · deepseek-chat
  Providers: DeepSeek: deepseek-chat ← default  ·  OpenAI: gpt-4o-mini

Fixes: fetchOpenAICompatModels optional API key handling

The internal fetchOpenAICompatModels function now only sends the Authorization: Bearer header when an API key is actually configured — previously it always sent the header (even with an empty key), which caused authentication errors on local servers that don't expect auth headers.

OpenAICompatProvider also now handles empty API keys gracefully by passing 'no-key' as a fallback to createOpenAI(), preventing crashes on unauthenticated servers.

Summary of Changes

File Change
src/utils/config.ts Added openaiCompat to ProviderName, config interface, defaults, isProviderConfigured()
src/providers/registry.ts Route openaiCompat → OpenAICompatProvider with useChatApi: true
src/providers/openai-compat.ts Handle empty API key with 'no-key' fallback for createOpenAI()
src/utils/provider-models.ts OPENAI_COMPAT_PREFERRED_MODELS, optional auth headers in model fetch, no model filtering for openaiCompat, routing
src/index.ts "OpenAI Compilations" in PROVIDER_OPTIONS, promptOpenAICompatSetup() with fetch→fallback flow, magenta default-provider badge at session start
.env.example Added OPENAI_COMPAT_* env vars
src/utils/provider-models.test.ts Added 2 tests for openaiCompat model catalog

1.1.3 — Fix Ollama Cloud Provider

What Happened

Ollama Cloud was completely broken — every request returned 404 Not Found. Two independent bugs prevented ollamaCloud from functioning:

Bug 1: Wrong SDK — Local Ollama API instead of OpenAI-compatible Chat Completions

ollamaCloud was routed through OllamaProvider, which uses the ollama-ai-provider package. This package is designed for local Ollama servers and targets /api/chat and /api/tags endpoints. Ollama Cloud exposes an OpenAI-compatible API at /v1/chat/completions and /v1/models — a completely different wire format.

  • Model listing called ${baseUrl}/tags → https://ollama.com/api/tags → 404
  • Chat completions called ${baseUrl}/chat → https://ollama.com/api/chat → 404

Fix: ollamaCloud is now routed through OpenAICompatProvider (using createOpenAI() from @ai-sdk/openai), matching the pattern used by all other OpenAI-compatible cloud providers (MiMo, Grok).

Bug 2: Wrong default base URL

The default OLLAMA_CLOUD_BASE_URL was set to https://ollama.com/api — the local Ollama server path. The correct base URL for Ollama Cloud's OpenAI-compatible API is https://ollama.com/v1.

Fix: Updated the default and added a config migration (migrateLegacyOllamaCloudBaseUrl) that automatically upgrades existing mercury.yaml files from /api to /v1 on startup.

Bug 3: Responses API instead of Chat Completions API

After fixing Bug 1, OpenAICompatProvider used createOpenAI()() which defaults to OpenAI's Responses API (/responses). Ollama Cloud only supports the Chat Completions API (/chat/completions), resulting in https://ollama.com/api/responses → 404.

Fix: Added useChatApi option to OpenAICompatProvider. When enabled (as it is for ollamaCloud), it calls client.chat(model) instead of client(model), targeting /chat/completions.

Bug 4: No baseUrl validation for ollamaCloud

isProviderConfigured() and OllamaProvider.isAvailable() only checked apiKey.length > 0 for ollamaCloud — a missing or empty baseUrl would not be caught, causing a cryptic failure at request time.

Fix: Added explicit ollamaCloud branch in isProviderConfigured() and isAvailable() to validate both apiKey and baseUrl.

Summary of Changes

File Change
src/providers/registry.ts Route ollamaCloud → OpenAICompatProvider with useChatApi: true
src/providers/openai-compat.ts Add useChatApi option to use Chat Completions API
src/utils/config.ts Default base URL https://ollama.com/api → https://ollama.com/v1; add ollamaCloud to isProviderConfigured(); add migrateLegacyOllamaCloudBaseUrl()
src/utils/provider-models.ts New fetchOllamaCloudModels() using /models (OpenAI-compatible); rename fetchOllamaModels → fetchOllamaLocalModels (local /tags only); route ollamaCloud separately
src/providers/ollama.ts isAvailable() also validates baseUrl for non-local providers
.env.example OLLAMA_CLOUD_BASE_URL default updated to https://ollama.com/v1
src/utils/provider-models.test.ts Added 2 tests for ollamaCloud model catalog

1.1.2 — MiMo Provider & Budget Hardening

1.0.0 — Second Brain

This is a major release because it introduces the Second Brain — a persistent, structured memory system backed by SQLite with full-text search — alongside fundamental changes to how Mercury stores data and renders output.

Why 1.0.0?

Mercury has been in rapid development through 0.x releases. The Second Brain feature represents a fundamental capability shift: Mercury now remembers across conversations, automatically extracting, consolidating, and recalling facts about you. Combined with the all-in-~/.mercury/ data architecture and live CLI streaming, this marks a stable, production-ready foundation warranting a major version.

Second Brain 🧠

  • 10 memory types — identity, preference, goal, project, habit, decision, constraint, relationship, episode, reflection
  • Automatic extraction — after each conversation, Mercury extracts 0–3 facts with confidence, importance, and durability scores
  • Relevant recall — before each message, injects top 5 matching memories within a 900-character budget
  • Auto-consolidation — every 60 minutes, synthesizes a profile summary, active-state summary, and generates reflection memories from detected patterns
  • Conflict resolution — opposing memories resolved by higher confidence or recency; negation detection handles "likes X" vs "does not like X"
  • Active → Durable promotion — memories reinforced 3+ times automatically promote from short-lived active scope to long-lived durable scope
  • Auto-pruning — active-scope memories stale after 21 days; inferred memories decay; low-confidence durable memories dismissed after 120 days
  • SQLite + FTS5 — full-text search for instant recall, all data stored locally at ~/.mercury/memory/second-brain/second-brain.db
  • User controls — /memory for overview, search, pause, resume, and clear in both CLI and Telegram

CLI Streaming Restored

  • Live text streaming — raw response tokens stream to the terminal as they arrive, then the full response is re-rendered with proper markdown formatting (headings in cyan with ■ markers, code blocks in yellow, lists with dim bullets, blockquotes with dim borders)
  • Cursor save/restore — uses \x1b7/\x1b8 ANSI sequences instead of fragile line counting, eliminating the duplicate-response bug for single-line answers
  • Tool feedback during streaming — tool calls appear inline during streaming and are tracked for accurate output replacement

Data Architecture: All in ~/.mercury/

  • Before: Memory (short-term, long-term, episodic) was stored relative to CWD at ./memory/, creating files in random project directories
  • After: All state now lives under ~/.mercury/ — config, soul, memory, permissions, skills, schedules, token tracking, daemon state
  • getMemoryDir() helper returns ~/.mercury/memory/ — no more memory.dir config field
  • Auto-migration — on first run, Mercury detects and moves any legacy ./memory/ directory to ~/.mercury/memory/, then removes the old directory
  • Removed config fields: memory.dir, memory.secondBrain.dbPath — these are now computed from getMercuryHome()

Permission Modes

  • Ask Me — confirm before file writes, shell commands that need approval, and scope changes (default on both CLI and Telegram)
  • Allow All — auto-approve everything for the session (scopes, commands, loop continuation). Resets on restart.
  • CLI: arrow-key menu at session start. Telegram: inline keyboard on first message, /permissions to change.

Step-by-Step Tool Feedback

  • Numbered steps — each tool call gets a step number (1. read_file foo.ts)
  • Spinner — animated spinner with elapsed time while tools execute
  • Result summaries — concise result shown after each step (e.g., 42 lines, 3 matches)

Other Changes

  • Improved markdown renderer — cyan headings with ■ markers, yellow inline code, dim strikethrough, blue underlined links with dim URLs, bordered blockquotes, bordered tables
  • HTML entity decoding — fixes double-encoding from marked's HTML output
  • Telegram organization access — admins and members with approve/reject/promote/demote flows
  • Model selection during onboarding — after validating an API key, Mercury fetches available models and lets you choose
  • Telegram editable status messages — streaming updates use editMessageText for live response editing
  • Scheduled task notifications — Mercury notifies the originating channel when a scheduled task runs
  • Full temporary scope for scheduled tasks — tasks run in Allow All mode with auto-approved scopes

Breaking Changes

  • Memory data paths changed from ./memory/ to ~/.mercury/memory/ — auto-migration handles this
  • Config field memory.dir removed — no action needed, value is ignored
  • Config field memory.secondBrain.dbPath removed — path is now computed automatically

Full Changelog

0.5.4 — Fix streaming alignment, remove agent name duplication, cleaner block format 0.5.3 — Add mercury upgrade command, ENOTEMPTY fix 0.5.2 — Fix readline prompt handling, streaming re-render, interactive loop detection, HTML entity decoding 0.5.1 — Bug fixes 0.5.0 — Telegram organization access, model selection, updated docs 0.4.0 — Social media skills, GitHub companion 0.3.0 — Permission system, skill system, scheduler 0.2.0 — Telegram streaming, file uploads, daemon mode 0.1.0 — Initial release