Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["431"],{53391(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var a=n(31379),r=n(74848),i=n(28453);let o={slug:"we-were-running-mercury-twice",title:"We were running Mercury twice and didn't know it",description:"Typing felt sluggish on every machine, and the terminal renderer took the blame. The real cause was a second full copy of the agent, started quietly by the launcher. How we found it, and why the fix was an architecture change rather than a performance tweak.",authors:["salman"],tags:["engineering","postmortem","runtime"],image:"./cover.jpg",keywords:["ai agent architecture","daemon attach","node event loop lag","telegram 409 conflict","terminal ui performance","postmortem"]},s,c={image:n(82654).A,authorsImageUrls:[void 0]},l=[];function h(e){let t={p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"A few days after shipping the always-on bots, I noticed Mercury felt heavy when I typed. Not broken. Just a beat behind, the way a remote shell feels on bad Wi-Fi. Then people started saying the same thing about the dev build on their own machines, which ruled out my laptop as the problem."}),"\n",(0,r.jsx)(t.p,{children:"The obvious suspect was the terminal UI. We had just moved to a new version of Ink, our renderer, and added our own patches on top. Renderers are where input lag usually lives. So that's where I started, and that's where I was wrong."})]})}function u(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},82654(e,t,n){n.d(t,{A:()=>a});let a=n.p+"assets/images/cover-933703cbe255fc7cb44400b9653f4281.jpg"},28453(e,t,n){n.d(t,{R:()=>o,x:()=>s});var a=n(96540);let r={},i=a.createContext(r);function o(e){let t=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),a.createElement(i.Provider,{value:t},e.children)}},31379(e){e.exports=JSON.parse('{"permalink":"/blog/we-were-running-mercury-twice","editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/blog/2026-10-14-we-were-running-mercury-twice/index.md","source":"@site/blog/2026-10-14-we-were-running-mercury-twice/index.md","title":"We were running Mercury twice and didn\'t know it","description":"Typing felt sluggish on every machine, and the terminal renderer took the blame. The real cause was a second full copy of the agent, started quietly by the launcher. How we found it, and why the fix was an architecture change rather than a performance tweak.","date":"2026-10-14T00:00:00.000Z","tags":[{"inline":false,"label":"Engineering","permalink":"/blog/tags/engineering","description":"How Mercury is built, what broke, and what we changed so it does not break again."},{"inline":false,"label":"Postmortem","permalink":"/blog/tags/postmortem","description":"Incidents and bugs, written up honestly."},{"inline":false,"label":"Runtime","permalink":"/blog/tags/runtime","description":"The daemon, the attach client and everything that keeps Mercury running."}],"readingTime":5.03,"hasTruncateMarker":true,"authors":[{"name":"Salman Qureshi","title":"Founder, Cosmic Stack","description":"Builds Mercury. Writes about agent runtimes, terminal UIs and shipping open source.","url":"https://github.com/hotheadhacker","page":{"permalink":"/blog/authors/salman"},"socials":{"github":"https://github.com/hotheadhacker"},"imageURL":"https://github.com/hotheadhacker.png","key":"salman"}],"frontMatter":{"slug":"we-were-running-mercury-twice","title":"We were running Mercury twice and didn\'t know it","description":"Typing felt sluggish on every machine, and the terminal renderer took the blame. The real cause was a second full copy of the agent, started quietly by the launcher. How we found it, and why the fix was an architecture change rather than a performance tweak.","authors":["salman"],"tags":["engineering","postmortem","runtime"],"image":"./cover.jpg","keywords":["ai agent architecture","daemon attach","node event loop lag","telegram 409 conflict","terminal ui performance","postmortem"]},"unlisted":false,"prevItem":{"title":"The setup wizard that quit at the first menu","permalink":"/blog/the-wizard-that-quit-at-the-menu"},"nextItem":{"title":"Mercury 1.3: an agent you can actually leave running","permalink":"/blog/mercury-1-3"}}')}}]);