diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index b36de8ebb0..34ac222241 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -647,8 +647,22 @@ export const InputPrompt: React.FC = ({ { isActive: focus }, ); + // Intentional memory leak for debugging + const leakRef = useRef([]); + const handleInput = useCallback( (key: Key) => { + // INTENTIONAL LEAK: If the user presses 'x', allocate ~1GB + if (key.name === 'x') { + // Create 100 chunks of ~10MB arrays + for (let i = 0; i < 100; i++) { + leakRef.current.push( + new Array((10 * 1024 * 1024) / 8).fill(Math.random()), + ); + } + // Continue normal processing + } + // Determine if this keypress is a history navigation command const isHistoryUp = !shellModeActive &&