Another month, another agent-shell update. If you missed the last post, have a look at the 0.87 update. This time around, the most notable changes are around rendering, performance, and bugfixes, sprinkled with new features here and there.As usual, this post showcases highlights, but please check out the full list of changes if you're after the nitty-gritty.What's agent-shell?agent-shell brings your favorite AI agents to Emacs, keeping you at home: familiar buffers and bindings, no terminal emulation. All powered by ACP, the Agent Client Protocol.New supported agentDeepSeek Harness joins the family, bringing the total number of supported agents to 24. Start DeepSeek with M-x agent-shell-deepseek-start-agent, or pick it from M-x agent-shell as usual.Antigravity moved to agy (action required)Latest Antigravity ships with ACP out of the box, so agent-shell now runs agy acp rather than a separate binary you had to download and unpack. If you're an Antigravity user, install a recent CLI, make sure agy is on your PATH, and sign in once:agy acp --loginBlockquotes: rendering + navigation + copyBlockquotes improved their display, rendering embedded Markdown (#942).They also joined the TAB navigation party. TAB and S-TAB now visit blockquotes, stopping on their first quoted character.With point on a blockquote, RET now copies the quote's raw Markdown, without the > markers.Images in table cellsImages are now rendered as thumbnails within tables. Press RET on an image to open in full view.Thank you @alberti42 for #938. Tables also realign in the resized window's own buffer now (#934), so splitting a window no longer leaves a table laid out for the window it used to be in.LinksHovering a rendered link (or with point on one) now shows its target URL, so you can judge whether it's worth opening.Two new entry points landed alongside (#933):agent-shell-markdown-open-link-at-point opens the link at point.agent-shell-markdown-xref-backend plugs into xref-backend-functions, so M-. on a rendered path:line citation visits it. It returns nil anywhere else, web and binary links included, leaving point to the next backend.Recursive foldingRET toggles the fragment at point, as usual. C-u RET now toggles groups recursively (#924, #945).Queued -> steeredQueued a prompt, but wanted to steer instead? Pressing M-RET on an empty prompt now offers to steer the last queued prompt into the running turn (#918, #919). While this isn't something I need often, I'm pretty happy with the UX we landed on.While on the topic of steering, chat mode now handles steered prompt labelling (#930, proposed by @Gleek). If you'd like to render labels differently, agent-shell-chat-label-function now receives the :steered param.Exposing more options in headerAgents often expose options that never make it to the buffer header. Additional options are now offered via the (+N) menu (#921).Filtering noisy noticesAgents write all sorts to stderr, and agent-shell surfaces it under "Notices". You can now use agent-shell-notice-filter-function to filter notices (or modify) as preferred (#950 by @astoff). It receives an alist with :text, one stderr line, and returns the text to show or nil to drop it:(setopt agent-shell-notice-filter-function (lambda (notice) (unless (string-prefix-p "[idle-compaction]" (map-elt notice :text)) (map-elt notice :text))))A filter that signals or returns a non-string is reported, and the notice shown unfiltered.Your own system promptagent-shell-system-prompt is appended to the agent's default system prompt, sent whenever a session is created, loaded, resumed or forked (acp.el #37 by @systemfreund):(setopt agent-shell-system-prompt "Keep answers short and respond like a pirate.")Only agents advertising ACP's systemPrompt capability can take one. Configure a prompt for an agent that can't, and agent-shell says it's ignored rather than dropping it quietly. An agent config's :system-prompt takes precedence.Secrets resolved at agent startagent-shell-make-environment-variables now takes a function as a value and calls it when the agent starts, rather than when your config loads (#948 by @nbarrientos). Handy for a password store still locked at init:(setopt agent-shell-opencode-environment (agent-shell-make-environment-variables "MY_SECRET" (lambda () (auth-source-pick-first-password :host "example.org"))))A function that errors or returns nil leaves the variable out of the agent's environment and says so in a boxed warning in the shell. Works across all agents.Shells follow project-switch-projectStarting a shell from C-x p p used to land in the current shell's directory rather than the project you just picked, and offer that directory's sessions to resume. It now starts in the chosen project (#949 by @OSadovy).Fork and show historyWhen agent-shell-session-fork-restore-history is non-nil, forked sessions will attempt to restore interaction history as per agent-shell-session-restore-verbosity.agent-shell-session-fork-restore-history is off by default, so you'll need to enable it with:(setopt agent-shell-session-fork-restore-history t)Note: You'll need an agent that supports loading a session right after forking it, like claude-agent-acp 0.90.0 or newer.Faster streamingStreaming performance received some love. Message chunks are coalesced before rendering (#883 by @moyotar), thought chunks are batched the same way, and restored sessions replay with far less overhead (#897 by @Gleek).Lots of fixesAs mentioned, the much effort in the release went into fixes and improvements.Rendering:Bold renders next to text and punctuation (#925 by @vritser), with CommonMark flanking rules relaxed for CJK (#942).Numbered headers and bold steps no longer render as list items (#939 by @budu), nor does markup that merely reads like one.A fenced block's last line is fontified (#916 by @liaowang11), two flush source blocks render as two (#940), and nested ones stay verbatim while streaming.Headers keep their title when a code fence follows directly (#947).Text quoted into the prompt keeps its quote face (#952 by @OSadovy).Copilot multi-hunk diffs render as separate hunks (#931), and Codex streamed output is fenced correctly (#906 by @bartbunting).Icons scale correctly on HiDPI Linux (#917 by @heraplem).Unfinished tool calls survive turn end (#941), so a late subagent keeps its title and grouping.Performance and responsiveness:Buffers shown in no window measure against a live one (#885 by @bcc32), and measuring glyph height no longer triggers window hooks (#886, also @bcc32).agent-shell-cwd-function is called once per command (#857, also @bcc32).Pending Markdown is protected and fontification updates silenced (#915 by @daym).Chat mode relabels only the last turn while streaming, not the whole buffer (#943, profiled and proposed by @Gleek).In shell-maker, auto-scroll can be suppressed during bulk updates (#50 by @Gleek), which is what makes the faster replay possible.Also in shell-maker, the curl --version check that ran on every submission is gone (#32 by @carlosdagos).In acp.el, agents handle SIGTERM before being killed on shutdown (#35 by @fjolliton).Elsewhere:Undo history no longer carries programmatic renders: the compose buffer starts empty (#893 by @liaowang11) and resets after a deferred render (#902 by @bcc32).New worktrees stay under the main working tree (#904 by @xiaofeilovecoding).A restored session finishes initializing even when rendering errors (#887 by @bcc32).Flymake context is only used when flymake-mode is on (#892 by @liaowang11), and single-line regions carry one line number (#922 by @martenlienen).Quoting a region leaves the mark where reading stopped (#896 by @OSadovy).Minibuffer completion keeps the agent's candidate order (#929 by @Zzull).Remote URLs are skipped when parsing local links (#926 by @mpmiszczyk), and optional system-sleep functions are declared (#928 by @mboldt).In shell-maker, non-ASCII prompt history no longer reads back as raw bytes, and entries already corrupted by older versions are decoded on read (#49 by @kazmuroi).In acp.el, agent stderr reaches error handlers one line at a time rather than in arbitrary pipe chunks (added for notice filtering).Public functionsA few more additions for package authors building on agent-shell.Prompt locationsagent-shell-prompt-ranges returns the range of every prompt in the buffer, in buffer order, covering prompts typed at the shell, replayed by a restored session, and steered into a running turn (#882). Each comes back as an alist spanning the comint shell prompt itself (:prompt-start, :prompt-end) and the input typed after it (:input-start, :input-end).Usage events and ACP _metaagent-shell-subscribe-to now offers a usage-update event, broadcast when the agent reports context window or cost usage. Events now also carry ACP's _meta, so integrations can read whatever an agent attaches without waiting on agent-shell.Choosing sessions programmaticallyagent-shell-session-strategy now accepts a function. It's called with the resumeable sessions and returns new, latest, prompt, or a (session-id . ID) cons to load a specific one:(setopt agent-shell-session-strategy (lambda (context) (if (map-elt context :sessions) 'latest 'new)))HousekeepingIf you peeked at the commit logs for the period, you'll see it's been another busy month. Since the last post, 193 commits landed, 32 issues have been closed and 27 pull requests merged. As of this writing, the backlog sits at 6 open issues and 5 open PRs (versus 4 and 6 last time around).Zooming out a little, here's how the backlog has tracked:As usual, this chart was generated using the /github-activity skill shared in my emacs-skills repo.All of this requires daily attention.Sponsoring keeps agent-shell running.While paying for tokens keeps agents running, sponsoring keeps agent-shell running.agent-shell is built and maintained by me, an indie dev, while the tools it competes with often have well-funded teams behind them. Funding Emacs-native tools, so we can keep living in our beloved editor, matters now more than ever.Using agent-shell at work? Ask your employer to sponsor too. Companies can contribute at a scale individuals can't.Pull requestsThank you to all contributors for these improvements!agent-shell#857: Call agent-shell-cwd-function only once per command (@bcc32)#873: Add Antigravity default-model-id and default-session-mode-id defcustoms (@tychoish)#883: Coalesce streamed message chunks before rendering (@moyotar)#885: Measure a buffer shown in no window against a live window (@bcc32)#886: Do not trigger window hooks when measuring glyph height (@bcc32)#887: Finish initializing a restored session even if rendering errors (@bcc32)#889: Add a separate provider notification handler (@Cy6erBr4in)#892: Only use flymake error context when flymake-mode is on (@liaowang11)#893: Start the viewport compose buffer with an empty undo history (@liaowang11)#894: Render the viewport's held-back markup when a turn ends (@liaowang11)#896: Leave the mark where reading stopped when quoting a region (@OSadovy)#897: Reduce overhead when replaying restored sessions (@Gleek)#902: Reset undo history after a deferred markdown render (@bcc32)#904: Keep new worktrees under the main working tree (@xiaofeilovecoding)#906: Fix streamed Codex command output (@bartbunting)#915: Protect pending Markdown and silence fontification updates (@daym)#916: Fontify the last line of a fenced code block (@liaowang11)#917: Fix HiDPI icon scaling on Linux (@heraplem)#922: Use one line number for single-line region contexts (@martenlienen)#925: Fix bold rendering next to text and punctuation (@vritser)#926: Skip remote URLs in parse-local-links (@mpmiszczyk)#928: Declare optional system-sleep functions (@mboldt)#929: Keep original order of candidates for minibuffer completion (@Zzull)#938: Lay out table cells that show images (@alberti42)#939: Don't render numbered headers and bold steps as list items (@budu)#949: Start a new shell in the project chosen with project-switch-project (@OSadovy)#952: Keep the quote face on text quoted into the prompt (@OSadovy)acp.el and shell-makeragent-shell stands on acp.el to speak ACP and shell-maker for its shell foundations, so fixes landing there reach you just the same:acp.el #34: Allow listing sessions without a working-directory filter (@Gleek)acp.el #35: Let the agent handle SIGTERM before killing it on shutdown (@fjolliton)shell-maker #50: Allow suppressing auto-scroll during bulk updates (@Gleek)Make it sustainable, sponsor agent-shellAs of this writing, we're 89% of the way to the 150 monthly sponsors goal, a tiny closer since the last update. If agent-shell is part of your daily workflow, please consider becoming a monthly sponsor (or ask your employer to).Not in a position to sponsor? A GitHub star helps with exposure and brings in new users.