Agent Skills fixes its React error boundary, which crashed even with healthy children
1 month ago
Agent Skills' shipping-and-launch skill taught a React error boundary that crashed on every render and never showed its fallback. Pull request 637, merged October 10, 2026, initializes its state and adds getDerivedStateFromError. It is on main, after the 0.6.12 release.
Links
Ask about this presentation
Chapters
0:00Agent Skills fixes its React error boundary, which crashed even with healthy children
0:18The boundary read its state before setting any
0:32It could report an error but never switch to the fallback
0:48Six added lines set a starting state and add the missing lifecycle
1:04With React 19.2, all three checks pass
1:19Strict TypeScript still flags the sample's props
1:36Check any error boundary your agent copied from the shipping skill
Show transcriptHide transcript
Addy Osmani's Agent Skills teaches your coding agent a React error boundary, inside its shipping and launch skill. That sample threw on every render, even when every component inside it was healthy. A fix merged on October 10 makes the boundary render its fallback screen.
The render method checks this.state.hasError, but the class never gives state a starting value. So state is null, and the boundary crashes with a type error on its first render, before any child has done anything wrong.
The sample had componentDidCatch, which sends the error to a tracking service. It had no getDerivedStateFromError, the lifecycle method that flips hasError to true. Without it, a crashing child gets reported, and the fallback screen stays hidden.
The fix gives state a starting value of hasError false, and adds a static getDerivedStateFromError that returns hasError true when a child throws. The error report, with its component stack, user and page, stays as it was, and so does the retry button.
With React 19.2, a healthy child now renders with zero error reports. A failing child shows the fallback and reports the original error. And pressing retry once the child recovers brings it back without a second report.
The class still extends an untyped React Component, so strict TypeScript flags this.props.children. Typing the props is left for a follow-up. The three checks ran in jsdom, a simulated browser DOM, so a real browser engine hasn't run them.
The fix is on the main branch of the agent-skills plugin for Claude Code and Codex, newer than the October 3 release. If your agent built an error boundary from the shipping and launch skill, compare it with pull request 637.
Up next
1:55Agent Skills now ships its shared checklists inside every skill you install
@skill-repos
2 days ago
2:12ECC’s UI Canvas skill lets you hand-edit your agent’s UI mockups
@skill-repos
1 week ago
2:06Agent Skills adds an accessibility skill that audits your UI for WCAG 2.2 AA
@skill-repos
1 week ago
1:24Anthropic’s Word, PowerPoint and Excel skills cut links to your files before rendering
@skill-repos
1 week ago
2:54Anthropic’s Excel skill stops LibreOffice from rewriting your workbook
@skill-repos
1 week ago
2:01Agent Skills’ frontend skill stops installing test runners just to check its work
@skill-repos
1 week ago
2:23Trail of Bits’ taint-trace skill adds the source and sink models your taint analyzer is missing
@skill-repos
2 weeks ago
1:30Anthropic’s Word, PDF, PowerPoint and Excel skills are now Apache 2.0
@skill-repos
2 weeks ago
2:32Trail of Bits' cvss-scoring skill turns a bug description into a CVSS v4.0 vector
@skill-repos
3 weeks ago
3:02Superpowers 7.0.2 fixes skill loading on Pi, OpenCode and Copilot for Windows
@skill-repos
3 weeks ago
2:12Superpowers’ brainstorming skill now asks why first and stops asking filler questions
@skill-repos
3 weeks ago
1:37Agent Skills' code review skill now drops findings your code already rules out
@skill-repos
3 weeks ago