AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Cursor Blog·2026年4月21日 21:00·約10分で読める

Cursorアプリの安定性維持

#Cursor#開発ツール#ソフトウェア安定性#パフォーマンス最適化
TL;DR

Cursor開発チームは、アプリの動作安定性を維持するため、定期的なバグ修正とパフォーマンス最適化を実施している。

AI深層分析2026年4月22日 03:08
2
参考/ 5段階
深度40%
1
関連度30%
2
実用性20%
2
革新性10%
1

キーポイント

1

安定性最優先の運用方針

Cursorチームは機能追加よりも基盤の安定性を重視し、継続的なメンテナンスサイクルを運用している。

2

定期的なバグ修正と最適化

ユーザーフィードバックや内部テストに基づく不具合修正と、リソース使用効率の向上を定期的に行う。

3

ユーザー体験の基盤整備

開発チームが透明性を持ってメンテナンス方針を明文化し、信頼性の高い開発環境を提供する姿勢を示している。

影響分析・編集コメントを表示

影響分析

本記事は特定の開発ツールの運用方針を示すものであり、業界全体に直接的な技術的影響を与えるものではない。しかし、AIコーディングツールの成熟段階において「安定性確保」がユーザー維持の鍵となることを示唆しており、開発チームの品質管理姿勢を評価する上で参考となる。

編集コメント

機能追加競争が激化するAI開発ツール市場において、安定性維持のための地道なメンテナンスを明文化する姿勢は健全である。ただし、具体的な改善数値や事例が欠けるため、ユーザーにとっては既存の安定した環境を期待する程度にとどまる。

安定したCursorアプリの維持

当社のユーザーの多くは、Cursorを1日中使い続けています。つまり、稀なクラッシュであってもユーザー体験に与える影響は極めて大きいということです。同時に、ユーザー数の増加に伴い、サブエージェント(subagents)、即時 grep(instant grep)、ブラウザ操作(browser use)など、より野心的な機能の提供が進むにつれて、アプリの安定性を維持する課題も大きくなっています。

これらのクラッシュの大部分は、アプリがメモリ不足(Out of Memory: OOM)に陥ることが原因です。過去数ヶ月の間、私たちはクラッシュやメモリ圧力(memory pressure)の可視化を実現するシステム、ホットパス(hot paths)に対する高信頼性の修正・最適化、そしてリリース前にリグレッション(regressions)を検出するガードレールを実装してきました。

すべてのCursorアプリバージョンを統合したセッションあたりのOOM発生率(OOM-per-session rate)は2月下旬のピーク時に比べて80%低下し、リクエストあたりのOOM発生率(OOM-per-request)も3月1日以降73%低下しています。本稿では、その達成に至るまでに構築したシステムについて詳しく解説します。

不安定さの検出と計測

当社のデスクトップアプリは、Visual Studio CodeとElectronのオープンソース基盤をベースに構築されており、マルチプロセスアーキテクチャ(multi-process architecture)を採用しています。つまり、エディタや新しいエージェントウィンドウを動作させるレンダラープロセス(renderer processes)、および拡張機能、ストレージ、エージェント機能を動作させるユーティリティプロセス(utility processes)のいずれかでクラッシュが発生する可能性があるということです。

レンダラープロセスのクラッシュは最も深刻です。なぜなら、ユーザーがエディタを完全に使用できなくなるためです。これらのクラッシュは主にV8のメモリ制限に達することが原因であり、私たちの最新の取り組みの焦点となっています。拡張機能のクラッシュも言語サービス(language services)などの重要な機能を中断させることがありますが、通常はユーザーへの影響を最小限に抑えながら回復します。

致命的なクラッシュはすべて、テレメトリ(telemetry)システムを通じて報告されます。これには影響を受けたプロセスの種類、クラッシュのタイプ、デバイスおよびアプリケーションのメタデータ、そして可能な場合はミニダンプ(minidumps)やスタックトレース(stack traces)などのコンテキスト情報が含まれます。

これらのクラッシュイベントをもとに、アプリバージョンごとの内訳を可能にする指標を構築しました。セッション単位またはリクエスト単位の発生率を算出しており、前者はクラッシュが発生するセッションの数を概ね把握し、後者は影響を受けるセッションにおけるクラッシュ問題の深刻度を表します。これらのダッシュボードはクラッシュ発生から数分で更新されるため、新バージョンのリリースを密に追跡し、潜在的なリグレッションを迅速に検出できます。

デュアルなデバッグ戦略

アプリのクラッシュやメモリ不足(Out-of-Memory)問題のデバッグには、二つの柱からなる戦略を採用しています。

トップダウン(Top-down)

一つ目は、最もメモリ消費の大きい機能に焦点を当てたトップダウンでの調査です。特定の機能がメモリ消費が大きいことが分かっている場合、クラッシュ指標を実験プラットフォームであるStatsig上の対応する機能フラグ(Feature Flag)に紐付け、A/Bテストを実施してクラッシュ率への寄与度を測定できます。

また、クラッシュと強く相関し、開発環境で観測しやすいプロキシ指標(Proxy Metrics)を追跡することもできます。その一例が、過大なメッセージペイロードです。当アプリはマルチプロセスアーキテクチャを採用しているため、データはエディタ、拡張機能、エージェント間をインタープロセス通信(Inter-process Communication)チャネルと永続化レイヤーを通じて絶えずやり取りされています。私たちは両方の経路に計測コード(インスツルメンテーション)を仕込み、ある閾値を超えるメッセージを追跡しています。これはメモリ問題と強く相関しており、コールスタック(Call Stack)を付加することで、各メッセージの発生源をアプリケーションコード上で追跡可能にしています。

特定のクラッシュ発生時の状況を再構築するため、並列エージェントの使用、ツール呼び出し、ターミナルなどの機能に対して、ブレッドクラム(Breadcrumbs:エラーに付随する特殊なメタデータログ)を追加しています。これにより、各クラッシュイベントにはその直前の操作履歴が記録として残されます。

ボトムアップ(Bottom-up)

ボトムアップでの調査では、個々のクラッシュイベントをその根本原因まで遡って追跡します。最初のステップは、プロセスが終了した瞬間の状況をキャプチャすることです。メインプロセス内でクラッシュウォッチャサービスを実行しており、これはChrome DevTools Protocol(CDP)を使用してメモリ不足エラーを検出し、リアルタイムでクラッシュスタックをキャプチャします。さらに、Electronの公式リポジトリ(upstream)にパッチを適用し、大掛かりなCDPの仕組みを使わずにこれらのスタックを取得可能にしています。これらのクラッシュスタックは毎日実行される自動化処理にフィードされ、各スタックを詳細に分析し、確度の高い修正が見込まれるものについては最適化を含むPR(Pull Request)を作成し、バージョン跨ぎで問題解決が確認されます。

セッション全体でメモリがどのように蓄積していくかを理解するため、ヒープスナップショット(Heap Snapshots)を参照します。Cursorが過度なメモリを使用していることを検知した場合、ユーザーにスナップショットの取得と送信を促します。これらのスナップショットには開いているエディタやチャットのコンテンツといった機密情報が含まれる可能性があるため、送信は完全にオプトイン(任意同意)制です。ただし、特定のメモリ圧迫の原因となるオブジェクトや保持者(Retainers)まで遡って追跡する上で極めて貴重なデータとなるため、参加を希望してくれるユーザーには感謝しています。

全ユーザーベースにおけるメモリ使用パターンを理解するため、低サンプリングレートで継続的なヒープ割り当てプロファイリング(heap allocation profiling)を実行しています。このデータをアプリバージョンごとに集約し、コールスタック(callstack)ごとのメモリ負荷の内訳を構築します。これにより、アプリセッション全体におけるメモリ負荷の鳥瞰図が得られ、さらにバージョン間の差分を取ることで、新しいアプリバージョンにおける特定の割り当てパスが以前と比較して改善したか悪化したか、そしてその程度を把握することも可能です。

Targeted mitigations

これらの2つの調査手法を通じて、クラッシュは一般的に以下の2つのパターンのいずれかに分類されることを発見しました。

1つ目は急性のOOM(Out of Memory)です。メモリ使用量が急激にスパイクし、プロセスが終了します。これらは通常クラッシュスタック(crash stacks)を通じて検出され、ヒープダンプ(heap dumps)や継続的なプロファイルにはほとんど現れません。非常に一般的な原因として、機能が一括で多すぎるデータをロードする場合が挙げられます。当社のアプリはユーザーのワークスペースの内容を広く扱うため、ディスク上やIPC(Inter-Process Communication)経由でファイルの全内容を頻繁にロードします。一部のユーザーワークスペースにはアプリが処理しきれない巨大なファイルが含まれていることがあり、キルスイッチ(killswitches)の追加や、大容量ブロブ(blobs)の処理を複数のチャンクに分割することが極めて重要でした。

2つ目は緩やかなOOMです。セッション全体を通じてメモリ使用量がじわじわと増加し、最終的にプロセスの制限を超えてしまいます。これは手動で管理された状態が適切に破棄されない場合、または他の方法で残留する強い参照(strong references)を通じてリソースがリークする場合に発生します。これらはヒープダンプで確実に検出され、保持者(retainers)を追跡して長寿命オブジェクトのライフサイクルを整理することで修正できます。すでにいくつかのリーク修正をVSCodeへアップストリーム(upstreamed)しており、さらに追加を検討しています。

拡張機能のクラッシュもメモリ不足によって引き起こされる場合がありますが、これらはプロセス分離(process isolation)を通じて部分的に緩和しています。大まかに言えば、拡張機能を独自の分離されたプロセスで実行させることで、1つの拡張機能でのクラッシュや長時間のタスクが他の拡張機能の機能に影響を与えるのを防ぎます。これはChromeがタブを互いに分離する方法に似ており、その代償としてシステムメモリがわずかに増加します。

Preventing regressions, staying fast

アプリのクラッシュを修正することは、通常、新しいクラッシュを導入しないように防止するよりも容易(straightforward)です。なぜなら修正は対象的だからです。防止には、エージェント(agents)によって得られた開発速度を犠牲にすることなく、安定性への影響についてすべての開発者を認識させる必要があります。つまり、プロセスとツールの両方に投資するということです。

当社のアプローチの一部は以下の通りです:

  • 遭遇したOOMやアプリクラッシュの主要なクラスすべてに対するBugbotルール
  • エージェントによるコンピュータ操作(agentic computer use)を通じてアプリケーションを容易にストレステストできるスキル
  • リークを避けるため、手動で管理されるリソースをガベージコレクション(garbage collection)に置き換えるなど、フットガン(footguns)の排除
  • 変更後のコードごとに実行される従来の自動パフォーマンステスト
  • メトリクス劣化時の自動ロールバックなどの手法による、検出ループの完結

次世代ソフトウェアにおける安定性

エージェント型ソフトウェア開発(Agentic software development)は、新機能のリリースとパフォーマンスの問題やバグの混入をこれまでになく容易にしています。同時に、アプリケーションの安定性(Application stability)を達成するには、ソフトウェアエンジニアリング(Software engineering)の基本原則が依然として必要ですが、それは問題の修正と予防を目的としたエージェント型戦略(Agentic strategies)を通じて、新しい世代へと進化しています。

高品質なソフトウェアの構築は常に困難でしたが、今こそこれまで以上に重要な課題です。もしあなたがこれに情熱を注いでいるなら、ぜひご連絡ください。

原文を表示

Many of our users spend their entire day using Cursor, which means even rare crashes can be extremely disruptive. At the same time, the challenge of keeping the app stable has grown as we've added users and shipped increasingly ambitious features like subagents, instant grep, browser use, and more.

Most of these crashes are caused by the app running out of memory (OOM). Over the past few months, we've implemented systems to give us observability on crashes and memory pressure, high-confidence fixes and optimizations for hot paths, and guardrails to catch regressions before they ship.

Our OOM-per-session rate aggregated across all versions of the Cursor app has fallen 80% since its late-February peak, while OOM-per-request has fallen 73% since March 1. This post details the systems we built to get there.

Detecting and measuring instability

Our desktop app is built on the open-source foundations of Visual Studio Code and Electron, which gives it a multi-process architecture. This means crashes can occur in either the renderer processes which power the editor and the new agents window, or the utility processes which power extensions, storage, and agent functionality.

Renderer crashes are the most severe because they completely prevent the user from using the editor. We've found these are mostly caused by hitting V8 memory limits and are the focus of our most recent efforts. Extension crashes can also disrupt important functionality like language services, but typically recover without disrupting the user as much.

Every fatal crash is reported by our telemetry along with context such as the affected process, type of crash, device and application metadata, and minidumps and stack traces where available.

From these crash events, we've built metrics which we're able to break down by app version, calculating rates on a per-session or per-request basis, with the former roughly capturing how many sessions experience crashes, and the latter how severe the crash problem is for affected sessions. These dashboards update within minutes of crash events, so we're able to track releases of new versions closely and detect potential regressions quickly.

Dual debugging strategies

We take a two-pronged strategy to debugging app crashes and out-of-memory issues.

Top-down

The first is a top-down investigation focused on the most memory intensive features. If a feature is known to be memory-intensive, we can link crash metrics to the corresponding feature flag in Statsig, our experimentation platform, then A/B test it to measure its contribution to crash rates.

We can also track proxy metrics which correlate strongly with crashes and may be easier to observe in development. One such metric is oversize message payloads. Because our app uses a multi-process architecture, data is constantly being passed between the editor, extensions, and agents through inter-process channels and a persistence layer. We instrument both to track messages larger than some threshold, which correlates strongly with memory issues, and attach callstacks so we can trace each one back to its source in our application code.

To reconstruct what happens at the moment of a specific crash, we add breadcrumbs (special metadata logs attached to errors) for features like parallel agent usage, tool calls, and terminals, so that each crash event carries a record of the activity that preceded it.

Bottom-up

In bottom-up investigations we trace individual crash events back to their root cause. The first step is to capture what happened at the moment the process died. We run a crash watcher service in the main process that uses the Chrome DevTools Protocol (CDP) to detect out-of-memory errors and capture crash stacks in real time, and have patched Electron upstream to make it possible to obtain these stacks without the heavyweight CDP machinery. These crash stacks feed an automation which runs daily, analyzing each stack in detail, making PRs with optimizations for stacks with high-confidence fixes, and verifying issue resolution version-over-version.

To understand how memory accumulates over the course of a session, we look at heap snapshots. When we detect that Cursor is using too much memory, we prompt the user to capture and send one. These snapshots can contain sensitive information such as the contents of open editors or chats, so sending them is entirely opt-in. But they're highly valuable for tracing the accumulation of memory pressure back to specific objects and retainers, which makes us appreciative when users choose to participate.

To understand memory usage patterns across the full user base, we run continuous heap allocation profiling at a low sampling rate. We aggregate this data per app version to build a breakdown of memory pressure by callstack. This gives us a bird's-eye view of memory pressure across app sessions, and we can even do diffs between versions to understand whether a given allocation path in a newer app version improved or regressed compared to previous ones, and by how much.

Targeted mitigations

Through these two investigation methods, we've found that crashes generally fit one of two patterns.

The first is acute OOMs, where memory spikes suddenly and the process dies. These are typically found via crash stacks and rarely appear in heap dumps or continuous profiles. One very common cause is when a feature loads too much data at once, which can happen because our app works extensively with the contents of user workspaces, and so often loads full file contents from disk or over IPC. We've seen that some user workspaces can contain massive files that the app chokes on, and it's been critical to add killswitches or to split processing of large blobs into multiple chunks.

The second is slow-and-steady OOMs, where memory creeps up over the course of a session until it pushes the process over the limit. These happen when manually managed state isn't properly disposed of, or when we otherwise leak resources via stray strong references. They show up reliably in heap dumps, and can be fixed by tracking down retainers and cleaning up the lifecycle of long-lived objects. We've upstreamed a few leak fixes to VSCode already and are looking to add more.

Extension crashes can also be caused by running out of memory, which we mitigate in part through process isolation. Roughly speaking, by running extensions in their own isolated processes, we prevent a crash or long task in one extension from affecting the functionality of another. This is similar to how Chrome isolates tabs from each other and comes at the expense of slightly more system memory.

Preventing regressions, staying fast

Fixing app crashes is usually more straightforward than preventing new ones from being introduced, because fixes are targeted. Prevention requires making every developer aware of their impact on stability without sacrificing the velocity we've gained with agents, which means investing in both process and tooling.

Some ways we're approaching this include:

Bugbot rules for every major class of OOM or app crash that we've encountered

Skills that allow us to stress test our application easily through agentic computer use

Eliminating footguns, like replacing manually managed resources with garbage collection to avoid leaks

Traditional automated performance tests that run after every code change

Closing the loop on detection with methods like automated rollbacks on metric regressions

Stability for a new generation of software

Agentic software development makes it easier than ever both to ship new features and to introduce performance issues and bugs. At the same time, achieving application stability requires the same fundamentals of software engineering, but evolved for a new generation, through agentic strategies for fixing and preventing issues.

Building high quality software has always been hard, and now it's more important than ever. If it's something you're passionate about, we'd love to hear from you.

この記事をシェア

関連記事

Windsurf Changelog2026年4月17日 09:00

Windsurf 2.0.61のアップデートとSWE-1.5無料公開

Windsurfはバージョン2.0.61で並列マルチエージェントやGitワークツリー機能を追加した。また、高性能コードモデルSWE-1.5を3ヶ月間無料公開し、標準速度で提供している。

GitHub Blog★32026年5月26日 01:00

GitHub for Beginners:VS Code で Git と GitHub を始める方法

GitHub は、Microsoft が提供する無料のコードエディタ VS Code の機能を活用し、Git や GitHub の基本的な操作を学ぶためのチュートリアルシリーズを開始した。これにより開発者はコンテキストスイッチングを減らし効率的に作業できる。

TLDR AI★42026年5月22日 09:00

Cursor が SpaceX との買収合意前に年間売上高 30 億ドルを達成

開発支援ツール「Cursor」は、4 月末に年間換算で 30 億ドルの収益を記録し、10 万ドル以上の年間契約顧客が 3,000 社を超えた。同社は史上最快成長スタートアップの一つとなり、6 月の上場開始後 30 日以内にスペースX が 600 億ドルで買収する権利を有している。

ニュース一覧に戻る元記事を読む