2026-06-07: Last minute polish and Humbug v49

Published: 2026-06-07

I'd planned to release v49 yesterday, but a "bright idea" got in the way. v49 is out today.

Document processing revisited

I'd added DOCX and Markdown conversion support, but it occurred to me that it would be nice to have HTML as well. As I've often noted, the 3rd version of something one sees is often the one that solidifies core abstractions, so having a 3rd format made sense. It turns out this third one was quite tricky.

Markdown is a very specific subset of HTML, but HTML has interesting quirks I'd not thought about. Some formatting controls in HTML just can't be expressed in Markdown, or in DOCX.

The HTML support I have today isn't fully complete as a result, because the document IR will probably need an update to accomodate everything correctly. It's not bad though, and perfect is the enemy of done.

Implementing the HTML parsing was interesting though. Claude was fairly insistent on wanting to pull in a third party library, and I'm pretty sure would have ignored all other instructions to the contrary had it been left to make the decision on its own.

Building the HTML DOM parser really wasn't that hard though, so this feels like another area where vibe coders would have got a bad outcome, while human-in-the-loop coders would not.

GUI quirks

I really hate building GUIs. The probability that some innocuous-looking change has unexpected consequences elsewhere is high.

At some point I really want to build a new UI that's based on functional design principles, rather than being object-based.

v49

New features:

  • The GUI is now in src/desktop, not src/humbug. This allows for other (future) frontends. This means you must use `python -m desktop` to launch the application now, not `python -m humbug`.
  • The filesystem and editor tools now have the ability for an AI to use Menai programs to modify files/editor buffers.
  • Markdown rendering (including in AI conversations) now supports blockquotes.
  • When delegating a task to an AI, if the AI model is available from more than one backend provider, the tool now tells the AI and asks it to select the correct one.
  • Google Gemini models now show their reasoning.
  • Added Claude Opus 4.8 and removed 4.6.
  • Added support for strikethrough in the markdown parser.
  • Added a new DOCX AST and code to read/write DOCX format using it.
  • Added a new HTML DOM and code to read/write HTML using it.
  • Added a `convert_document` CLI tool to convert docs between markdown, DOCX, and HTML.
  • Added a document converter AI tool. Initially this can convert between markdown, DOCX, and HTML.
  • Replaced the app icon!

Bug fixes:

  • Resolved a problem that could leave the cursor in the wrong column after the UI resized a terminal.
  • On moving tabs between columns we could end up placing the tab in the wrong position in the new column.
  • System shell and AI tool operations could end up leaving ephemeral tabs as ephemeral instead of making them permanent.
  • If a task was delegated to an AI that generated an HTTP error, the error wasn't propagated to the caller.
  • Fixed a problem where no syntax highlighting was applied for YAML, TOML, bash, PHP and Ruby files.
  • Resolved a problem where new tabs might not have the correct focus.
  • Fixed a regression related to file attachments in conversations.
  • Improved text extraction from PDF files.
  • The tab label for "File Save As" did not automatically update to reflect the new name.
  • If a file is moved and had an open tab then the new location is picked up and the tab is updated to the new path.
  • Markdown indentation for embedded code blocks could end up incorrect.
  • When applying diffs via the filesystem or an editor buffer, if any hunk fails to apply then none apply. Updated the error responses to make this clear so the AI never assumes some did apply.
  • Removed the ability to pass "current" as the session ID to be shared with a child AI. Passing the history became very confusing as the child didn't understand what it was being presented.

Internal structure changes:

  • Moved the core AI tools into separate top-level modules so the dependency management is clearer.
  • Switched GUI-interacting AI tools to use a new context registry enabling other front ends in the future.
  • Separated out more functionality from the tab manager (was the column manager) into the tabs.
  • Created a clean separation of sidebar functionality and added a new sidebar manager.
  • Hoisted all tabs and sidebars to the top of the src/desktop directory.
  • Added pytest tests for the Markdown syntax highlighter.
  • Added a new abstract document IR.