午前中ダラダラしてたのもあるかもだけど、本業の仕事をいろいろやっているとあっという間に時間がたってしまう。

いまはもう 21 時近いので開発作業は終わろうと思う。

昨日claude-memを入れたので今日は溜まったデータを見つつ公式ドキュメントをちらちら見ていた。

claude-mem は Claude Code のプラグインで、claude code のセッションを裏でローカルの SQLite に記録していて、セッションで得られた学びや注意すべきポイントをいい感じに次のセッションに引き継いでくれる。

昨日作っていた VSCode 拡張のレポジトリで claude code を開くと以下のように表示される。

ほんの一部を抜粋。

investigated - learned - completed - next steps もいい感じにまとまっていて、人間があとで振り返るのにもいいし、claude code 自身が過去のやり取りを踏まえて続きをやってくれるのも良さそう。

このログは Claude Code の起動時に出るほかに、  http://localhost:37777/ でも見ることができる。また、mcp として使うこともできるようだ。

cursor とのインテグレーション機能もある。

体感的にも遅くはなってないのでしばらく使い続けてみようと思う。

   [vscode-ext-rails-reader] recent context, 2026-01-07 8:57pm GMT+9
    ────────────────────────────────────────────────────────────

    Legend: session-request | 🔴 bugfix | 🟣 feature | 🔄 refactor | ✅ change | 🔵 discovery | ⚖️ decision

    Column Key
      Read: Tokens to read this observation (cost to learn it now)
      Work: Tokens spent on work that produced this record ( research, building, deciding)

    Context Index: This semantic index (titles, types, files, tokens) is usually sufficient to understand
    past work.

    When you need implementation details, rationale, or debugging context:
      - Use MCP tools (search, get_observations) to fetch full observations on-demand
      - Critical types ( bugfix, decision) often need detailed fetching
      - Trust this index over re-reading code for past decisions and learnings

    Context Economics
      Loading: 50 observations (21,036 tokens to read)
      Work investment: 836,882 tokens spent on research, building, and decisions
      Your savings: 815,846 tokens (97% reduction from reuse)

    Jan 6, 2026

    General
      #86  9:11 PM  🔵  Extension Successfully Executing Ripgrep Searches in Real Rails Project (~460t) (🔍
    3,474t)
      #87  9:13 PM  🔵  Root Cause Identified: Method Type Misdetection Causes Wrong Search Patterns (~479t)
    (🔍 11,277t)
    Investigated: Code review identified resource leaks from duplicate exit/close event handlers, path
    handling issues with relative vs absolute paths, error propagation problems in Promise.all for
    multi-method searches, and unused CodeLens command arguments. Context lines feature examined for
    improving caller code visibility. Tree view architecture reviewed for hierarchical display of methods and
     callers.

    Learned: Node.js child process emits both exit and close events causing duplicate handler execution if
    both registered - close event alone sufficient. Path.isAbsolute() check required to handle both absolute
    paths from ripgrep and relative paths from user interaction. Promise.allSettled allows partial results
    when some searches fail, better than Promise.all which fails entirely on first error. Ripgrep -B and -A
    flags provide context lines in JSON output for richer code preview. Tree view requires structured data
    provider with parent-child relationships for hierarchical navigation.

    Completed: Git commit 31722de completed with comprehensive fixes and features: duplicate exit/close event
     handlers removed preventing resource leaks, path.isAbsolute() added for robust absolute/relative path
    handling, Promise.allSettled implemented allowing partial results on search failures, unused CodeLens
    arguments removed, ripgrep enhanced with -B 1 -A 1 for context lines, tree view implementation added for
    hierarchical method/caller display, automatic analysis on file open/save events, public method detection
    excluding private methods, support for both class and instance methods, namespace-aware search patterns.
    TypeScript compilation successful, all changes committed to git repository.

    Next Steps: Extension feature-complete with tree view, context lines, automatic analysis, and
    production-validated caller search. Code quality improvements applied addressing resource management,
    error handling, and path processing. Repository ready for potential packaging and distribution to VS Code
     marketplace or internal use. Session transitioning to maintenance/feedback phase.