File Size Overall
  • There are 37 files with 8,183 lines of code.
    • 1 very long files (1,113 lines of code)
    • 5 long files (3,319 lines of code)
    • 7 medium size files (2,202 lines of code)
    • 7 small files (1,011 lines of code)
    • 17 very small files (538 lines of code)
13% | 40% | 26% | 12% | 6%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
py13% | 41% | 27% | 10% | 6%
ps10% | 0% | 0% | 100% | 0%
js0% | 0% | 0% | 0% | 100%
yaml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src16% | 49% | 20% | 8% | 5%
scripts0% | 0% | 53% | 32% | 13%
.github0% | 0% | 59% | 33% | 7%
Longest Files (Top 37)
File# lines# units
sessions.py
in src/claude_agent_sdk/_internal
1113 48
types.py
in src/claude_agent_sdk
894 7
subprocess_cli.py
in src/claude_agent_sdk/_internal/transport
731 21
query.py
in src/claude_agent_sdk/_internal
678 20
session_mutations.py
in src/claude_agent_sdk/_internal
508 15
__init__.py
in src/claude_agent_sdk
508 11
build_wheel.py
in scripts
489 21
session_resume.py
in src/claude_agent_sdk/_internal
380 10
message_parser.py
in src/claude_agent_sdk/_internal
340 2
check_workflow_hardening.py
in .github/scripts
300 14
client.py
in src/claude_agent_sdk
239 1
sdk_mcp_bridge.py
in src/claude_agent_sdk/_internal
233 7
session_store_conformance.py
in src/claude_agent_sdk/testing
221 2
download_cli.py
in scripts
200 14
167 -
client.py
in src/claude_agent_sdk/_internal
149 1
session_summary.py
in src/claude_agent_sdk/_internal
142 5
transcript_mirror_batcher.py
in src/claude_agent_sdk/_internal
132 1
session_store.py
in src/claude_agent_sdk/_internal
119 7
102 3
_task_compat.py
in src/claude_agent_sdk/_internal
95 13
session_import.py
in src/claude_agent_sdk/_internal
79 1
_mcp_compat.py
in src/claude_agent_sdk/_internal
66 4
_errors.py
in src/claude_agent_sdk
59 6
38 3
34 1
31 1
session_store_validation.py
in src/claude_agent_sdk/_internal
27 2
24 2
__init__.py
in src/claude_agent_sdk/_internal/transport
23 2
refresh-identity-token.js
in .github/actions/setup-claude-auth
20 1
19 -
query.py
in src/claude_agent_sdk
18 -
__init__.py
in src/claude_agent_sdk/testing
2 -
__init__.py
in src/claude_agent_sdk/_internal
1 -
_version.py
in src/claude_agent_sdk
1 -
_cli_version.py
in src/claude_agent_sdk
1 -
Large Files That Change Often (Top 20)
To change a file, an AI coding agent (or a person) has to read it: these files are read the most for the changes in the past year (lines × changes).
File# lines≈ tokens
to read
# changes
(1y)
≈ lines edited
per change
lines read per
line changed
types.py
in src/claude_agent_sdk
894 ~5k–15k 84 ~30 ~30
subprocess_cli.py
in src/claude_agent_sdk/_internal/transport
731 ~5k–15k 52 ~30 ~20
query.py
in src/claude_agent_sdk/_internal
678 ~3k–10k 41 ~50 ~15
__init__.py
in src/claude_agent_sdk
508 ~3k–10k 43 ~30 ~20
sessions.py
in src/claude_agent_sdk/_internal
1113 ~7k–20k 10 ~200 ~5
message_parser.py
in src/claude_agent_sdk/_internal
340 ~2k–5k 22 ~20 ~20
client.py
in src/claude_agent_sdk
239 ~1.5k–5k 28 ~30 ~10
client.py
in src/claude_agent_sdk/_internal
149 ~1k–3k 19 ~20 ~7
session_mutations.py
in src/claude_agent_sdk/_internal
508 ~3k–10k 5 ~200 ~2
build_wheel.py
in scripts
489 ~3k–7k 4 ~200 ~3
session_resume.py
in src/claude_agent_sdk/_internal
380 ~2k–7k 5 ~150 ~3
download_cli.py
in scripts
200 ~1k–3k 4 ~150 ~2
session_store_conformance.py
in src/claude_agent_sdk/testing
221 ~1.5k–5k 3 ~100 ~2
transcript_mirror_batcher.py
in src/claude_agent_sdk/_internal
132 ~700–2k 4 ~70 ~2
102 ~700–1.5k 3 ~50 ~2
check_workflow_hardening.py
in .github/scripts
300 ~2k–5k 1 ~300 ~1
session_summary.py
in src/claude_agent_sdk/_internal
142 ~700–2k 2 ~100 ~1
_cli_version.py
in src/claude_agent_sdk
1 under 1k 256 ~2 ~0
session_store.py
in src/claude_agent_sdk/_internal
119 ~700–2k 2 ~100 ~1
sdk_mcp_bridge.py
in src/claude_agent_sdk/_internal
233 ~1.5k–5k 1 ~300 ~1

Tokens are lines × 7 to 14 (analysis.fileReadsForChanges). Lines edited per change are the file's lines added and deleted divided by its commits over the whole history. Agents read about 2,000 lines at a time: when a 17,000-line file was split into modules, the tokens an agent read for the same change fell by 83% (The Economic Benefit of Refactoring, 2026).

Files With Most Units (Top 30)
File# lines# units
sessions.py
in src/claude_agent_sdk/_internal
1113 48
build_wheel.py
in scripts
489 21
subprocess_cli.py
in src/claude_agent_sdk/_internal/transport
731 21
query.py
in src/claude_agent_sdk/_internal
678 20
session_mutations.py
in src/claude_agent_sdk/_internal
508 15
download_cli.py
in scripts
200 14
check_workflow_hardening.py
in .github/scripts
300 14
_task_compat.py
in src/claude_agent_sdk/_internal
95 13
__init__.py
in src/claude_agent_sdk
508 11
session_resume.py
in src/claude_agent_sdk/_internal
380 10
sdk_mcp_bridge.py
in src/claude_agent_sdk/_internal
233 7
session_store.py
in src/claude_agent_sdk/_internal
119 7
types.py
in src/claude_agent_sdk
894 7
_errors.py
in src/claude_agent_sdk
59 6
session_summary.py
in src/claude_agent_sdk/_internal
142 5
_mcp_compat.py
in src/claude_agent_sdk/_internal
66 4
102 3
38 3
24 2
__init__.py
in src/claude_agent_sdk/_internal/transport
23 2
message_parser.py
in src/claude_agent_sdk/_internal
340 2
session_store_validation.py
in src/claude_agent_sdk/_internal
27 2
session_store_conformance.py
in src/claude_agent_sdk/testing
221 2
31 1
34 1
refresh-identity-token.js
in .github/actions/setup-claude-auth
20 1
session_import.py
in src/claude_agent_sdk/_internal
79 1
client.py
in src/claude_agent_sdk/_internal
149 1
transcript_mirror_batcher.py
in src/claude_agent_sdk/_internal
132 1
client.py
in src/claude_agent_sdk
239 1
Files With Long Lines (Top 3)

There are 3 files with lines longer than 120 characters. In total, there are 5 long lines.

File# lines# units# long lines
167 - 3
check_workflow_hardening.py
in .github/scripts
300 14 1
query.py
in src/claude_agent_sdk/_internal
678 20 1
Correlations

File Size vs. Commits (all time): 37 points

src/claude_agent_sdk/_cli_version.py x: 256 commits (all time) y: 1 lines of code scripts/check_pypi_quota.py x: 3 commits (all time) y: 102 lines of code .github/egress-firewall.yaml x: 1 commits (all time) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 commits (all time) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 commits (all time) y: 167 lines of code src/claude_agent_sdk/_version.py x: 165 commits (all time) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 20 commits (all time) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 42 commits (all time) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 56 commits (all time) y: 731 lines of code src/claude_agent_sdk/client.py x: 31 commits (all time) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 10 commits (all time) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 3 commits (all time) y: 23 lines of code src/claude_agent_sdk/query.py x: 6 commits (all time) y: 18 lines of code src/claude_agent_sdk/types.py x: 86 commits (all time) y: 894 lines of code scripts/build_wheel.py x: 4 commits (all time) y: 489 lines of code src/claude_agent_sdk/__init__.py x: 44 commits (all time) y: 508 lines of code src/claude_agent_sdk/_internal/_mcp_compat.py x: 1 commits (all time) y: 66 lines of code src/claude_agent_sdk/_internal/_task_compat.py x: 2 commits (all time) y: 95 lines of code src/claude_agent_sdk/_internal/sdk_mcp_bridge.py x: 1 commits (all time) y: 233 lines of code src/claude_agent_sdk/_errors.py x: 2 commits (all time) y: 59 lines of code src/claude_agent_sdk/_internal/session_import.py x: 2 commits (all time) y: 79 lines of code src/claude_agent_sdk/_internal/session_resume.py x: 5 commits (all time) y: 380 lines of code src/claude_agent_sdk/_internal/message_parser.py x: 23 commits (all time) y: 340 lines of code scripts/_cli_version_validation.py x: 1 commits (all time) y: 38 lines of code scripts/download_cli.py x: 4 commits (all time) y: 200 lines of code scripts/update_cli_version.py x: 2 commits (all time) y: 34 lines of code scripts/trust_workspace.py x: 1 commits (all time) y: 24 lines of code src/claude_agent_sdk/testing/session_store_conformance.py x: 3 commits (all time) y: 221 lines of code src/claude_agent_sdk/_internal/transcript_mirror_batcher.py x: 4 commits (all time) y: 132 lines of code src/claude_agent_sdk/_internal/session_summary.py x: 2 commits (all time) y: 142 lines of code src/claude_agent_sdk/_internal/session_store.py x: 2 commits (all time) y: 119 lines of code src/claude_agent_sdk/_internal/session_mutations.py x: 5 commits (all time) y: 508 lines of code src/claude_agent_sdk/_internal/session_store_validation.py x: 1 commits (all time) y: 27 lines of code src/claude_agent_sdk/testing/__init__.py x: 1 commits (all time) y: 2 lines of code scripts/update_version.py x: 4 commits (all time) y: 31 lines of code
1113.0
lines of code
  min: 1.0
  average: 221.16
  25th percentile: 25.5
  median: 119.0
  75th percentile: 320.0
  max: 1113.0
0 256.0
commits (all time)
min: 1.0 | average: 21.54 | 25th percentile: 1.0 | median: 3.0 | 75th percentile: 15.0 | max: 256.0

File Size vs. Contributors (all time): 37 points

src/claude_agent_sdk/_cli_version.py x: 3 contributors (all time) y: 1 lines of code scripts/check_pypi_quota.py x: 1 contributors (all time) y: 102 lines of code .github/egress-firewall.yaml x: 1 contributors (all time) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 contributors (all time) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 contributors (all time) y: 167 lines of code src/claude_agent_sdk/_version.py x: 5 contributors (all time) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 9 contributors (all time) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 17 contributors (all time) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 27 contributors (all time) y: 731 lines of code src/claude_agent_sdk/client.py x: 15 contributors (all time) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 3 contributors (all time) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 3 contributors (all time) y: 23 lines of code src/claude_agent_sdk/query.py x: 5 contributors (all time) y: 18 lines of code src/claude_agent_sdk/types.py x: 32 contributors (all time) y: 894 lines of code scripts/build_wheel.py x: 2 contributors (all time) y: 489 lines of code src/claude_agent_sdk/__init__.py x: 14 contributors (all time) y: 508 lines of code src/claude_agent_sdk/_internal/_mcp_compat.py x: 1 contributors (all time) y: 66 lines of code src/claude_agent_sdk/_internal/_task_compat.py x: 2 contributors (all time) y: 95 lines of code src/claude_agent_sdk/_internal/sdk_mcp_bridge.py x: 1 contributors (all time) y: 233 lines of code src/claude_agent_sdk/_errors.py x: 2 contributors (all time) y: 59 lines of code src/claude_agent_sdk/_internal/session_import.py x: 1 contributors (all time) y: 79 lines of code src/claude_agent_sdk/_internal/session_resume.py x: 3 contributors (all time) y: 380 lines of code src/claude_agent_sdk/_internal/message_parser.py x: 14 contributors (all time) y: 340 lines of code scripts/_cli_version_validation.py x: 1 contributors (all time) y: 38 lines of code scripts/download_cli.py x: 2 contributors (all time) y: 200 lines of code scripts/update_cli_version.py x: 2 contributors (all time) y: 34 lines of code scripts/trust_workspace.py x: 1 contributors (all time) y: 24 lines of code src/claude_agent_sdk/testing/session_store_conformance.py x: 1 contributors (all time) y: 221 lines of code src/claude_agent_sdk/_internal/transcript_mirror_batcher.py x: 3 contributors (all time) y: 132 lines of code src/claude_agent_sdk/_internal/session_summary.py x: 1 contributors (all time) y: 142 lines of code src/claude_agent_sdk/_internal/session_store.py x: 1 contributors (all time) y: 119 lines of code src/claude_agent_sdk/_internal/session_mutations.py x: 1 contributors (all time) y: 508 lines of code src/claude_agent_sdk/_internal/session_store_validation.py x: 1 contributors (all time) y: 27 lines of code src/claude_agent_sdk/testing/__init__.py x: 1 contributors (all time) y: 2 lines of code
1113.0
lines of code
  min: 1.0
  average: 221.16
  25th percentile: 25.5
  median: 119.0
  75th percentile: 320.0
  max: 1113.0
0 32.0
contributors (all time)
min: 1.0 | average: 4.92 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 4.0 | max: 32.0

File Size vs. Commits (30 days): 15 points

src/claude_agent_sdk/_cli_version.py x: 28 commits (30d) y: 1 lines of code scripts/check_pypi_quota.py x: 1 commits (30d) y: 102 lines of code .github/egress-firewall.yaml x: 1 commits (30d) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 commits (30d) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 commits (30d) y: 167 lines of code src/claude_agent_sdk/_version.py x: 11 commits (30d) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 3 commits (30d) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 4 commits (30d) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 3 commits (30d) y: 731 lines of code src/claude_agent_sdk/client.py x: 4 commits (30d) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 1 commits (30d) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 1 commits (30d) y: 23 lines of code src/claude_agent_sdk/types.py x: 3 commits (30d) y: 894 lines of code scripts/build_wheel.py x: 1 commits (30d) y: 489 lines of code
1113.0
lines of code
  min: 1.0
  average: 328.27
  25th percentile: 19.0
  median: 167.0
  75th percentile: 678.0
  max: 1113.0
0 28.0
commits (30d)
min: 1.0 | average: 4.27 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 4.0 | max: 28.0

File Size vs. Contributors (30 days): 15 points

src/claude_agent_sdk/_cli_version.py x: 1 contributors (30d) y: 1 lines of code scripts/check_pypi_quota.py x: 1 contributors (30d) y: 102 lines of code .github/egress-firewall.yaml x: 1 contributors (30d) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 contributors (30d) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 contributors (30d) y: 167 lines of code src/claude_agent_sdk/_version.py x: 2 contributors (30d) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 2 contributors (30d) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 3 contributors (30d) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 2 contributors (30d) y: 731 lines of code src/claude_agent_sdk/client.py x: 3 contributors (30d) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 1 contributors (30d) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 1 contributors (30d) y: 23 lines of code src/claude_agent_sdk/types.py x: 3 contributors (30d) y: 894 lines of code scripts/build_wheel.py x: 1 contributors (30d) y: 489 lines of code
1113.0
lines of code
  min: 1.0
  average: 328.27
  25th percentile: 19.0
  median: 167.0
  75th percentile: 678.0
  max: 1113.0
0 3.0
contributors (30d)
min: 1.0 | average: 1.6 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 3.0

File Size vs. Commits (90 days): 27 points

src/claude_agent_sdk/_cli_version.py x: 78 commits (90d) y: 1 lines of code scripts/check_pypi_quota.py x: 2 commits (90d) y: 102 lines of code .github/egress-firewall.yaml x: 1 commits (90d) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 commits (90d) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 commits (90d) y: 167 lines of code src/claude_agent_sdk/_version.py x: 51 commits (90d) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 5 commits (90d) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 10 commits (90d) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 7 commits (90d) y: 731 lines of code src/claude_agent_sdk/client.py x: 7 commits (90d) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 2 commits (90d) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 1 commits (90d) y: 23 lines of code src/claude_agent_sdk/types.py x: 13 commits (90d) y: 894 lines of code scripts/build_wheel.py x: 2 commits (90d) y: 489 lines of code src/claude_agent_sdk/__init__.py x: 5 commits (90d) y: 508 lines of code src/claude_agent_sdk/_internal/_mcp_compat.py x: 1 commits (90d) y: 66 lines of code src/claude_agent_sdk/_internal/_task_compat.py x: 1 commits (90d) y: 95 lines of code src/claude_agent_sdk/_internal/sdk_mcp_bridge.py x: 1 commits (90d) y: 233 lines of code src/claude_agent_sdk/_errors.py x: 1 commits (90d) y: 59 lines of code src/claude_agent_sdk/_internal/session_import.py x: 1 commits (90d) y: 79 lines of code src/claude_agent_sdk/_internal/session_resume.py x: 2 commits (90d) y: 380 lines of code src/claude_agent_sdk/_internal/message_parser.py x: 3 commits (90d) y: 340 lines of code scripts/_cli_version_validation.py x: 1 commits (90d) y: 38 lines of code scripts/download_cli.py x: 1 commits (90d) y: 200 lines of code scripts/update_cli_version.py x: 1 commits (90d) y: 34 lines of code
1113.0
lines of code
  min: 1.0
  average: 258.52
  25th percentile: 34.0
  median: 149.0
  75th percentile: 380.0
  max: 1113.0
0 78.0
commits (90d)
min: 1.0 | average: 7.44 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 5.0 | max: 78.0

File Size vs. Contributors (90 days): 27 points

src/claude_agent_sdk/_cli_version.py x: 1 contributors (90d) y: 1 lines of code scripts/check_pypi_quota.py x: 1 contributors (90d) y: 102 lines of code .github/egress-firewall.yaml x: 1 contributors (90d) y: 19 lines of code .github/scripts/check_workflow_hardening.py x: 1 contributors (90d) y: 300 lines of code .github/scripts/run-e2e-firewalled-windows.ps1 x: 1 contributors (90d) y: 167 lines of code src/claude_agent_sdk/_version.py x: 2 contributors (90d) y: 1 lines of code src/claude_agent_sdk/_internal/client.py x: 2 contributors (90d) y: 149 lines of code src/claude_agent_sdk/_internal/query.py x: 5 contributors (90d) y: 678 lines of code src/claude_agent_sdk/_internal/transport/subprocess_cli.py x: 3 contributors (90d) y: 731 lines of code src/claude_agent_sdk/client.py x: 4 contributors (90d) y: 239 lines of code src/claude_agent_sdk/_internal/sessions.py x: 2 contributors (90d) y: 1113 lines of code src/claude_agent_sdk/_internal/transport/__init__.py x: 1 contributors (90d) y: 23 lines of code src/claude_agent_sdk/types.py x: 6 contributors (90d) y: 894 lines of code scripts/build_wheel.py x: 1 contributors (90d) y: 489 lines of code src/claude_agent_sdk/__init__.py x: 3 contributors (90d) y: 508 lines of code src/claude_agent_sdk/_internal/_mcp_compat.py x: 1 contributors (90d) y: 66 lines of code src/claude_agent_sdk/_internal/_task_compat.py x: 1 contributors (90d) y: 95 lines of code src/claude_agent_sdk/_internal/sdk_mcp_bridge.py x: 1 contributors (90d) y: 233 lines of code src/claude_agent_sdk/_errors.py x: 1 contributors (90d) y: 59 lines of code src/claude_agent_sdk/_internal/session_import.py x: 1 contributors (90d) y: 79 lines of code src/claude_agent_sdk/_internal/session_resume.py x: 1 contributors (90d) y: 380 lines of code src/claude_agent_sdk/_internal/message_parser.py x: 2 contributors (90d) y: 340 lines of code scripts/_cli_version_validation.py x: 1 contributors (90d) y: 38 lines of code scripts/download_cli.py x: 1 contributors (90d) y: 200 lines of code scripts/update_cli_version.py x: 1 contributors (90d) y: 34 lines of code
1113.0
lines of code
  min: 1.0
  average: 258.52
  25th percentile: 34.0
  median: 149.0
  75th percentile: 380.0
  max: 1113.0
0 6.0
contributors (90d)
min: 1.0 | average: 1.74 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 6.0
About This Analysis
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...