TypeScript: awaited generic calls omit CALLS edges

Author: lichao2014Created Sep 15, 2026Updated Sep 15, 2026
Labelsparsing/quality

Version

codebase-memory-mcp v0.10.8

Platform

Linux x86_64 (reproduces with both fast and full indexing modes)

What happened

TypeScript / TSX awaited calls with explicit generic type arguments do not produce CALLS edges. For example, await parseJsonBody<T>() is omitted, while the equivalent non-generic await parseJsonBody() call is indexed.

This makes inbound call tracing incomplete without any parse error or warning.

Minimal reproduction

Create these two files in an otherwise empty directory.

route-utils.ts

typescript
export async function parseJsonBody<T>() { return {} as T; }
export async function plainLocal() { return await parseJsonBody(); }
export async function genericLocal() { return await parseJsonBody<{ message: string }>(); }

gateway.ts

typescript
import { parseJsonBody } from './route-utils';

type Payload = { message: string };

export async function plainImported() { return await parseJsonBody(); }
export async function genericImported() { return await parseJsonBody<{ message: string }>(); }
export async function genericPrimitive() { return await parseJsonBody<string>(); }
export async function genericNamed() { return await parseJsonBody<Payload>(); }

Index the directory, then call trace_path with:

json
{
  "project": "awaited-generic-repro",
  "function_name": "parseJsonBody",
  "direction": "inbound",
  "depth": 1,
  "format": "json"
}

Actual result

Only these two callers are returned:

  • plainLocal
  • plainImported

Expected result

All six callers should be returned:

  • plainLocal
  • genericLocal
  • plainImported
  • genericImported
  • genericPrimitive
  • genericNamed

The behavior is the same in .tsx files. The generic calls are valid TypeScript, and the generic type argument should not change the callee from parseJsonBody.

Notes

This appears to be an extraction issue around the AST shape of await f<T>(), rather than a resolver issue: the non-generic calls in the same files resolve correctly. Because the corrected extraction changes graph content while source files remain unchanged, an index semantic-version/cache invalidation may also be needed so existing indexes are rebuilt.

Confirmations

  • I searched existing issues and did not find this exact awaited-generic-call case.
  • The reproduction contains only standalone, shareable code.

Source: DeusData/codebase-memory-mcp