· via Hacker News – Front Page (native)
YouTube reopen bug rewinds unfinished videos 20 seconds, traced with ChatGPT
A developer reports that YouTube's web player resumes unfinished videos 20 seconds early on every tab reopen — an error the Android app avoids — and enlisted ChatGPT and Chrome's DevTools protocol to investigate.

A rewind nobody asked for
A developer has documented a YouTube bug in which the web player resumes an unfinished video noticeably earlier than the point where it was left off — and every close-and-reopen of the tab pushes that resume point further back. According to the write-up, which surfaced on the front page of Hacker News, pausing a video, closing the tab and reopening it restored playback exactly 20 seconds before the pause. Repeating the cycle cost another 20 seconds, and shutting down the entire browser added one more 20-second rewind on top.
The author jokes that this amounts to an undocumented keyboard shortcut: close the tab, reopen it, and collect a 20-second jump back — with the drawback of a full page reload every time.
The fault also appears to be specific to the web client. The author reports that the same watch checkpoint resumes at the correct moment in YouTube's Android app, every single time. Pause in the browser, and the phone's history still picks up precisely where playback stopped, while the browser itself reopens with the unwanted rewind. The post promises an explanation for that platform split, but only after walking through how the investigation was done.
The author's stated goal was to hand Google a complete report — the problem, its location in the code and a proposed fix. An early detour asked ChatGPT whether a similar recent glitch on Instagram might share a cause with YouTube's; the model produced speculation, which the author discarded before narrowing the scope to YouTube alone, on the working assumption that the fault lay in how checkpoint timestamps are restored rather than in the reload itself.
Instrumenting the player
Because YouTube's player logic runs in the browser, its code can be inspected even though it ships heavily obfuscated. The central question was whether the resume timestamp arrives from the server fully formed or gets modified on the client. To investigate behaviour that happens during page load, the author asked ChatGPT how to proceed, and the model supplied a Tampermonkey userscript that hooks the video element's seek operation and logs where each jump starts and ends — output that survives a reload and fires when YouTube performs its checkpoint restore.
Turning that log line into a breakpoint yielded a proper debugging session with a call stack. Roughly ten minutes of climbing through minified code was enough to convince the author to delegate the rest of the work.
Handing the debugger to the model
ChatGPT's next suggestion was to let it take over. Chrome ships with a remote debugging option, the model explained, and an MCP server built on the Chrome DevTools Protocol can expose those capabilities to an agent — in this case OpenCode, a terminal-based coding assistant. Once wired together, the model could read the loaded JavaScript, watch network traffic, inspect the page and modify running code on its own initiative.
The author addresses the obvious security concern by noting the guardrail: each time the agent tries to attach, Chrome raises a permission prompt, so the browser is only opened up deliberately.
Why it matters
Two things lift the post above a curiosity. The first is the bug itself. Resume behaviour is core plumbing for a product used by billions of people, and a drift that compounds by 20 seconds on every reopen points to checkpoint state being saved or restored carelessly — and only on one platform. A report with a precise trigger, a measurable offset and a clean web-versus-Android boundary is exactly the kind that becomes actionable.
The second is the workflow. Web developers have always been able to debug the sites they visit; what has changed is that a model can now write the instrumentation, point to the right tooling and then operate the debugger itself. The author's escalation — from asking questions, to running a supplied script, to granting an agent live control of DevTools — sketches a practical template for investigating opaque client-side code, and a preview of how bug hunting changes when the hands on the debugger can belong to a machine.
- #youtube
- #chatgpt
- #debugging
- #chrome-devtools
- #web