-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Bug Report
Version: Copilot CLI v1.0.6
OS: macOS (Darwin)
Frequency: One-time occurrence (not consistently reproducible)
Error
ERROR Rendered more hooks than during the previous render.
Stack Trace
- Ma (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3898:3104)
- E1 (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3898:14278)
- Object.useMemo (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3988:5480)
- process.env.NODE_ENV.rl.useMemo (Library/Caches/copilot/pkg/universal/1.0.6/app.js:2918:12500)
- pie (Library/Caches/copilot/pkg/universal/1.0.6/app.js:4641:24035)
- react-stack-bottom-frame (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3988:12778)
- gm (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3898:812)
- w1 (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3905:18055)
- C1 (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3914:10109)
- nr (Library/Caches/copilot/pkg/universal/1.0.6/app.js:3863:112)
Analysis
The minified component pie (at app.js:4641:24035) calls useMemo, which triggers the React hooks invariant violation. This indicates a conditional code path within that component that results in a different number of hooks being called between renders — likely a useMemo call that is reached on a re-render but was not present during the initial render.
The error originates from the bundled React reconciler inside app.js (the Ma function corresponds to React's internal updateWorkInProgressHook), confirming this is a hooks ordering issue in the CLI's own React component tree.
Steps to Reproduce
Not consistently reproducible — occurred once during normal CLI usage. Clearing ~/Library/Caches/copilot and restarting resolved it.