Menu

1 / 2

Auditing 3,300 Files and 153 Claude Code & Codex Logs: Why 39.0% of Agent Functions Are Written Without Searching the Repo

DEV Community: typescript·Prince Jain·9 days ago
#45sGh2cF
#devtotypescript#devto#dev#file#exports
Reading 0:00
15s threshold

When my first dead-export script ran against a 3,300-file TypeScript/React/Python monorepo, it reported 2,266 dead exports. That number was completely wrong.

I had matched import { symbol } across files, which missed 1,722 symbols referenced via namespace imports ( ns.helper() ), JSX tags ( <Widget /> ), or internal same-file calls, plus 648 framework entrypoint exports ( index.ts , page.tsx , route.ts , sst.config.ts ) and 270 barrel re-exports ( export * from ). And when I hashed every function body to find clones, 4,559 2-line getters and trivial wrappers collided across unrelated files.

After filtering out < 25 normalized-token functions ( CLS008 ), framework entrypoints ( CLS009 ), and separating same-file internal callers ( CLS006 ) from zero-caller orphans ( CLS005 ), I ran the corrected analyzer across all 3,300 files ( 4,544 non-trivial functions) and 153 local Claude Code ( ~/.claude/projects/**/*.jsonl ) and Codex CLI ( ~/.codex/sessions/**/*.jsonl ) transcripts.

What the 3,300-File +…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.