{"slug": "show-hn-hm-the-editor-for-when-you-pause-to-think", "title": "Show HN: Hm, the editor for when you pause to think", "summary": "A developer released Hm, a native code editor written in Go and rendered on the GPU with WebGPU, which ships with a built-in AI coding agent that connects to Anthropic, Gemini (API key or Vertex AI), OpenAI, Azure OpenAI and any OpenAI-compatible endpoint. Hm requires user approval by default for shell commands and deletes, enforces `guard.yaml` rules, offers rubber-duck and lazy agent modes, and lets users undo an agent turn together with the files it changed or branch from any message. The editor includes tree-sitter highlighting for 20+ languages, language server diagnostics and completion, ripgrep search, built-in git, and YAML-based settings, and it ships zero browser engines.", "body_md": "[NewHeadless mode, RPC and a Go package for the agent](https://usehm.dev/docs/headless/)\n\n# The editor for when\n\nyou pause to think.\n\nHm is a native code editor with an AI coding agent built in. The agent writes fast; the decision about what lands in your codebase stays with you.\n\nTalks directly to the models you already pay for\n\n## Built around the pause before you merge.\n\n*Hm* is the sound you make when you read a diff, a stack trace or a suggestion, and decide whether it is right. Everything in Hm is built to make that moment count.\n\n### A real editor, right there\n\nEvery change lands in a full editor with the language server, diagnostics and git diff beside it, not a chat bubble.\n\n### Modes that slow down\n\n**rubber-duck** plans and pushes back before touching code. **lazy** changes only what is necessary.\n\n### Asks before it acts\n\nShell commands and deletes need your OK by default, and `guard.yaml` rules always win.\n\n### Nothing is final\n\nUndo the last turn and its file changes, or go back to any message and try again. Every branch is kept.\n\n## Fast where it can be,\n\nquiet when you need to think.\n\n## Everything you reach for,\n\nnothing you wait on.\n\nWritten in Go and drawn on the GPU with WebGPU, Hm starts quickly and stays light, with the tools you expect from a modern editor.\n\n### Tree-sitter highlighting for 20+ languages\n\nMultiple cursors and column selection, regex find and replace, folding, soft wrap, indent guides, auto-closing pairs, Markdown preview and an optional Vim keymap.\n\n### Native, GPU-rendered\n\nNo Electron, no browser engine. A Go binary drawing its own UI with [Yoga](https://github.com/mirzakhany/yoga).\n\n**0** browser engines shipped\n\n### Language servers\n\nDiagnostics, hover, completion, definitions, references, rename and formatting. Missing servers install in one click.\n\n### Search with ripgrep\n\nProject-wide regex search and replace, with results on the left and an editable preview on the right.\n\n### Git, built in\n\nStage, commit, branch, merge with conflict tracking, fetch, pull and push. Tokens stay in your keychain.\n\n### Quick open & command palette\n\n`⌘` `P` for files, `⌘` `⇧` `P` for every command, go to symbol and go to tab.\n\n### Settings that are just YAML\n\nA settings page on top of `config.yaml`, user and project level, applied live on save with errors shown at their line.\n\n### Integrated terminal\n\nMultiple sessions, opened from the footer.\n\n### Inline completions\n\nGhost text at the caret from a small, fast model you pick. `Tab` accepts.\n\n### Splits, tabs, sessions\n\nSplit editor groups, back and forward, and your session restored on launch.\n\n## An agent that works with you,\n\nnot around you.\n\nBring your own key, keep your code on your machine, and stay in control of every step.\n\n### Any model, switched mid-session.\n\nAnthropic, Gemini (API key or Vertex AI), OpenAI, Azure OpenAI and any OpenAI-compatible endpoint. Presets for OpenRouter, Groq, Mistral, xAI, DeepSeek, Ollama, LM Studio and more only ask for a key.\n\n- `Ctrl`` L` searches every provider's models; the history goes along.\n- `/think off…max` sets how hard the model thinks, per session.\n- A `models.json` registry drives the context meter, compaction and the cost of every reply.\n- Keys live in the OS keychain or come from environment variables.\n\n```\nagent:\n  default_provider: anthropic\n  default_mode: rubber-duck\n  providers:\n    anthropic: { type: anthropic, api_key: \"keychain:anthropic\" }\n    openrouter: { type: openrouter, api_key: \"${OPENROUTER_API_KEY}\" }\n    local: { type: ollama, model: qwen3, context_window: 32768 }\n  favorite_models: [anthropic/claude-opus-5-5, local/qwen3]\n  compaction: { enabled: true, threshold: 0.85 }\n  subagents: { max_depth: 1, max_concurrent: 4 }\n```\n\n### Sessions are trees. Nothing is lost.\n\nEdit and resend any message to start a branch, or branch from the end of any turn. The old branch stays. Undo puts back the agent's last turn *and* the files it changed.\n\n- `/tree` to search and jump between branches,`/fork` to split a session off.\n- Saved after every step; an interrupted task reopens with a **Resume** button.\n- `/export` to one offline HTML page, secrets redacted;`/share` as a secret gist.\n\n- ●userAdd retries to the HTTP client\n- │assistantPlan: wrap Do() with backoff…\n- ├─userUse the stdlib only, no deps\n- │ │toolsedit client.go +42 −6\n- │ └assistantDone. Retries 5× with jitter v1\n- └─userRespect Retry-After headers too\n- │toolsedit client.go +18 −3\n- └assistantWaits as long as the API asks…\n\n### Guardrails you write, not hope for.\n\nApproval per tool and per mode, plus a `guard.yaml` of deny, read-only and ask rules checked before anything runs. A cloned project's rules can only tighten yours, never loosen them.\n\n- Modes: **lazy** ,**rubber-duck** ,**auto** ,**fullstack** , or your own.\n- Type while it works: `Enter` steers,`Alt`` Enter` queues a follow-up.\n- Sub-agents run in parallel, in the foreground or background, read-only unless allowed.\n\n```\npaths:\n  deny: [\".env\", \"*.pem\", \"~/.ssh\", \"~/.aws\"]\n  read_only: [\"migrations/**\"]\n\ncommands:\n  deny: [\"rm -rf /*\", \"sudo *\", \"re:curl .*\\\\| *(ba)?sh\"]\n  ask: [\"git push*\", \"git reset --hard*\"]\n\nnetwork:\n  allow_hosts: [\"pkg.go.dev\", \"github.com\"]\n```\n\n### Reads your AGENTS.md\n\nAnd `CLAUDE.md`, from every folder between home and the workspace. `SYSTEM.md` replaces or extends the base prompt.\n\n### Prompt templates\n\nEvery `.md` in `.hm/prompts` or `.claude/commands` becomes a `/command`, with arguments and file includes.\n\n### MCP, skills & your tools\n\nAdd MCP servers, skills, or wrap any CLI as a tool. Arguments never go through a shell.\n\n### Images in, too\n\nPaste a screenshot, drop a file, or mention `@shot.png`. Large pictures are scaled down first.\n\n### Long sessions keep going\n\nNear the window's limit, older messages are summarised. A context meter shows how full it is.\n\n### Survives flaky APIs\n\nRate limits and dropped connections are retried with backoff, and the chat tells you so.\n\n## The same agent, without the window.\n\nRun it in scripts and CI, drive it from another program, or embed it in your own Go code. Same config, same `guard.yaml`, same sessions.\n\n```\n# Review a diff in CI, no window needed\ngit diff origin/main... | hm agent -p \"review this\"\n\n# Resume the newest session and let it edit files\nhm agent --continue --approve edits -p \"now fix the tests\"\n\n# Every event as JSON lines, for scripts and jq\nhm agent -p --output json \"list the packages\" \\\n  | jq -c 'select(.type == \"tool_call\")'\n{\"id\":\"1\",\"type\":\"prompt\",\"text\":\"fix the failing test\"}\n{\"id\":\"2\",\"type\":\"steer\",\"text\":\"only touch the parser\"}\n{\"id\":\"3\",\"type\":\"approve\",\"call_id\":\"toolu_01\",\"allow\":true}\n{\"id\":\"4\",\"type\":\"set_model\",\"provider\":\"anthropic\",\"model\":\"claude-opus-5-5\"}\n{\"id\":\"5\",\"type\":\"export\",\"format\":\"html\"}\nr, err := agent.New(agent.Options{Root: \".\", Approver: myApprover{}})\nif err != nil {\n\treturn err\n}\ndefer r.Close()\n\ngo func() {\n\tfor e := range r.Events() {\n\t\tlog.Println(e.Kind)\n\t}\n}()\n\nerr = r.Prompt(ctx, \"what is wrong here?\", agent.Image{Data: png})\nfmt.Println(r.Answer())\n```\n\n## Hands stay on the keys.\n\nEvery binding can be changed in Settings or YAML, with two-chord sequences and VS Code-style `when` conditions.\n\n`⌘`\n\n`⇧`\n\n`P`\n\n`⌘`\n\n`P`\n\n`⌘`\n\n`L`\n\n`⌘`\n\n`⌥`\n\n`L`\n\n`⌃`\n\n`L`\n\n`⌘`\n\n`T`\n\n`⌘`\n\n`⇧`\n\n`F`\n\n`⌘`\n\n`D`\n\n## Take a moment. Hm.\n\nSigned and notarized for macOS, with builds for Linux and Windows. Free and open source.\n\n`brew install --cask usehm/tap/hm`", "url": "https://wpnews.pro/news/show-hn-hm-the-editor-for-when-you-pause-to-think", "canonical_source": "https://usehm.dev/", "published_at": "2026-11-24 18:47:09+00:00", "updated_at": "2026-11-24 19:12:27.948817+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["Hm", "Anthropic", "Gemini", "OpenAI", "Azure OpenAI", "OpenRouter", "Ollama", "WebGPU"], "also_reported_by": [], "takeaway": "Hm's agent defaults to requiring approval for shell commands and deletes, with `guard.yaml` rules overriding the agent, and its undo restores both the last agent turn and the files it changed.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-hm-the-editor-for-when-you-pause-to-think", "markdown": "https://wpnews.pro/news/show-hn-hm-the-editor-for-when-you-pause-to-think.md", "text": "https://wpnews.pro/news/show-hn-hm-the-editor-for-when-you-pause-to-think.txt", "jsonld": "https://wpnews.pro/news/show-hn-hm-the-editor-for-when-you-pause-to-think.jsonld"}}