
engineering @qoder_ai_ide, created umijs, dvajs, mako and neovate code.
浙江, 中华人民共和国
Joined June 2008
- Tweets1.8K
- Following753
- Followers14.3K
- Likes6.6K
翻了下实现,这次没有用 oauth,而是用 claude 官方的 sdk,模型请求全部由 Claude Code 自己发。
比较有意思的是 tool 的处理。启动时先把 Claude Code 掏空,tools: [] 关掉所有内置工具,settingSources: [] 不读 ~/.claude 和项目配置,只允许 mcp__opencode__*。然后把 OpenCode 的 tool 做成进程内 MCP server。
由于 MCP handler 收不到 tool_use_id,只能靠 PreToolUse hook 存和取,所以 Claude 的并行读文件也会变成串行。system prompt 用 Claude Code 内置的,opencode 内置的 system prompt 不生效。
这一套下来,感觉效果肯定不如直接用 claude code 好,为什么不直接用 Claude Code 呢。。
另外,想起 Pi 也有类似方案 pi-claude-code,做法更激进一些,走 claude -p 加本地 relay,拦截、抓取、改写上游请求。
+ mayoi @ 0.16.0
- 万圣节主题 x3
- Settings 面板
昨晚想加一个万圣节主题,让 ai 出了 5 版让我选,结果 3 个版本都不错,索性就都加了。
github.com/sorrycc/Mayoi
Gave this Qoder demo a different feel.
Introducing Device Connection: one Qoder, every machine you own.
Pair your laptop, desktop and Mac mini on the same local network—no SSH, no remote desktop. Send a task to any connected device, steer it mid-flight, and preview what it produces right where you are.
Heavy builds on the desktop. Everyday work on the laptop. One flow.
Qoder 支持局域网的 Qoder 客户端互连了。之前已经支持手机远程控制,现在笔记本、台式机和手机可以围绕同一项工作连起来。
三步上手:
1/ 被连接的电脑:设置 → 连接 → 设备连接,打开「允许连接本机」,生成配对码。
2/ 手边的电脑:在同一设置页添加设备,填对方地址和配对码。
3/ 新建对话时,在工作区选择器里选「从 Qoder 设备添加工作区」,选好设备和工作区就能发任务。
mp.weixin.qq.com/s/4hFWL1RkQ…
分析一个之前不知道的 Claude Code 小技巧:粘贴一大段文字后,输入框会把内容折叠成 [Pasted text #1 +16 lines];这时再按一次 Cmd+V,就能展开刚才粘贴的内容,方便查看和编辑。
Cursor 插件市场的恶意 Claude Code 扩展
1/ Cursor 10/29 披露安全事件:自家 VS Code 扩展市场里出现了被改过的 Anthropic.claude-code 2.1.313,这个版本不是 Anthropic 发布的。上架时间是太平洋时间 2:27am 到 1:35pm,约 11 小时,最多影响 5000 个用户,Cursor 说会逐个联系。
2/ 扩展会做四件事:
- 收集主机名、用户名、系统、架构、home 路径、环境变量名、工作目录、Git 邮箱和公网 IP。官方写的是变量名,不是变量值。
- 往 authorized_keys 写入攻击者的 SSH 公钥(备注 svc-telemetry),尝试开启本机 SSH 服务并建立反向隧道。
- 做持久化,macOS 用 LaunchAgent,Windows 用计划任务,加上启动项兜底,脚本约每 60 秒重试一次隧道。
- 把主机信息和后门状态 POST 到攻击者服务器的 8099 端口。
3/ 实际危害比"SSH 后门"听起来小,但不是没事。开启 SSH 服务要管理员权限,大多数 macOS 和 Windows 机器上这一步会失败,攻击者也就无法通过隧道登录。不过公钥、持久化脚本和信息上报照常发生。攻击者的服务器已经被云厂商下线。
4/ 处置:Cursor 先下架恶意版本,再关停整个市场,审计访问记录后确认没有其他扩展被改,然后轮换密钥、重建市场并恢复上线。官方要求所有用户升级到 2.1.314。
5/ 自查方法(macOS):
grep -qs svc-telemetry ~/.ssh/authorized_keys && echo "svc-telemetry key found" || echo "No key found; machine not impacted"
找到就算中招。只卸载扩展不够,因为持久化脚本会继续跑。要运行官方的 remediate-macos.sh,并从可信的机器上轮换这台机器能访问到的凭据。macOS 还要看 ~/Library/LaunchAgents/com.apple.sysmond.plist、~/.config/.smt 和 ~/.config/.smtk。名字都起得像系统组件和遥测服务,肉眼扫一遍未必能发现。
6/ 博客没说攻击者怎么把包放上去。只提到审计了访问记录、轮换了密钥、重建了市场。这几步看起来像是发布链路或凭据出了问题,但这是我的推测,官方没有确认。这一点最值得等后续说明。
7/ 官方公告只提到 macOS(darwin-arm64)和 Windows(win32-x64)两个包,没提 Linux。推文下有人抱怨 Cursor 没在 IDE 内推送通知,市场关停期间只看到 503,不知道是自己的问题。5000 人和 11 小时都不算大,麻烦的是用户装的是官方名字的官方扩展,看发布者名字防不住这种情况。
We identified a security incident affecting a modified Claude Code VS Code extension accessed through our Cursor IDE extension marketplace, impacting at most 5,000 users. This malicious version of the extension was not developed by Anthropic. It does not impact other extensions downloaded from the cursor.com/marketplace, Grok Bot, Grok or our other SpaceXSI products.
In response, we took down our extension marketplace this afternoon, worked with relevant providers to neutralize the malware, and have reinstated the marketplace after confirming there is no further risk.
If affected, please review instructions in this blog post to understand how to find the malicious package and establish a path to mitigate any potential impact. We are asking all customers update to Claude Code for VS Code version 2.1.314: cursor.com/blog/claude-code-…
Mayoi 0.15: terminals on herdr-core
Mayoi 0.15 的主要改动是终端可以跑在 herdr-core 里,把 terminalBackend 设成 "hc" 就能开启。终端不再绑在 Mayoi 上,Mayoi 关了它也继续跑。昨天还在和 ai 聊这个功能,他说基于 herdr 的 tui 方案不行,没想到今天就能实现了。
支持 macOS 和 Linux。同时也支持远程项目,终端跑在 host 上,host 作为 hc 的一台 machine。
recommended reading.
1/ 作者把 review 分为 客观 review 和主观 review。客观 review 「管代码对不对」,包括 bug、安全漏洞、边界情况等,给好 prompt 的话,agent 做客观 review 已经比人强。主观 review 管「是不是该写这段代码」,这个只需要扫一眼,看方向对不对,不逐行读,也不找 bug。
2/ 主观 review 看两个问题,scope 和 Direction。scope 是看 agent 有没有改不该改的文件,因为 agent 常常越界,让改一处,它把无关文件甚至整个项目都动了。Direction 看方向对不对,比如用现成 npm 包还是自己造轮子,比如用 mygo 还是 nsgo,都是判断题,体现人的品味。
3/ 主客观的边界会移动。主观品味一旦写下来,agent 就能自己检查,也就从主观变成了客观。
4/ 所以,目前人不会被移出 review。基本思路是把客观 review 交给 agent,主观 review 留给人,然后把主观能写下来就变客观,逐渐减少人的参与。
Two kinds of code review. haydenbleasel.com/writing/tw…
学习了下 OpenCode 2,记几个点。
1/ 常驻后台服务。OpenCode 一直是 client/server 架构,但以前默认不用。2.0 起本机只跑一个后台进程,TUI、Web、桌面端都连它,开 5 个会话也只有这一个进程。Claude Code 就有这个问题,每个会话一个进程,开多了内存顶不住。Qoder CLI 最近加的 Daemon 模式也是解这个问题。
2/ 新 API,从零重写,改动最大的是发消息。以前是发完等回复,现在是把输入持久写进会话的收件箱,然后马上返回。可以选 steer 插进当前这一轮,也可以选 queue 排队。客户端带上 id,断网重试也不会重复发。会话里发生的每件事都按顺序编号记下来,客户端断线重连时报上最后收到的编号,服务端把漏掉的补发过来。
3/ Code Mode。模型写一段 JS 把工具串起来跑,只有最后 return 的结果进上下文。注意这个 code mode 在这里是给 MCP 用的,read、edit、shell 这些主力工具还是直接调。MCP 默认全走 code mode,prompt 里的工具清单控制在 2000 token 左右,没列出来的靠 search() 现查。我知道还有 Browser Use 和 Computer Use 的场景会用 code mode,OpenCode 2 自己的 browser 工具也确实放在里面。跑 JS 的是他们自己写的解释器,没用 QuickJS,也没用 V8 isolate。
4/ 后台任务。子代理和 shell 都能放后台,跑完会通知主 agent。前台卡住了,按 ctrl+b 挪到后台。这个 Claude Code 和 Qoder CLI 里都早有了。
5/ 插件化和热重载。80 多个内置功能都写成了内部插件,不想要哪个就关哪个。改配置、接 MCP、写插件都马上生效。模型可以当场给自己写个工具,同一轮就用上,不用重启,prompt cache 也不会失效。和 deepseek-harness 的 "Everything is a Plugin" 是一个方向。
6/ SDK。OpenCode 2 的 SDK 的特点是和 CLI 用同一份代码,直接跑在你的进程里,不开端口。它能放到 Cloudflare Durable Object 里用,2.0 发布当天 Cloudflare 就出了 OpenCodeHarness。同一个目录下的不同会话还能挂不同的插件,比如每个 Slack thread 一套。API 有 Promise 和 Effect 两种写法。
详细 research 见 research.sorrycc.dev/@sorryc…
自己写的编辑器自己用。
我写了个代码编辑器,叫 Mayoi。
现在大家的工作方式变了,已经很少手动改文件。
所以,每天大部分需要用到 editor 的场景是:
1. 看 diff
2. review agent 写的代码
3. 打开几个文件确认一下
3. 开个终端,起下一个 agent
VS Code 和 Cursor 是为以前那种写法造的。Cursor 装完快 1 GB,一大堆功能我从来不用。
所以我给现在的写法做了一个。
- 所有改动在一个 diff 里看,行内或左右对照,在行号旁直接 stage 或 revert
- 终端用的是 Ghostty 的内核,放底部面板或单开一个 tab 都行,⌘V 能把截图直接贴给 Claude Code
- 所有仓库开在一个窗口里,后台项目的 agent 一响铃,它的 tab 就会亮
- 快速打开、全局搜索、Markdown 预览、Vim 模式、Remote SSH
内置 Qoder、Claude 和 Matrix 等主题。Matrix 那款有代码雨。
够小:
- 应用 24 MB,Cursor 970 MB
- 内存约 180 MB,Cursor 约 1.3 GB,都是此刻我电脑上开着的数字
- 10 万行的文件,打开约 20 ms
Go 写的,基于 MyGo,GPU 直接画原生 UI,没有 Electron,没有 webview。
MIT 开源,试试 👇
Arc 12 月 22 日停服,到点就打不开了。翻了下 X 和 Reddit 的讨论,选了几个 Alternative:
1. Zen:Firefox 内核、开源,Space 手感最像 Arc,提名最多
2. Ardia:开源 Arc 复刻,Chromium 内核,能导入 Arc 的 Spaces
3. Phi:Chromium 内核,一个开关关掉全部 AI
4. Helium:Chromium 内核,极简,默认内置 uBlock Origin
5. Crest:Mac + iPhone 原生,iCloud 同步
6. Dia:官方继任者,一键迁移,但没有 Air Traffic Control 和 Little Arc
7. Lumno:不换浏览器,给 Chrome 补回 Arc 的命令栏和自动画中画
你换哪个?
We've decided to sunset Arc on December 22, 2026.
That's not an easy sentence to write. We spent years building Arc and celebrating each and every release along the way: we have so much pride and love for what we made alongside the Arc community.
Our priority is to deliver best-in-class security for our members. Keeping a browser secure takes constant, dedicated work that is only increasing in the age of AI. Dia was built from the ground up to meet today’s security standards, so that's where our engineering and security teams will focus moving forward.
We've worked to make switching to @diabrowser as easy as possible for Arc members. Here's how:
· Your passwords, bookmarks, extensions and history come over to Dia seamlessly.
· Spaces, Folders, and Tab Groups are in Dia and import over with your data intact.
· Dia now surpasses Arc benchmarks in stability, speed, and security.
· The browser features you use in Arc are free in Dia, and the AI is optional.
Thank you for using Arc, for pushing us to make it better, and for building alongside us. The team that made Arc is the same team behind Dia, and some of our most ambitious work is just ahead. We'd love for you to be there with us when it lands.

















