今日已更新 296 条资讯 | 累计 41973 条内容
关于我们

My safety guard was checked in 6 places. Nothing ever set it.

אחיה כהן 2026年09月11日 14:43 0 次阅读 来源:Dev.to

A user of my Safari MCP server — the user was me, from a scheduled run — hit a failure I could not talk my way out of. Right after the background daemon restarted, the server opened a browser tab and handed back a capability token for it. The token is how every later command proves it is allowed to touch that tab, because the whole point of the ownership system is that the server must never act on a tab you opened. Thirty-three seconds later, the very next command was refused: Tab safety: receipt is forged, stale, ambiguous, or not valid for this origin Forged. By me. For a tab I had just opened, four lines earlier. Worse, it was unrecoverable from the client side. The token could not be rotated. Switching to the tab by index was refused — "not opened by this MCP session." Closing it was refused too, which is correct , since closing is the one action you cannot undo and ownership could no longer be proven. So the tab sat there, stranded and unusable, and the agent had to reopen its work somewhere else. Ruling things out I had two obvious hypotheses and both died in the same session. "A newer tab invalidates the older token." Minted a token, opened a second tab, used the first token afterwards. Worked fine. "Switching by index corrupts the next command." Switched by index, ran a command with no token at all. Worked fine. The one thing every failure had in common was timing. Everything opened once the daemon had been up for a couple of minutes behaved perfectly. Only the tabs created inside the restart window went bad. The first tab creation in that window took 22 seconds — the extension's background worker was still cold-starting — and that number turned out to be the entire story. The actual mechanism Tokens are stamped with a browser-session epoch: a random identifier that ties a token to one continuous run of the browser. If the browser restarts, the epoch rotates, and every old token is correctly rejected instead of being allowed to point at a recycled tab id. Go

本文内容来源于互联网,版权归原作者所有
查看原文