Are we tiny?#

gptme is intended to be small and simple, and focus on doing the right thing in the right way, rather than all the things in all the ways.

The benefits of this approach are many:

  • It is easier to understand and maintain.

  • It is easier to contribute to.

  • It is easier to learn.

  • It is easier to extend.

  • It is more fun to work on.

Being aggressive about keeping things small and simple is a way to keep the project maintainable and fun to work on. The fastest way to kill a project is to make it too big and complex, and suffer burnout as a result.

Another major benefit of keeping things small and simple is that it makes it easier for AI to understand and work with the codebase. This is a major goal of the project, and it is important to keep in mind that the simpler the codebase is, the easier it will be for AI to work with it:

“The simpler your API is, the more effectively the AI can harness it when generating code.”

Kenneth Reitz (and many others)

To that end, in this document we will present some statistics about the current state of the project, trying to be mindful to keep an eye on this page and make sure we are not growing too much.

Startup time#

$ make bench-import
make[2]: Entering directory '/home/runner/work/gptme/gptme'
Benchmarking import time for gptme
time poetry run python -X importtime -m gptme --model openai --non-interactive 2>&1 | grep "import time" | cut -d'|' -f 2- | sort -n | tail -n 10
      70898 |                 prompt_toolkit
      72177 |               gptme.util.prompt
      97579 |             gptme.message
     112451 | gptme.cli.main
     124930 |           gptme.tools
     140411 |         gptme.config.cli_setup
     167407 |       gptme.config
     173129 |     gptme.llm
     233815 |   gptme.commands
     272454 | gptme.chat

real	0m1.689s
user	0m1.360s
sys	0m0.181s
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
$ make bench-startup
make[2]: Entering directory '/home/runner/work/gptme/gptme'
Benchmarking startup time for gptme
Benchmark 1: import gptme.cli.main
  Time (mean ± σ):     146.2 ms ±   2.4 ms    [User: 124.3 ms, System: 21.8 ms]
  Range (min … max):   142.2 ms … 149.9 ms    10 runs
 
Benchmark 2: gptme --help
  Time (mean ± σ):     582.2 ms ±  39.5 ms    [User: 515.2 ms, System: 66.8 ms]
  Range (min … max):   553.9 ms … 685.0 ms    10 runs
 
Benchmark 3: full start/exit cycle
  Time (mean ± σ):      1.021 s ±  0.032 s    [User: 0.811 s, System: 0.525 s]
  Range (min … max):    0.983 s …  1.097 s    10 runs
 
Summary
  import gptme.cli.main ran
    3.98 ± 0.28 times faster than gptme --help
    6.98 ± 0.25 times faster than full start/exit cycle
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

Lines of code#

LoC Core#

$ make cloc-core
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/*.py gptme/llm/*.py gptme/util/*.py gptme/tools/base.py gptme/tools/__init__.py gptme/hooks/__init__.py gptme/plugins/__init__.py gptme/lessons/*.py --by-file --hide-rate --quiet | tail -n +2
-----------------------------------------------------------------------------------------------
File                                                        blank        comment           code
-----------------------------------------------------------------------------------------------
gptme/llm/llm_openai.py                                       295            323           1359
gptme/util/gh.py                                              218            245           1162
gptme/llm/llm_anthropic.py                                    217            306            914
gptme/tools/base.py                                           172            241            770
gptme/llm/__init__.py                                         143            258            710
gptme/util/context.py                                         140            207            594
gptme/lessons/installer.py                                    146            165            496
gptme/llm/llm_openai_subscription.py                          112             84            463
gptme/chat.py                                                  74            101            447
gptme/message.py                                              114            155            417
gptme/util/prompt.py                                          102            151            410
gptme/util/_telemetry.py                                      113            159            403
gptme/telemetry.py                                             93             55            394
gptme/workspace_snapshot.py                                    53             64            386
gptme/lessons/index.py                                        117            128            385
gptme/info.py                                                  97             80            363
gptme/llm/openai_responses.py                                  79             20            361
gptme/tools/__init__.py                                        96             84            349
gptme/util/reduce.py                                           79            107            337
gptme/llm/llm_openai_models.py                                  6             43            333
gptme/util/cost_display.py                                     66             69            325
gptme/checkpoint.py                                            79             49            321
gptme/attestation.py                                           69              2            296
gptme/plugins/__init__.py                                      98            133            295
gptme/profiles.py                                              64             68            268
gptme/codeblock.py                                             37            143            247
gptme/anti_slop.py                                             40             62            240
gptme/init.py                                                  48             78            239
gptme/lessons/parser.py                                        74            119            226
gptme/util/auto_naming.py                                      68             78            224
gptme/lessons/hybrid_matcher.py                                87            123            223
gptme/lessons/commands.py                                      91             48            219
gptme/util/_sound_sounddevice.py                               57             50            218
gptme/lessons/auto_include.py                                  71             94            203
gptme/util/sound.py                                            65             72            200
gptme/hooks/__init__.py                                        20             42            197
gptme/util/safety.py                                           40             33            181
gptme/llm/validate.py                                          30             29            174
gptme/circuit_breaker.py                                       49             72            171
gptme/util/git_worktree.py                                     40             67            169
gptme/llm/llm_gptme.py                                         64            112            164
gptme/llm/utils.py                                             56             84            159
gptme/util/tokens.py                                           46             69            159
gptme/llm/llm_openai_models_deprecated.py                       5             14            157
gptme/util/__init__.py                                         34             29            157
gptme/util/tool_format.py                                      48             75            151
gptme/util/clipboard.py                                        22             12            147
gptme/util/replay.py                                           42             49            129
gptme/util/cost_tracker.py                                     46             69            114
gptme/util/export.py                                           26             29            111
gptme/dirs.py                                                  46             35            108
gptme/lessons/matcher.py                                       35             47            103
gptme/util/ask_execute.py                                      25             40             89
gptme/util/tree.py                                             21             15             87
gptme/__version__.py                                           18              5             83
gptme/util/context_savings.py                                  20              6             77
gptme/gears.py                                                 16              4             76
gptme/prompt_queue.py                                          30              5             73
gptme/util/output_storage.py                                   29             37             71
gptme/llm/llm_anthropic_models_deprecated.py                    5             11             70
gptme/session.py                                               39             64             70
gptme/util/generate_name.py                                     5              6             69
gptme/util/master_context.py                                   28             38             66
gptme/util/_sound_cmd.py                                       22             17             62
gptme/util/uri.py                                              29             42             59
gptme/util/cost.py                                             20             21             55
gptme/credentials.py                                           16              7             53
gptme/util/context_dedup.py                                    41             93             53
gptme/util/terminal.py                                         28             23             53
gptme/llm/provider_plugins.py                                  39             35             48
gptme/llm/llm_mock.py                                          16             22             41
gptme/util/file_storage.py                                     30             47             40
gptme/util/keyword_matching.py                                 35             66             39
gptme/util/content.py                                          18             24             30
gptme/util/install.py                                          13             25             30
gptme/__init__.py                                               8              3             27
gptme/constants.py                                             19             25             27
gptme/util/useredit.py                                         11             13             26
gptme/executor.py                                              18             26             24
gptme/util/interrupt.py                                        13             15             23
gptme/util/conversation_ids.py                                  7              4             22
gptme/lessons/__init__.py                                       7             15             18
gptme/util/git_cmd.py                                           7             14             17
gptme/__main__.py                                               2              0             12
gptme/util/stdio.py                                             8              9             12
gptme/llm/constants.py                                          2              6              5
-----------------------------------------------------------------------------------------------
SUM:                                                         4774           5814          18955
-----------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC LLM#

$ make cloc-llm
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/llm/*.py --by-file --hide-rate --quiet | tail -n +2
-----------------------------------------------------------------------------------------------
File                                                        blank        comment           code
-----------------------------------------------------------------------------------------------
gptme/llm/llm_openai.py                                       295            323           1359
gptme/llm/llm_anthropic.py                                    217            306            914
gptme/llm/__init__.py                                         143            258            710
gptme/llm/llm_openai_subscription.py                          112             84            463
gptme/llm/openai_responses.py                                  79             20            361
gptme/llm/llm_openai_models.py                                  6             43            333
gptme/llm/validate.py                                          30             29            174
gptme/llm/llm_gptme.py                                         64            112            164
gptme/llm/utils.py                                             56             84            159
gptme/llm/llm_openai_models_deprecated.py                       5             14            157
gptme/llm/llm_anthropic_models_deprecated.py                    5             11             70
gptme/llm/provider_plugins.py                                  39             35             48
gptme/llm/llm_mock.py                                          16             22             41
gptme/llm/constants.py                                          2              6              5
-----------------------------------------------------------------------------------------------
SUM:                                                         1069           1347           4958
-----------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC Tools#

$ make cloc-tools
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/tools/*.py gptme/hooks/*.py gptme/plugins/*.py --by-file --hide-rate --quiet | tail -n +2
------------------------------------------------------------------------------------------
File                                                   blank        comment           code
------------------------------------------------------------------------------------------
gptme/tools/computer.py                                  432            864           1659
gptme/tools/shell.py                                     269            342           1431
gptme/hooks/workspace_agents.py                          238            149           1254
gptme/tools/base.py                                      172            241            770
gptme/tools/chats.py                                     135            167            706
gptme/tools/_browser_playwright.py                       235            276            661
gptme/tools/browser.py                                   258            407            660
gptme/tools/mcp_adapter.py                               227            219            648
gptme/tools/gh.py                                        117            128            523
gptme/tools/computer_transport.py                        134             99            512
gptme/hooks/registry.py                                  102             82            502
gptme/tools/tmux.py                                       98            170            398
gptme/tools/__init__.py                                   96             84            349
gptme/tools/mcp.py                                       102            103            337
gptme/tools/complete.py                                   87            108            329
gptme/plugins/__init__.py                                 98            133            295
gptme/tools/python.py                                     85             99            293
gptme/tools/lessons.py                                   106            115            278
gptme/tools/save.py                                       63             63            276
gptme/tools/shell_validation.py                           88            121            273
gptme/tools/patch.py                                      63             95            271
gptme/tools/shell_background.py                           65             36            270
gptme/tools/_browser_thread.py                            49             52            253
gptme/tools/rag.py                                        89            131            245
gptme/tools/patch_many.py                                 56             62            243
gptme/tools/read.py                                       48             49            234
gptme/tools/todo.py                                       95            104            232
gptme/tools/precommit.py                                  70             96            230
gptme/hooks/aw_watcher_agent.py                           49             21            217
gptme/hooks/elicitation.py                                90            132            213
gptme/hooks/cost_awareness.py                             65             73            205
gptme/hooks/auto_snapshots.py                             51             66            201
gptme/hooks/__init__.py                                   20             42            197
gptme/tools/pruner.py                                     44              0            188
gptme/tools/morph.py                                      43             49            185
gptme/tools/patch_anchored.py                             54             79            172
gptme/hooks/cache_awareness.py                           118            186            168
gptme/hooks/types.py                                      96            136            163
gptme/hooks/cli_confirm.py                                50             54            152
gptme/tools/restart.py                                    53             83            150
gptme/hooks/token_awareness.py                            47             46            146
gptme/tools/form.py                                       42             64            145
gptme/hooks/agents_md_inject.py                           36             63            137
gptme/hooks/tool_target_instructions.py                   37             47            135
gptme/tools/elicit.py                                     39            121            135
gptme/hooks/injection_screening.py                        31             34            130
gptme/hooks/form_autodetect.py                            48             65            123
gptme/hooks/server_confirm.py                             51             58            122
gptme/plugins/registry.py                                 40             35            116
gptme/hooks/server_elicit.py                              52             56            113
gptme/hooks/confirm.py                                    53             88            109
gptme/tools/choice.py                                     34             41            104
gptme/hooks/active_context.py                             25             23            100
gptme/tools/_anchored.py                                  33             41            100
gptme/tools/_computer_gate.py                             33             61            100
gptme/tools/screenshot.py                                 29             40             95
gptme/tools/vent.py                                       39             64             93
gptme/hooks/time_awareness.py                             32             29             86
gptme/tools/autocommit.py                                 37             58             81
gptme/tools/progress.py                                   23             53             73
gptme/tools/vision.py                                     28             21             73
gptme/plugins/entrypoints.py                              24             35             69
gptme/tools/_browser_lynx.py                              12             12             60
gptme/tools/_browser_perplexity.py                        22             16             60
gptme/tools/clarify.py                                    17             26             57
gptme/hooks/cwd_changed.py                                18             11             54
gptme/hooks/mcp_namespace_hint.py                         21             24             54
gptme/hooks/markdown_validation.py                        36             41             51
gptme/hooks/test.py                                       14              6             41
gptme/hooks/cwd_awareness.py                              11             17             28
gptme/tools/_allowlist.py                                 11              7             27
gptme/hooks/auto_confirm.py                               11              9             24
gptme/plugins/plugin.py                                   25             39             17
gptme/tools/_browser_format.py                             3              5              3
------------------------------------------------------------------------------------------
SUM:                                                    5424           6872          19204
------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC Server#

$ make cloc-server
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/server --by-file --hide-rate --quiet | tail -n +2
--------------------------------------------------------------------------------------
File                                               blank        comment           code
--------------------------------------------------------------------------------------
gptme/server/api_v2.py                               445            354           2572
gptme/server/api_v2_sessions.py                      121            152            798
gptme/server/session_step.py                         164            222            775
gptme/server/openapi_docs.py                         253            168            747
gptme/server/tasks_api.py                            190            125            665
gptme/server/a2a_api.py                              103             42            543
gptme/server/artifacts_api.py                        107            109            531
gptme/server/static/main.js                           51             69            498
gptme/server/workspace_api.py                         99             94            468
gptme/server/external_sessions.py                     47             52            293
gptme/server/cli.py                                   47             60            252
gptme/server/tools_api.py                             58             49            245
gptme/server/static/computer.html                     12              3            237
gptme/server/panels_api.py                            51             51            203
gptme/server/session_models.py                        57             69            202
gptme/server/static/index.html                        11             18            201
gptme/server/acp_session_runtime.py                   34             30            165
gptme/server/computer_api.py                          44             51            164
gptme/server/auth.py                                  57             80            160
gptme/server/api_v2_common.py                         83             63            153
gptme/server/client.py                                63             79            149
gptme/server/static/style.css                         27              4            143
gptme/server/api_v2_agents.py                         25             17            132
gptme/server/app.py                                   34             78            130
gptme/server/skills_api.py                            32              4            125
gptme/server/metrics.py                               36             19            117
gptme/server/tts_api.py                               24             18             90
gptme/server/constants.py                              7             11              9
gptme/server/__init__.py                               2              3              3
gptme/server/__main__.py                               1              0              3
--------------------------------------------------------------------------------------
SUM:                                                2285           2094          10773
--------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC Tests#

$ make cloc-tests
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc tests --by-file --hide-rate --quiet | tail -n +2
----------------------------------------------------------------------------------------------------
File                                                             blank        comment           code
----------------------------------------------------------------------------------------------------
tests/test_subagent_unit.py                                       1183            489           4282
tests/test_server_v2.py                                            648            245           2753
tests/test_tools_subagent.py                                       842            415           2728
tests/test_llm_openai.py                                           525            289           2111
tests/test_init.py                                                 249            141           1533
tests/test_eval_behavioral.py                                      865            961           1354
tests/test_tools_computer.py                                       438            269           1258
tests/test_cli.py                                                  338            135           1243
tests/test_tools_shell.py                                          374            415           1167
tests/test_config.py                                               339            412           1098
tests/test_acp_agent.py                                            324            184           1090
tests/test_server.py                                               292            201           1080
tests/test_util_gh.py                                              232            125           1060
tests/test_server_v2_sessions.py                                   159            121            997
tests/test_doctor.py                                               247            127            931
tests/test_tools_base.py                                           309            107            929
tests/test_llm_utils.py                                            255            127            886
tests/test_eval_leaderboard.py                                     126            104            883
tests/test_info.py                                                 167             73            878
tests/test_computer_audit.py                                       231            157            846
tests/test_util_cli.py                                             226            151            832
tests/test_eval_computer_suite.py                                  328            149            819
tests/test_tasks_api.py                                            180             65            812
tests/test_util_gh_mocked.py                                       149            119            777
tests/test_tools_browser.py                                        263             63            773
tests/test_server_workspace.py                                     142            141            722
tests/test_eval.py                                                 131             84            709
tests/test_agent.py                                                205            112            701
tests/test_acp_session_runtime.py                                  222             76            699
tests/test_hooks_registry.py                                       247             89            696
tests/test_tools_gh.py                                             134             69            675
tests/test_prompt_templates.py                                     229            148            659
tests/test_reduce.py                                               179            123            652
tests/test_llm_models_resolution.py                                216            171            639
tests/test_subagent_budget.py                                      166            144            626
tests/test_json_output.py                                          110             83            623
tests/test_llm_anthropic.py                                        131             45            618
tests/test_computer_doctor_cmd.py                                   88             58            607
tests/test_tools_complete.py                                       131            149            594
tests/test_cost_display.py                                          81             58            593
tests/test_tools_lessons.py                                        135             49            580
tests/test_tools_precommit.py                                      109             86            578
tests/test_auto_compact.py                                         235            201            566
tests/test_computer_transport.py                                   209             79            556
tests/test_server_panels.py                                         61             30            551
tests/test_eval_subagent.py                                        119             56            547
tests/test_computer_actions.py                                     165            125            546
tests/test_server_path_traversal.py                                139            105            539
tests/test_server_bad_input.py                                     121            101            518
tests/test_lessons.py                                              156            153            517
tests/test_hooks_cost_awareness.py                                  72             61            516
tests/test_hooks_cache_awareness.py                                151             44            484
tests/test_computer_demo_cmd.py                                    144             74            480
tests/test_llm_auth.py                                             169             56            476
tests/test_snapshot_command.py                                     117             57            476
tests/test_chat.py                                                 196            170            469
tests/test_server_session_models.py                                158            140            466
tests/test_commands.py                                             147             68            463
tests/test_gptme_provider.py                                       157             70            459
tests/test_skill_installer.py                                      138            154            459
tests/test_mcp_server.py                                           112             39            457
tests/test_tools_shell_background.py                               117             51            456
tests/test_tools_browser_thread.py                                 113             51            426
tests/test_lessons_commands.py                                     157             82            422
tests/test_dirs.py                                                  97             69            421
tests/test_lessons_index.py                                        137            116            419
tests/context/test_task_analyzer.py                                 90             44            418
tests/test_util_cli_mcp.py                                          98             50            418
tests/test_lessons_parser.py                                       188            239            417
tests/conftest.py                                                  108            157            415
tests/test_server_artifacts.py                                      66             32            415
tests/test_subagent_worktree_isolation.py                          129             70            414
tests/test_prompts.py                                              124             77            409
tests/test_tools.py                                                164             98            407
tests/test_codeblock.py                                            302            776            402
tests/test_tools_shell_validation.py                               161             63            399
tests/test_message.py                                              139            120            398
tests/test_tools_mcp.py                                            102             20            398
tests/test_hybrid_lessons.py                                       100             58            395
tests/test_profiles.py                                              88             37            395
tests/test_computer_latency_cmd.py                                  93             42            393
tests/test_unified_plugins.py                                      102             42            376
tests/test_github_ci_self_heal.py                                   71              6            371
tests/test_workspace_api.py                                        103             19            369
tests/test_computer_record.py                                      119             30            364
tests/test_eval_behavioral_solutions.py                            281            848            364
tests/test_mcp_discovery.py                                        107             41            356
tests/test_lessons_matcher.py                                       99             86            352
tests/test_computer_use_integration.py                             140            143            349
tests/test_util_hooks.py                                            85             93            347
tests/test_tools_patch_many.py                                      91            101            345
tests/test_shell_background.py                                      99             71            342
tests/test_tui_e2e.py                                               62             72            338
tests/test_provider_plugins.py                                      90             32            337
tests/test_eval_trends.py                                           35             22            335
tests/test_llm_openai_subscription.py                               76             28            334
tests/test_mcp_adapter.py                                          113             59            334
tests/test_workspace_agents.py                                     145             57            329
tests/test_circuit_breaker.py                                       98             69            322
tests/test_util_tool_format.py                                      78             32            322
tests/test_workspace_snapshot.py                                   105             46            319
tests/test_agent_doctor.py                                          72             34            318
tests/test_replay.py                                               101             64            318
tests/test_tools_morph.py                                           89             66            310
tests/test_chats_external_search.py                                 72             55            307
tests/test_tools_rag.py                                             95             37            301
tests/context/test_adaptive_compressor.py                           58             44            298
tests/test_context.py                                              131             80            298
tests/test_llm_models.py                                           107             79            297
tests/test_external_sessions.py                                     80             49            296
tests/test_eval_swebench.py                                         78             41            294
tests/test_conversations.py                                         45             32            293
tests/test_plugins.py                                              110             85            292
tests/test_util_cli_batch.py                                        59              8            292
tests/test_chats_stats.py                                           72             30            291
tests/test_eventlog.py                                              70             34            289
tests/test_execenv.py                                               76             54            288
tests/lessons/test_wildcard_matching.py                            114            125            287
tests/test_lessons_auto_include.py                                  77             50            287
tests/test_complete.py                                              66             58            286
tests/test_server_a2a.py                                            64             20            283
tests/test_hooks_server_confirm.py                                  78             31            282
tests/test_tools_patch_anchored.py                                  65             26            278
tests/test_logmanager.py                                            79             74            275
tests/test_computer_video_frames_cli.py                             67             12            274
tests/test_tools_restart.py                                         72             49            274
tests/test_util_tokens.py                                          129             71            273
tests/test_server_v2_agents.py                                      57             25            272
tests/test_computer_docker_config.py                                59             92            267
tests/test_browser.py                                              115             58            266
tests/test_util_cli_attest.py                                       67              1            266
tests/test_tools_autocommit.py                                      99             47            259
tests/test_server_v2_auto_stepping.py                               56             50            258
tests/test_terminal_startup_latency.py                              77             32            257
tests/test_hooks.py                                                120             47            255
tests/test_tool_use.py                                              60             66            255
tests/test_context_selector.py                                      83             45            254
tests/test_eval_claude_code.py                                      66             27            253
tests/test_lessons_integration.py                                   97             66            252
tests/test_util_cli_providers.py                                    60             27            250
tests/test_prompt_tools.py                                          57             30            249
tests/test_agents_md_inject.py                                      43             37            241
tests/test_ephemeral.py                                             70             35            240
tests/test_cli_from_turn.py                                         65             18            239
tests/test_mcp.py                                                   68             59            239
tests/test_auto_naming.py                                           69             45            237
tests/test_computer_x11_integration.py                              87             87            236
tests/test_tools_read.py                                            76             29            232
tests/test_tools__anchored.py                                       46             30            230
tests/test_computer_settle.py                                       90             78            228
tests/test_hooks_cwd_changed.py                                     55             24            227
tests/test_chats_json.py                                            32             17            225
tests/test_git_worktree.py                                          57             37            222
tests/test_util_keyword_matching.py                                 75             46            218
tests/test_lessons_tool.py                                          62             34            216
tests/test_subagent_roundtrip.py                                    70             51            216
tests/test_tools_python.py                                          90             60            216
tests/test_cli_resume.py                                            64             15            212
tests/test_checkpoint.py                                            88             20            211
tests/test_server_fresh_bad_input.py                                43             38            211
tests/test_autocompact_scoring.py                                   86             39            208
tests/test_server_v2_hooks.py                                       80             60            207
tests/test_executor.py                                              50             31            206
tests/test_oauth_openrouter.py                                      62              9            205
tests/test_tools_screenshot.py                                      55             48            203
tests/test_util_file_storage.py                                     51             36            203
tests/test_tools_save.py                                            57             36            193
tests/test_chats_clean.py                                           46             18            191
tests/test_computer_task.py                                        116             31            189
tests/test_telemetry.py                                             68             31            189
tests/test_computer_screenshot_cli.py                               53             12            183
tests/test_dspy_hybrid.py                                           65             45            179
tests/test_tools_tmux.py                                            77             65            179
tests/test_dspy_basic.py                                            66             44            177
tests/test_server_tools_query.py                                    51             28            176
tests/test_cost_tracker.py                                          26             26            175
tests/test_tools_todo.py                                            81             65            173
tests/test_chats_export.py                                          48             17            172
tests/test_util_cli_generate.py                                     35              7            172
tests/test_acp_types.py                                             35             12            171
tests/test_tools_patch.py                                           91            214            171
tests/test_util_cli_models.py                                       23             25            170
tests/test_tree.py                                                  61             37            168
tests/test_util_terminal.py                                         52             34            168
tests/test_tools_elicit.py                                          50             25            167
tests/test_util_cli_skills.py                                       63             42            165
tests/test_computer_api.py                                          70            189            163
tests/test_tools_time_awareness.py                                  52             34            163
tests/test_util_cost.py                                             29             26            163
tests/test_acp_protocol_logging.py                                  56             15            160
tests/test_acp_client.py                                            64             34            159
tests/test_acp_stdout.py                                            76             37            158
tests/test_anti_slop.py                                             67             24            158
tests/test_server_default_profile.py                                65             39            158
tests/test_uri.py                                                   55             30            158
tests/test_backtrack.py                                             39             11            157
tests/test_commands_account.py                                      37              6            156
tests/test_eval_pass_rate_gate.py                                   48              9            154
tests/test_shell_allowlist_autoconfirm.py                           38             38            154
tests/test_subagent_integration.py                                  48             21            152
tests/test_util_tree.py                                             44             33            151
tests/test_server_api_v2_common.py                                  46             46            150
tests/test_browser_state.py                                         75             31            148
tests/test_util_install.py                                          34             31            148
tests/test_master_context.py                                        39             24            147
tests/test_util_safety.py                                           44             12            147
tests/test_file_selector_integration.py                             50             23            145
tests/test_vent.py                                                  32             10            145
tests/test_subagent_concurrency.py                                  37             16            144
tests/test_search_alias.py                                          32             25            142
tests/test_dspy_integration.py                                      54             32            139
tests/test_tools_token_awareness.py                                 59             47            139
tests/test_computer_milestone_integration.py                        61             59            138
tests/test_tools_vision.py                                          36             31            138
tests/test_server_elicitation.py                                    47             17            137
tests/test_util_content.py                                          49             25            137
tests/test_llm_openai_sampling.py                                   29              0            136
tests/test_chat_config.py                                           53             44            135
tests/test_server_v2_tool_confirmation.py                           33             33            135
tests/test_computer_gate.py                                         76             40            133
tests/test_server_config_workspace_containment.py                   40             43            133
tests/test_agent_workspace_timeouts.py                              41             22            129
tests/test_snapshot_list.py                                         45              7            129
tests/test_tui.py                                                   25             12            129
tests/test_acp_adapter.py                                           42             33            128
tests/test_cwe214_docker_env_leak.py                                42             41            128
tests/test_active_context.py                                        41             22            126
tests/test_util_context_dedup.py                                    61             43            125
tests/test_treeofthoughts.py                                        34             23            124
tests/test_computer_risk_streaming.py                               54             44            123
tests/test_prompt.py                                                36             36            123
tests/test_server_webui_dir.py                                      59             21            121
tests/test_subagent_planner_roles.py                                39             30            121
tests/test_util_interrupt.py                                        48             38            121
tests/test_integration_phase4.py                                    22             19            119
tests/test_cost_cache_cold_warning.py                               33              8            118
tests/test_util_clipboard_paste.py                                  27             14            117
tests/test_agent_service_timeouts.py                                19             18            116
tests/test_llm_validate.py                                          26             20            116
tests/test_cli_status.py                                            31             16            115
tests/test_misc_subprocess_timeouts.py                              43             27            114
tests/test_lessons_status.py                                        67             96            113
tests/test_chats_rename.py                                          42             16            112
tests/test_computer_run_task_cli.py                                 40             14            109
tests/test_cost_awareness_delayed_warning.py                        42             32            108
tests/test_tools_chats.py                                           26             19            107
tests/test_browser_session_persistence.py                           62             33            103
tests/test_tools_choice.py                                          51             26            103
tests/test_util_output_storage.py                                   23             13            103
tests/test_command_completion.py                                    33             23            100
tests/test_hooks_mcp_namespace_hint.py                              30             14            100
tests/test_session.py                                               40             21             95
tests/test_server_etag.py                                           22              5             91
tests/test_agent_memory.py                                          26             17             90
tests/test_browser_lynx.py                                          35             15             90
tests/test_swebench_utils.py                                        27              2             89
tests/test_commands_rag.py                                          16              2             88
tests/test_server_cors.py                                           33             20             88
tests/test_browser_github_routing.py                                27              0             86
tests/test_util.py                                                  42             85             85
tests/test_output_format.py                                         29             21             84
tests/test_server_auth.py                                           40             19             84
tests/test_eval_swebench_retrieval.py                               25              4             81
tests/test_prompt_skills_summary.py                                 44             44             80
tests/test_onboard.py                                               17             17             79
tests/test_eval_timeouts.py                                         32             33             77
tests/test_server_perf.py                                           22             21             77
tests/test_cli_llm_generate.py                                      17             10             75
tests/test_markdown_validation.py                                   43             34             75
tests/test_shell_issue729.py                                        50             52             75
tests/test_custom_providers.py                                      32             44             74
tests/test_shell_issue772.py                                        48             47             73
tests/test_server_audio_transcription.py                            20             15             69
tests/test_hooks_form_autodetect.py                                 22             34             68
tests/test_tools_form.py                                            22             19             67
tests/test_util_context_savings.py                                  12              0             66
tests/test_eval_tool_efficiency.py                                  20             11             64
tests/test_llm_mock.py                                              22             12             60
tests/test_shell_output_mixing_issue408.py                          25             29             60
tests/test_eval_practical20.py                                      27              8             59
tests/test_git_cmd_resolver.py                                      23             15             59
tests/test_server_client.py                                         33             26             59
tests/test_server_metrics.py                                        20             20             59
tests/test_webui_redirects.py                                       11              7             57
tests/test_chat_history.py                                          14             12             56
tests/test_computer_artifacts.py                                    14              3             54
tests/test_server_skills_api.py                                     13              1             54
tests/test_eval_practical17.py                                      33              3             53
tests/test_eval_practical18.py                                      23              4             53
tests/test_eval_practical19.py                                      23              6             53
tests/test_server_tts_api.py                                        21              0             53
tests/test_github_bot.py                                            12              1             51
tests/test_server_parent_death_watcher.py                           16             14             50
tests/test_server_v2_sse.py                                         15             13             50
tests/test_execute_msg_defensive.py                                 19             19             49
tests/test_dspy_gepa.py                                             18              9             46
tests/test_demo_capture.py                                          19              9             45
tests/test_util_generate_name.py                                    17             10             45
tests/test-integration.sh                                           22             36             43
tests/test_pdf_to_images.py                                         13             13             43
tests/test_server_cli_fallback.py                                   16             12             42
tests/test_xml_format.py                                            19             68             41
tests/test_shell_fd_leak.py                                         23             16             39
tests/test_utils.py                                                 14             17             38
tests/test_gears.py                                                 18              0             36
tests/test_util_export.py                                           20             11             36
tests/test_message_command.py                                       13             12             35
tests/test_tools_pruner.py                                           9              0             35
tests/test_cli_confirm_hook.py                                      24             20             34
tests/test_commands_llm.py                                           7              0             34
tests/test_credentials.py                                           16              0             34
tests/test_shell_for_loop_issue724.py                               16             24             33
tests/test_package_exports.py                                       10              3             29
tests/test_eval_practical16.py                                      11              0             28
tests/data/git-log-oneline.txt                                       0              0             27
tests/test_quota_skip.py                                             5              3             26
tests/data/example-patch-codeblock.txt                               4              0             25
tests/data/gh-issue-list.txt                                         0              0             25
tests/data/example-interrupted.txt                                   8              0             24
tests/test_tool_loading_duplicate.py                                16             15             24
tests/test_credentials_integration.py                                8              0             22
tests/test_setup_completions.py                                      9              6             22
tests/test_server_cli_tools.py                                      12              4             19
tests/test_tools_shell_multiline.py                                  7             19             19
tests/test_browser_format.py                                         8              6             18
tests/test_screenshot.py                                             9              6             15
----------------------------------------------------------------------------------------------------
SUM:                                                             29796          19998         101749
----------------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC Eval#

$ make cloc-eval
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/eval/**.py --by-file --hide-rate --quiet | tail -n +2
------------------------------------------------------------------------------------------
File                                        blank        comment           code
------------------------------------------------------------------------------------------
gptme/eval/main.py                            107            112            915
gptme/eval/leaderboard.py                     149            485            804
gptme/eval/run.py                              74             96            549
gptme/eval/execenv.py                          85            146            514
gptme/eval/trends.py                           59             31            317
gptme/eval/types.py                            31             53             97
gptme/eval/pass_rate_gate.py                   23             44             75
gptme/eval/filestore.py                        11              8             63
gptme/eval/cost.py                             18             25             40
gptme/eval/__init__.py                          2              2              4
gptme/eval/__main__.py                          1              0              3
------------------------------------------------------------------------------------------
SUM:                                          560           1002           3381
------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

LoC Total#

$ make cloc-total
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/circuit_breaker.py gptme/gears.py gptme/init.py gptme/executor.py gptme/lessons/parser.py gptme/lessons/skills/python-repl/python_helpers.py gptme/lessons/commands.py gptme/lessons/matcher.py gptme/lessons/installer.py gptme/lessons/index.py gptme/lessons/auto_include.py gptme/lessons/hybrid_matcher.py gptme/lessons/__init__.py gptme/mcp/client.py gptme/mcp/server.py gptme/mcp/registry.py gptme/mcp/__init__.py gptme/attestation.py gptme/profiles.py gptme/plugins/entrypoints.py gptme/plugins/plugin.py gptme/plugins/registry.py gptme/plugins/__init__.py gptme/tools/pruner.py gptme/tools/base.py gptme/tools/_browser_perplexity.py gptme/tools/shell_background.py gptme/tools/clarify.py gptme/tools/vision.py gptme/tools/read.py gptme/tools/browser.py gptme/tools/precommit.py gptme/tools/python.py gptme/tools/_anchored.py gptme/tools/patch_anchored.py gptme/tools/patch_many.py gptme/tools/_browser_lynx.py gptme/tools/choice.py gptme/tools/shell_validation.py gptme/tools/lessons.py gptme/tools/computer.py gptme/tools/mcp_adapter.py gptme/tools/screenshot.py gptme/tools/autocommit.py gptme/tools/complete.py gptme/tools/subagent/context.py gptme/tools/subagent/api.py gptme/tools/subagent/execution.py gptme/tools/subagent/types.py gptme/tools/subagent/control.py gptme/tools/subagent/hooks.py gptme/tools/subagent/concurrency.py gptme/tools/subagent/batch.py gptme/tools/subagent/__init__.py gptme/tools/chats.py gptme/tools/tmux.py gptme/tools/vent.py gptme/tools/mcp.py gptme/tools/autocompact/decision.py gptme/tools/autocompact/resume.py gptme/tools/autocompact/hook.py gptme/tools/autocompact/engine.py gptme/tools/autocompact/scoring.py gptme/tools/autocompact/handlers.py gptme/tools/autocompact/__init__.py gptme/tools/_browser_format.py gptme/tools/save.py gptme/tools/gh.py gptme/tools/computer_transport.py gptme/tools/rag.py gptme/tools/_browser_thread.py gptme/tools/shell.py gptme/tools/todo.py gptme/tools/elicit.py gptme/tools/restart.py gptme/tools/morph.py gptme/tools/progress.py gptme/tools/patch.py gptme/tools/_browser_playwright.py gptme/tools/form.py gptme/tools/_computer_gate.py gptme/tools/_allowlist.py gptme/tools/__init__.py gptme/codeblock.py gptme/constants.py gptme/config/user.py gptme/config/project.py gptme/config/core.py gptme/config/cli_setup.py gptme/config/chat.py gptme/config/models.py gptme/config/__init__.py gptme/anti_slop.py gptme/context/task_analyzer.py gptme/context/compress.py gptme/context/config.py gptme/context/selector/base.py gptme/context/selector/file_integration.py gptme/context/selector/config.py gptme/context/selector/rule_based.py gptme/context/selector/file_config.py gptme/context/selector/llm_based.py gptme/context/selector/file_selector.py gptme/context/selector/hybrid.py gptme/context/selector/__init__.py gptme/context/adaptive_compressor.py gptme/context/__init__.py gptme/llm/llm_mock.py gptme/llm/openai_responses.py gptme/llm/models/data.py gptme/llm/models/types.py gptme/llm/models/listing.py gptme/llm/models/resolution.py gptme/llm/models/__init__.py gptme/llm/validate.py gptme/llm/llm_anthropic_models_deprecated.py gptme/llm/constants.py gptme/llm/llm_openai_subscription.py gptme/llm/utils.py gptme/llm/provider_plugins.py gptme/llm/llm_openai_models.py gptme/llm/llm_gptme.py gptme/llm/llm_openai.py gptme/llm/llm_anthropic.py gptme/llm/llm_openai_models_deprecated.py gptme/llm/__init__.py gptme/acp/client.py gptme/acp/types.py gptme/acp/adapter.py gptme/acp/__main__.py gptme/acp/agent.py gptme/acp/__init__.py gptme/dirs.py gptme/credentials.py gptme/prompts/context_cmd.py gptme/prompts/workspace.py gptme/prompts/templates.py gptme/prompts/architect.py gptme/prompts/chat_history.py gptme/prompts/skills.py gptme/prompts/__init__.py gptme/server/external_sessions.py gptme/server/artifacts_api.py gptme/server/client.py gptme/server/metrics.py gptme/server/acp_session_runtime.py gptme/server/api_v2_agents.py gptme/server/panels_api.py gptme/server/api_v2_common.py gptme/server/workspace_api.py gptme/server/constants.py gptme/server/tasks_api.py gptme/server/openapi_docs.py gptme/server/api_v2_sessions.py gptme/server/session_step.py gptme/server/session_models.py gptme/server/skills_api.py gptme/server/a2a_api.py gptme/server/app.py gptme/server/__main__.py gptme/server/tts_api.py gptme/server/cli.py gptme/server/tools_api.py gptme/server/auth.py gptme/server/__init__.py gptme/server/computer_api.py gptme/server/api_v2.py gptme/oauth/openrouter.py gptme/oauth/__init__.py gptme/chat.py gptme/message.py gptme/workspace_snapshot.py gptme/commands/base.py gptme/commands/export.py gptme/commands/backtrack.py gptme/commands/llm.py gptme/commands/meta.py gptme/commands/account.py gptme/commands/rag.py gptme/commands/snapshot.py gptme/commands/session.py gptme/commands/checkpoint.py gptme/commands/__init__.py gptme/__main__.py gptme/eval/leaderboard.py gptme/eval/filestore.py gptme/eval/main.py gptme/eval/swebench/main.py gptme/eval/swebench/evaluate.py gptme/eval/swebench/utils.py gptme/eval/swebench/retrieval.py gptme/eval/swebench/__main__.py gptme/eval/swebench/info.py gptme/eval/swebench/__init__.py gptme/eval/execenv.py gptme/eval/trends.py gptme/eval/types.py gptme/eval/tbench/agent.py gptme/eval/tbench/run.py gptme/eval/tbench/__init__.py gptme/eval/pass_rate_gate.py gptme/eval/cost.py gptme/eval/__main__.py gptme/eval/run.py gptme/eval/agents/swebench.py gptme/eval/agents/claude_code.py gptme/eval/agents/__init__.py gptme/eval/suites/practical23.py gptme/eval/suites/browser.py gptme/eval/suites/practical12.py gptme/eval/suites/practical32.py gptme/eval/suites/practical6.py gptme/eval/suites/behavioral/circuit_breaker.py gptme/eval/suites/behavioral/test_driven_error_handling.py gptme/eval/suites/behavioral/handle_specific_exception.py gptme/eval/suites/behavioral/fix_data_mutation.py gptme/eval/suites/behavioral/validate_user_input.py gptme/eval/suites/behavioral/rate_limiting.py gptme/eval/suites/behavioral/bounded_bugfix_with_decoys.py gptme/eval/suites/behavioral/noisy_worktree_fix.py gptme/eval/suites/behavioral/add_type_hints.py gptme/eval/suites/behavioral/debug_data_pipeline.py gptme/eval/suites/behavioral/stage_new_files.py gptme/eval/suites/behavioral/implement_lru_cache.py gptme/eval/suites/behavioral/implement_event_emitter.py gptme/eval/suites/behavioral/write_test_suite.py gptme/eval/suites/behavioral/extract_function_refactor.py gptme/eval/suites/behavioral/implement_priority_queue.py gptme/eval/suites/behavioral/add_logging.py gptme/eval/suites/behavioral/refactor_for_testability.py gptme/eval/suites/behavioral/optimize_n_squared.py gptme/eval/suites/behavioral/add_docstrings.py gptme/eval/suites/behavioral/fix_security_path_traversal.py gptme/eval/suites/behavioral/retry_with_backoff.py gptme/eval/suites/behavioral/multi_file_rename.py gptme/eval/suites/behavioral/use_existing_helper.py gptme/eval/suites/behavioral/iterative_debug.py gptme/eval/suites/behavioral/add_deprecation_warning.py gptme/eval/suites/behavioral/remove_dead_code.py gptme/eval/suites/behavioral/fix_mutable_default.py gptme/eval/suites/behavioral/merge_conflict_resolution.py gptme/eval/suites/behavioral/scope_discipline_bugfix.py gptme/eval/suites/behavioral/minimal_feature_preserve_default_with_decoys.py gptme/eval/suites/behavioral/_common.py gptme/eval/suites/behavioral/git_selective_commit.py gptme/eval/suites/behavioral/add_feature_preserve_default.py gptme/eval/suites/behavioral/implement_memoization.py gptme/eval/suites/behavioral/root_cause_pipeline_debug.py gptme/eval/suites/behavioral/__init__.py gptme/eval/suites/practical22.py gptme/eval/suites/practical21.py gptme/eval/suites/practical30.py gptme/eval/suites/practical14.py gptme/eval/suites/computer.py gptme/eval/suites/practical3.py gptme/eval/suites/practical26.py gptme/eval/suites/practical29.py gptme/eval/suites/practical20.py gptme/eval/suites/practical10.py gptme/eval/suites/practical4.py gptme/eval/suites/subagent.py gptme/eval/suites/practical7.py gptme/eval/suites/practical5.py gptme/eval/suites/practical16.py gptme/eval/suites/init_projects.py gptme/eval/suites/practical25.py gptme/eval/suites/practical28.py gptme/eval/suites/practical8.py gptme/eval/suites/practical13.py gptme/eval/suites/practical31.py gptme/eval/suites/practical2.py gptme/eval/suites/practical.py gptme/eval/suites/practical33.py gptme/eval/suites/basic.py gptme/eval/suites/practical18.py gptme/eval/suites/practical11.py gptme/eval/suites/practical19.py gptme/eval/suites/practical24.py gptme/eval/suites/practical9.py gptme/eval/suites/practical15.py gptme/eval/suites/__init__.py gptme/eval/suites/practical17.py gptme/eval/suites/practical27.py gptme/eval/swe_extra/swe_bench_extra_data.py gptme/eval/swe_extra/run_swe_extra.py gptme/eval/swe_extra/swe_bench_constants.py gptme/eval/swe_extra/swe_bench_test_spec.py gptme/eval/swe_extra/__init__.py gptme/eval/dspy/signatures.py gptme/eval/dspy/experiments.py gptme/eval/dspy/metrics.py gptme/eval/dspy/tasks.py gptme/eval/dspy/hybrid_optimizer.py gptme/eval/dspy/__main__.py gptme/eval/dspy/cli.py gptme/eval/dspy/prompt_optimizer.py gptme/eval/dspy/__init__.py gptme/eval/__init__.py gptme/prompt_queue.py gptme/__version__.py gptme/info.py gptme/util/_sound_sounddevice.py gptme/util/export.py gptme/util/sound.py gptme/util/context.py gptme/util/uri.py gptme/util/file_storage.py gptme/util/interrupt.py gptme/util/ask_execute.py gptme/util/cost_display.py gptme/util/generate_name.py gptme/util/cost_tracker.py gptme/util/tool_format.py gptme/util/useredit.py gptme/util/conversation_ids.py gptme/util/git_cmd.py gptme/util/safety.py gptme/util/replay.py gptme/util/install.py gptme/util/context_dedup.py gptme/util/gh.py gptme/util/stdio.py gptme/util/cost.py gptme/util/reduce.py gptme/util/tree.py gptme/util/clipboard.py gptme/util/context_savings.py gptme/util/_telemetry.py gptme/util/master_context.py gptme/util/prompt.py gptme/util/keyword_matching.py gptme/util/git_worktree.py gptme/util/auto_naming.py gptme/util/output_storage.py gptme/util/_sound_cmd.py gptme/util/content.py gptme/util/tokens.py gptme/util/terminal.py gptme/util/__init__.py gptme/session.py gptme/logmanager/eventlog.py gptme/logmanager/manager.py gptme/logmanager/conversations.py gptme/logmanager/__init__.py gptme/logmanager/conv_checkpoints.py gptme/telemetry.py gptme/agent/doctor.py gptme/agent/service.py gptme/agent/workspace.py gptme/agent/cli.py gptme/agent/__init__.py gptme/cli/doctor.py gptme/cli/cmd_status.py gptme/cli/main.py gptme/cli/cmd_batch.py gptme/cli/util.py gptme/cli/cmd_resume.py gptme/cli/wut.py gptme/cli/cmd_attest.py gptme/cli/cmd_computer.py gptme/cli/cmd_mcp.py gptme/cli/cmd_skills.py gptme/cli/cmd_chats.py gptme/cli/cmd_mcp_serve.py gptme/cli/cmd_snapshot.py gptme/cli/cmd_init.py gptme/cli/setup.py gptme/cli/cmd_slop.py gptme/cli/cmd_hooks.py gptme/cli/auth.py gptme/cli/onboard.py gptme/cli/cmd_agents.py gptme/cli/checkpoint.py gptme/cli/__init__.py gptme/checkpoint.py gptme/__init__.py gptme/hooks/workspace_agents.py gptme/hooks/markdown_validation.py gptme/hooks/server_elicit.py gptme/hooks/form_autodetect.py gptme/hooks/aw_watcher_agent.py gptme/hooks/mcp_namespace_hint.py gptme/hooks/types.py gptme/hooks/token_awareness.py gptme/hooks/confirm.py gptme/hooks/cli_confirm.py gptme/hooks/auto_confirm.py gptme/hooks/test.py gptme/hooks/cache_awareness.py gptme/hooks/elicitation.py gptme/hooks/time_awareness.py gptme/hooks/server_confirm.py gptme/hooks/cwd_changed.py gptme/hooks/agents_md_inject.py gptme/hooks/registry.py gptme/hooks/auto_snapshots.py gptme/hooks/cost_awareness.py gptme/hooks/tool_target_instructions.py gptme/hooks/tests/test_active_context.py gptme/hooks/tests/test_cli_confirm.py gptme/hooks/tests/test_auto_confirm.py gptme/hooks/tests/test_elicitation.py gptme/hooks/tests/test_workspace_agents.py gptme/hooks/tests/test_token_awareness.py gptme/hooks/tests/test_form_autodetect.py gptme/hooks/tests/test_aw_watcher_agent.py gptme/hooks/tests/test_agents_md_inject.py gptme/hooks/tests/test_confirm.py gptme/hooks/tests/test_server_confirm.py gptme/hooks/tests/test_tool_target_instructions.py gptme/hooks/tests/test_cwd_awareness.py gptme/hooks/tests/test_injection_screening.py gptme/hooks/tests/test_markdown_validation.py gptme/hooks/tests/test_server_elicit.py gptme/hooks/tests/test_time_awareness.py gptme/hooks/tests/test_cost_awareness.py gptme/hooks/tests/__init__.py gptme/hooks/tests/test_cache_awareness.py gptme/hooks/active_context.py gptme/hooks/cwd_awareness.py gptme/hooks/__init__.py gptme/hooks/injection_screening.py gptme/tui/main.py gptme/tui/app.py gptme/tui/__init__.py tests/test_external_sessions.py tests/test_dirs.py tests/test_tui.py tests/test_mcp_server.py tests/test_util_file_storage.py tests/test_prompts.py tests/test_tools_autocommit.py tests/test_tools_shell_validation.py tests/test_checkpoint.py tests/test_lessons_auto_include.py tests/test_util_content.py tests/test_conversations.py tests/test_auto_naming.py tests/test_server.py tests/test_util_cost.py tests/test_computer_record.py tests/test_computer_docker_config.py tests/test_chat_config.py tests/test_doctor.py tests/test_cost_tracker.py tests/test_tools_restart.py tests/test_chats_json.py tests/test_server_metrics.py tests/test_subagent_planner_roles.py tests/test_onboard.py tests/test_shell_fd_leak.py tests/test_hooks_form_autodetect.py tests/test_computer_actions.py tests/test_eval_swebench_retrieval.py tests/test_util.py tests/test_acp_client.py tests/test_eval_behavioral_solutions.py tests/test_cli_llm_generate.py tests/test_tools_complete.py tests/lessons/test_wildcard_matching.py tests/test_hooks_mcp_namespace_hint.py tests/test_circuit_breaker.py tests/test_computer_demo_cmd.py tests/test_util_safety.py tests/test_computer_gate.py tests/test_computer_run_task_cli.py tests/test_shell_issue729.py tests/test_server_v2_sessions.py tests/test_computer_use_integration.py tests/test_server_perf.py tests/test_tools_screenshot.py tests/test_tools_elicit.py tests/test_telemetry.py tests/test_llm_anthropic.py tests/test_logmanager.py tests/test_setup_completions.py tests/test_active_context.py tests/test_tasks_api.py tests/test_tools_shell.py tests/test_chats_external_search.py tests/test_tools_subagent.py tests/test_autocompact_scoring.py tests/test_github_bot.py tests/test_hooks_registry.py tests/test_llm_models_resolution.py tests/test_acp_stdout.py tests/test_treeofthoughts.py tests/test_computer_audit.py tests/test_util_tokens.py tests/test_uri.py tests/test_llm_validate.py tests/test_server_v2_agents.py tests/test_eventlog.py tests/test_cwe214_docker_env_leak.py tests/test_subagent_concurrency.py tests/test_prompt_templates.py tests/test_cli_status.py tests/test_tools_computer.py tests/test_util_output_storage.py tests/test_complete.py tests/test_master_context.py tests/test_computer_task.py tests/conftest.py tests/test_shell_background.py tests/test_computer_transport.py tests/test_util_cli_generate.py tests/test_tools_morph.py tests/test_browser_session_persistence.py tests/test_workspace_snapshot.py tests/test_commands.py tests/test_subagent_budget.py tests/test_eval_practical17.py tests/test_browser_lynx.py tests/test_workspace_agents.py tests/test_tree.py tests/test_lessons_status.py tests/test_hooks_cwd_changed.py tests/test_lessons_integration.py tests/test_server_v2_auto_stepping.py tests/test_message.py tests/test_server_etag.py tests/test_subagent_unit.py tests/test_tools_python.py tests/test_gptme_provider.py tests/test_util_gh_mocked.py tests/test_provider_plugins.py tests/test_computer_x11_integration.py tests/test_server_client.py tests/test_eval_timeouts.py tests/test_server_elicitation.py tests/test_webui_redirects.py tests/test_tools_patch_many.py tests/test_tool_loading_duplicate.py tests/test_dspy_hybrid.py tests/test_util_hooks.py tests/test_agent_memory.py tests/test_server_cli_fallback.py tests/test_tui_e2e.py tests/test_message_command.py tests/test_tools_vision.py tests/test_tools_chats.py tests/test_reduce.py tests/test_cli_resume.py tests/test_tools_lessons.py tests/test_computer_latency_cmd.py tests/test_eval_pass_rate_gate.py tests/test_server_panels.py tests/test_subagent_worktree_isolation.py tests/test_browser.py tests/test_unified_plugins.py tests/test_commands_llm.py tests/test_eval_tool_efficiency.py tests/test_dspy_gepa.py tests/test_executor.py tests/test_eval_computer_suite.py tests/test_computer_artifacts.py tests/test_computer_risk_streaming.py tests/test_tools_token_awareness.py tests/test_util_context_savings.py tests/test_server_cli_tools.py tests/test_util_tool_format.py tests/test_replay.py tests/test_plugins.py tests/test_browser_github_routing.py tests/test_misc_subprocess_timeouts.py tests/test_server_tts_api.py tests/test_cli_confirm_hook.py tests/test_cli_from_turn.py tests/test_util_cli_skills.py tests/test_tools_todo.py tests/test_tools_mcp.py tests/test_llm_openai_sampling.py tests/test_eval_swebench.py tests/test_util_install.py tests/test_search_alias.py tests/test_eval_leaderboard.py tests/test_shell_issue772.py tests/test_llm_auth.py tests/test_swebench_utils.py tests/test_file_selector_integration.py tests/test_shell_allowlist_autoconfirm.py tests/context/test_task_analyzer.py tests/context/test_adaptive_compressor.py tests/test_cost_cache_cold_warning.py tests/test_server_api_v2_common.py tests/test_acp_protocol_logging.py tests/test_agent_workspace_timeouts.py tests/test_server_v2.py tests/test_quota_skip.py tests/test_hooks_cache_awareness.py tests/test_tools_base.py tests/test_browser_state.py tests/test_server_default_profile.py tests/test_gears.py tests/test_chat.py tests/test_acp_agent.py tests/test_chats_export.py tests/test_server_workspace.py tests/test_auto_compact.py tests/test_tools_time_awareness.py tests/test_tools_shell_multiline.py tests/test_init.py tests/test_server_v2_hooks.py tests/test_server_skills_api.py tests/test_server_config_workspace_containment.py tests/test_tools_save.py tests/test_util_interrupt.py tests/test_shell_output_mixing_issue408.py tests/test_execenv.py tests/test_integration_phase4.py tests/test_computer_settle.py tests/test_shell_for_loop_issue724.py tests/test_commands_account.py tests/test_credentials.py tests/test_server_webui_dir.py tests/test_eval_practical20.py tests/test_computer_doctor_cmd.py tests/test_demo_capture.py tests/test_computer_milestone_integration.py tests/test_eval.py tests/test_codeblock.py tests/test_chats_rename.py tests/test_eval_practical18.py tests/test_agents_md_inject.py tests/test_lessons_tool.py tests/test_util_keyword_matching.py tests/test_snapshot_command.py tests/test_prompt_tools.py tests/test_tools_patch_anchored.py tests/test_tools_tmux.py tests/test_pdf_to_images.py tests/test_llm_openai_subscription.py tests/test_computer_screenshot_cli.py tests/test_util_cli_providers.py tests/test_json_output.py tests/test_github_ci_self_heal.py tests/test_command_completion.py tests/test_server_a2a.py tests/test_cost_display.py tests/test_llm_models.py tests/test_server_audio_transcription.py tests/test_agent.py tests/test_server_session_models.py tests/test_lessons_commands.py tests/test_server_v2_sse.py tests/test_server_cors.py tests/test_computer_video_frames_cli.py tests/test_vent.py tests/test_server_auth.py tests/test_xml_format.py tests/test_llm_mock.py tests/test_info.py tests/test_browser_format.py tests/test_computer_api.py tests/test_lessons_index.py tests/test_backtrack.py tests/test_server_parent_death_watcher.py tests/test_server_tools_query.py tests/test_subagent_roundtrip.py tests/test_profiles.py tests/test_tools_read.py tests/test_prompt.py tests/test_eval_behavioral.py tests/test_hooks.py tests/test_config.py tests/test_util_clipboard_paste.py tests/test_util_terminal.py tests/test_custom_providers.py tests/test_eval_trends.py tests/test_tools_gh.py tests/test_util_generate_name.py tests/test_eval_claude_code.py tests/test_context.py tests/test_execute_msg_defensive.py tests/test_server_bad_input.py tests/test_hooks_cost_awareness.py tests/test_acp_adapter.py tests/test_util_cli_attest.py tests/test_skill_installer.py tests/test_snapshot_list.py tests/test_git_worktree.py tests/test_util_cli_mcp.py tests/test_util_context_dedup.py tests/test_chats_stats.py tests/test_mcp.py tests/test_util_tree.py tests/test_lessons_parser.py tests/test_eval_practical16.py tests/test_ephemeral.py tests/test_server_artifacts.py tests/test_util_cli.py tests/test_eval_subagent.py tests/test_hooks_server_confirm.py tests/test_tools_patch.py tests/test_anti_slop.py tests/test_tools_form.py tests/test_dspy_integration.py tests/test_eval_practical19.py tests/test_subagent_integration.py tests/test_markdown_validation.py tests/test_agent_doctor.py tests/test_terminal_startup_latency.py tests/test_output_format.py tests/test_tools.py tests/test_tools_shell_background.py tests/test_tools_browser_thread.py tests/test_credentials_integration.py tests/test_tool_use.py tests/test_dspy_basic.py tests/test_cli.py tests/test_server_path_traversal.py tests/test_chats_clean.py tests/test_tools__anchored.py tests/test_acp_types.py tests/test_chat_history.py tests/test_server_fresh_bad_input.py tests/test_server_v2_tool_confirmation.py tests/test_session.py tests/test_lessons.py tests/test_agent_service_timeouts.py tests/test_screenshot.py tests/test_tools_choice.py tests/test_tools_pruner.py tests/test_mcp_adapter.py tests/test_util_export.py tests/test_util_cli_models.py tests/test_tools_rag.py tests/test_workspace_api.py tests/test_oauth_openrouter.py tests/test_prompt_skills_summary.py tests/test_git_cmd_resolver.py tests/test_lessons_matcher.py tests/test_util_gh.py tests/test_cost_awareness_delayed_warning.py tests/test_llm_utils.py tests/test_llm_openai.py tests/test_utils.py tests/test_package_exports.py tests/test_hybrid_lessons.py tests/test_tools_browser.py tests/test_context_selector.py tests/test_tools_precommit.py tests/test_commands_rag.py tests/test_mcp_discovery.py tests/test_acp_session_runtime.py tests/test_util_cli_batch.py scripts/eval_leaderboard.py scripts/treeofthoughts.py scripts/demo_capture.py scripts/eval_trends.py scripts/github_ci_self_heal.py scripts/analyze_compression.py scripts/auto_rename_logs.py scripts/github_bot.py scripts/train/collect.py scripts/verify_cloudflare_pages_deep_links.py scripts/check_model_freshness.py scripts/check_rst_formatting.py  --by-file --hide-rate --quiet | tail -n +2
-------------------------------------------------------------------------------------------------------------------------------
File                                                                                        blank        comment           code
-------------------------------------------------------------------------------------------------------------------------------
tests/test_subagent_unit.py                                                                  1183            489           4282
tests/test_server_v2.py                                                                       648            245           2753
tests/test_tools_subagent.py                                                                  842            415           2728
gptme/server/api_v2.py                                                                        445            354           2572
tests/test_llm_openai.py                                                                      525            289           2111
gptme/cli/cmd_computer.py                                                                     252            296           1726
gptme/tools/computer.py                                                                       432            864           1659
tests/test_init.py                                                                            249            141           1533
gptme/tools/shell.py                                                                          269            342           1431
gptme/llm/llm_openai.py                                                                       295            323           1359
tests/test_eval_behavioral.py                                                                 865            961           1354
tests/test_tools_computer.py                                                                  438            269           1258
gptme/hooks/workspace_agents.py                                                               238            149           1254
gptme/cli/main.py                                                                             200            225           1250
tests/test_cli.py                                                                             338            135           1243
tests/test_tools_shell.py                                                                     374            415           1167
gptme/util/gh.py                                                                              218            245           1162
tests/test_config.py                                                                          339            412           1098
tests/test_acp_agent.py                                                                       324            184           1090
tests/test_server.py                                                                          292            201           1080
tests/test_util_gh.py                                                                         232            125           1060
gptme/cli/util.py                                                                             230            174           1036
tests/test_server_v2_sessions.py                                                              159            121            997
gptme/acp/agent.py                                                                            183            298            987
gptme/hooks/tests/test_workspace_agents.py                                                    189             44            945
tests/test_doctor.py                                                                          247            127            931
tests/test_tools_base.py                                                                      309            107            929
gptme/cli/doctor.py                                                                           115             89            924
gptme/tools/subagent/api.py                                                                   162            349            922
gptme/eval/main.py                                                                            107            112            915
gptme/llm/llm_anthropic.py                                                                    217            306            914
tests/test_llm_utils.py                                                                       255            127            886
tests/test_eval_leaderboard.py                                                                126            104            883
tests/test_info.py                                                                            167             73            878
tests/test_computer_audit.py                                                                  231            157            846
tests/test_util_cli.py                                                                        226            151            832
tests/test_eval_computer_suite.py                                                             328            149            819
tests/test_tasks_api.py                                                                       180             65            812
gptme/eval/leaderboard.py                                                                     149            485            804
gptme/server/api_v2_sessions.py                                                               121            152            798
tests/test_util_gh_mocked.py                                                                  149            119            777
gptme/server/session_step.py                                                                  164            222            775
tests/test_tools_browser.py                                                                   263             63            773
gptme/tools/base.py                                                                           172            241            770
gptme/server/openapi_docs.py                                                                  253            168            747
gptme/eval/suites/computer.py                                                                 111            245            732
gptme/tools/subagent/execution.py                                                             138            288            727
tests/test_server_workspace.py                                                                142            141            722
gptme/eval/suites/basic.py                                                                    138             55            715
gptme/llm/__init__.py                                                                         143            258            710
tests/test_eval.py                                                                            131             84            709
gptme/tools/subagent/batch.py                                                                 135            482            708
gptme/tools/chats.py                                                                          135            167            706
tests/test_agent.py                                                                           205            112            701
tests/test_acp_session_runtime.py                                                             222             76            699
tests/test_hooks_registry.py                                                                  247             89            696
tests/test_tools_gh.py                                                                        134             69            675
gptme/tui/app.py                                                                              111            213            667
gptme/server/tasks_api.py                                                                     190            125            665
gptme/tools/_browser_playwright.py                                                            235            276            661
gptme/tools/browser.py                                                                        258            407            660
tests/test_prompt_templates.py                                                                229            148            659
tests/test_reduce.py                                                                          179            123            652
gptme/tools/mcp_adapter.py                                                                    227            219            648
gptme/eval/dspy/tasks.py                                                                      170            374            639
tests/test_llm_models_resolution.py                                                           216            171            639
tests/test_subagent_budget.py                                                                 166            144            626
gptme/cli/setup.py                                                                            140             67            623
tests/test_json_output.py                                                                     110             83            623
tests/test_llm_anthropic.py                                                                   131             45            618
tests/test_computer_doctor_cmd.py                                                              88             58            607
scripts/github_bot.py                                                                         109            107            598
gptme/util/context.py                                                                         140            207            594
tests/test_tools_complete.py                                                                  131            149            594
tests/test_cost_display.py                                                                     81             58            593
gptme/logmanager/manager.py                                                                   139            187            582
tests/test_tools_lessons.py                                                                   135             49            580
tests/test_tools_precommit.py                                                                 109             86            578
tests/test_auto_compact.py                                                                    235            201            566
tests/test_computer_transport.py                                                              209             79            556
tests/test_server_panels.py                                                                    61             30            551
gptme/eval/run.py                                                                              74             96            549
tests/test_eval_subagent.py                                                                   119             56            547
tests/test_computer_actions.py                                                                165            125            546
gptme/server/a2a_api.py                                                                       103             42            543
tests/test_server_path_traversal.py                                                           139            105            539
scripts/github_ci_self_heal.py                                                                111             49            537
gptme/server/artifacts_api.py                                                                 107            109            531
gptme/tools/gh.py                                                                             117            128            523
tests/test_server_bad_input.py                                                                121            101            518
tests/test_lessons.py                                                                         156            153            517
tests/test_hooks_cost_awareness.py                                                             72             61            516
gptme/eval/execenv.py                                                                          85            146            514
gptme/tools/computer_transport.py                                                             134             99            512
gptme/hooks/registry.py                                                                       102             82            502
gptme/lessons/installer.py                                                                    146            165            496
tests/test_hooks_cache_awareness.py                                                           151             44            484
tests/test_computer_demo_cmd.py                                                               144             74            480
tests/test_llm_auth.py                                                                        169             56            476
tests/test_snapshot_command.py                                                                117             57            476
gptme/llm/models/data.py                                                                        3             46            471
gptme/cli/cmd_chats.py                                                                        105             75            470
tests/test_chat.py                                                                            196            170            469
gptme/server/workspace_api.py                                                                  99             94            468
tests/test_server_session_models.py                                                           158            140            466
gptme/llm/llm_openai_subscription.py                                                          112             84            463
tests/test_commands.py                                                                        147             68            463
tests/test_gptme_provider.py                                                                  157             70            459
tests/test_skill_installer.py                                                                 138            154            459
tests/test_mcp_server.py                                                                      112             39            457
tests/test_tools_shell_background.py                                                          117             51            456
gptme/chat.py                                                                                  74            101            447
scripts/analyze_compression.py                                                                103             68            446
scripts/demo_capture.py                                                                       104             83            445
gptme/prompts/__init__.py                                                                      72             74            444
tests/test_tools_browser_thread.py                                                            113             51            426
tests/test_lessons_commands.py                                                                157             82            422
tests/test_dirs.py                                                                             97             69            421
gptme/eval/dspy/prompt_optimizer.py                                                           109             89            420
tests/test_lessons_index.py                                                                   137            116            419
tests/context/test_task_analyzer.py                                                            90             44            418
tests/test_util_cli_mcp.py                                                                     98             50            418
gptme/message.py                                                                              114            155            417
tests/test_lessons_parser.py                                                                  188            239            417
tests/conftest.py                                                                             108            157            415
tests/test_server_artifacts.py                                                                 66             32            415
tests/test_subagent_worktree_isolation.py                                                     129             70            414
gptme/util/prompt.py                                                                          102            151            410
tests/test_prompts.py                                                                         124             77            409
tests/test_tools.py                                                                           164             98            407
gptme/util/_telemetry.py                                                                      113            159            403
tests/test_codeblock.py                                                                       302            776            402
gptme/agent/service.py                                                                        108            103            400
tests/test_tools_shell_validation.py                                                          161             63            399
gptme/tools/tmux.py                                                                            98            170            398
tests/test_message.py                                                                         139            120            398
tests/test_tools_mcp.py                                                                       102             20            398
gptme/agent/cli.py                                                                            107            128            395
tests/test_hybrid_lessons.py                                                                  100             58            395
tests/test_profiles.py                                                                         88             37            395
gptme/eval/suites/subagent.py                                                                  90             70            394
gptme/telemetry.py                                                                             93             55            394
tests/test_computer_latency_cmd.py                                                             93             42            393
gptme/agent/doctor.py                                                                          90             43            388
gptme/workspace_snapshot.py                                                                    53             64            386
gptme/lessons/index.py                                                                        117            128            385
gptme/config/user.py                                                                           89             86            379
gptme/cli/cmd_hooks.py                                                                        106             76            376
tests/test_unified_plugins.py                                                                 102             42            376
tests/test_github_ci_self_heal.py                                                              71              6            371
gptme/cli/cmd_status.py                                                                        85             38            369
tests/test_workspace_api.py                                                                   103             19            369
gptme/hooks/tests/test_cost_awareness.py                                                       72             45            367
gptme/eval/dspy/cli.py                                                                         73             57            364
tests/test_computer_record.py                                                                 119             30            364
tests/test_eval_behavioral_solutions.py                                                       281            848            364
gptme/info.py                                                                                  97             80            363
gptme/llm/openai_responses.py                                                                  79             20            361
tests/test_mcp_discovery.py                                                                   107             41            356
tests/test_lessons_matcher.py                                                                  99             86            352
gptme/eval/dspy/experiments.py                                                                 94             60            350
gptme/tools/__init__.py                                                                        96             84            349
tests/test_computer_use_integration.py                                                        140            143            349
gptme/agent/workspace.py                                                                      120            209            347
tests/test_util_hooks.py                                                                       85             93            347
gptme/eval/dspy/metrics.py                                                                     97             98            345
tests/test_tools_patch_many.py                                                                 91            101            345
gptme/hooks/tests/test_elicitation.py                                                          91             45            343
tests/test_shell_background.py                                                                 99             71            342
gptme/logmanager/conversations.py                                                              80            119            341
tests/test_tui_e2e.py                                                                          62             72            338
gptme/tools/mcp.py                                                                            102            103            337
gptme/util/reduce.py                                                                           79            107            337
tests/test_provider_plugins.py                                                                 90             32            337
tests/test_eval_trends.py                                                                      35             22            335
tests/test_llm_openai_subscription.py                                                          76             28            334
tests/test_mcp_adapter.py                                                                     113             59            334
gptme/llm/llm_openai_models.py                                                                  6             43            333
gptme/tools/complete.py                                                                        87            108            329
tests/test_workspace_agents.py                                                                145             57            329
gptme/hooks/tests/test_agents_md_inject.py                                                     63             48            328
gptme/eval/suites/practical.py                                                                 35             30            326
gptme/util/cost_display.py                                                                     66             69            325
tests/test_circuit_breaker.py                                                                  98             69            322
tests/test_util_tool_format.py                                                                 78             32            322
gptme/checkpoint.py                                                                            79             49            321
scripts/treeofthoughts.py                                                                      59             91            320
gptme/hooks/tests/test_tool_target_instructions.py                                             58             49            319
tests/test_workspace_snapshot.py                                                              105             46            319
gptme/tools/subagent/types.py                                                                  84            148            318
tests/test_agent_doctor.py                                                                     72             34            318
tests/test_replay.py                                                                          101             64            318
gptme/eval/trends.py                                                                           59             31            317
tests/test_tools_morph.py                                                                      89             66            310
gptme/hooks/tests/test_confirm.py                                                             100             59            309
gptme/mcp/client.py                                                                            94            121            307
tests/test_chats_external_search.py                                                            72             55            307
gptme/tools/subagent/__init__.py                                                               63            222            306
tests/test_tools_rag.py                                                                        95             37            301
tests/context/test_adaptive_compressor.py                                                      58             44            298
tests/test_context.py                                                                         131             80            298
gptme/llm/models/resolution.py                                                                 62             84            297
tests/test_llm_models.py                                                                      107             79            297
gptme/attestation.py                                                                           69              2            296
tests/test_external_sessions.py                                                                80             49            296
gptme/plugins/__init__.py                                                                      98            133            295
tests/test_eval_swebench.py                                                                    78             41            294
gptme/server/external_sessions.py                                                              47             52            293
gptme/tools/python.py                                                                          85             99            293
tests/test_conversations.py                                                                    45             32            293
tests/test_plugins.py                                                                         110             85            292
tests/test_util_cli_batch.py                                                                   59              8            292
gptme/config/models.py                                                                        105             97            291
tests/test_chats_stats.py                                                                      72             30            291
tests/test_eventlog.py                                                                         70             34            289
tests/test_execenv.py                                                                          76             54            288
gptme/commands/snapshot.py                                                                     43             32            287
tests/lessons/test_wildcard_matching.py                                                       114            125            287
tests/test_lessons_auto_include.py                                                             77             50            287
tests/test_complete.py                                                                         66             58            286
gptme/prompts/workspace.py                                                                     47             69            285
gptme/config/chat.py                                                                           58             89            283
tests/test_server_a2a.py                                                                       64             20            283
gptme/eval/dspy/hybrid_optimizer.py                                                           141            345            282
tests/test_hooks_server_confirm.py                                                             78             31            282
gptme/eval/swe_extra/swe_bench_test_spec.py                                                    53             29            280
gptme/tools/lessons.py                                                                        106            115            278
tests/test_tools_patch_anchored.py                                                             65             26            278
gptme/tools/save.py                                                                            63             63            276
tests/test_logmanager.py                                                                       79             74            275
tests/test_computer_video_frames_cli.py                                                        67             12            274
tests/test_tools_restart.py                                                                    72             49            274
gptme/tools/shell_validation.py                                                                88            121            273
tests/test_util_tokens.py                                                                     129             71            273
tests/test_server_v2_agents.py                                                                 57             25            272
gptme/tools/patch.py                                                                           63             95            271
gptme/tools/shell_background.py                                                                65             36            270
gptme/hooks/tests/test_token_awareness.py                                                      37             28            269
gptme/cli/cmd_init.py                                                                          92            163            268
gptme/profiles.py                                                                              64             68            268
tests/test_computer_docker_config.py                                                           59             92            267
gptme/acp/client.py                                                                            66            121            266
tests/test_browser.py                                                                         115             58            266
tests/test_util_cli_attest.py                                                                  67              1            266
gptme/cli/cmd_skills.py                                                                        71             35            261
gptme/llm/models/listing.py                                                                    63             57            259
tests/test_tools_autocommit.py                                                                 99             47            259
tests/test_server_v2_auto_stepping.py                                                          56             50            258
tests/test_terminal_startup_latency.py                                                         77             32            257
tests/test_hooks.py                                                                           120             47            255
tests/test_tool_use.py                                                                         60             66            255
tests/test_context_selector.py                                                                 83             45            254
gptme/hooks/tests/test_form_autodetect.py                                                      73             25            253
gptme/tools/_browser_thread.py                                                                 49             52            253
tests/test_eval_claude_code.py                                                                 66             27            253
gptme/server/cli.py                                                                            47             60            252
tests/test_lessons_integration.py                                                              97             66            252
gptme/eval/suites/practical16.py                                                               64            100            251
scripts/check_model_freshness.py                                                               53             40            251
tests/test_util_cli_providers.py                                                               60             27            250
tests/test_prompt_tools.py                                                                     57             30            249
gptme/codeblock.py                                                                             37            143            247
gptme/hooks/tests/test_injection_screening.py                                                  78             13            247
gptme/server/tools_api.py                                                                      58             49            245
gptme/tools/rag.py                                                                             89            131            245
gptme/commands/llm.py                                                                          54             51            243
gptme/tools/patch_many.py                                                                      56             62            243
tests/test_agents_md_inject.py                                                                 43             37            241
gptme/anti_slop.py                                                                             40             62            240
gptme/prompts/templates.py                                                                     59            106            240
tests/test_ephemeral.py                                                                        70             35            240
gptme/eval/swebench/main.py                                                                    32             23            239
gptme/init.py                                                                                  48             78            239
tests/test_cli_from_turn.py                                                                    65             18            239
tests/test_mcp.py                                                                              68             59            239
gptme/commands/meta.py                                                                         54             20            238
gptme/context/task_analyzer.py                                                                100            124            237
tests/test_auto_naming.py                                                                      69             45            237
tests/test_computer_x11_integration.py                                                         87             87            236
gptme/tools/read.py                                                                            48             49            234
gptme/cli/auth.py                                                                              48             35            233
gptme/context/adaptive_compressor.py                                                           76            130            232
gptme/tools/todo.py                                                                            95            104            232
tests/test_tools_read.py                                                                       76             29            232
gptme/tools/precommit.py                                                                       70             96            230
tests/test_tools__anchored.py                                                                  46             30            230
tests/test_computer_settle.py                                                                  90             78            228
tests/test_hooks_cwd_changed.py                                                                55             24            227
gptme/cli/cmd_resume.py                                                                        44             25            226
gptme/lessons/parser.py                                                                        74            119            226
tests/test_chats_json.py                                                                       32             17            225
gptme/cli/onboard.py                                                                           67             59            224
gptme/mcp/registry.py                                                                          59             70            224
gptme/util/auto_naming.py                                                                      68             78            224
gptme/eval/suites/behavioral/__init__.py                                                        9             11            223
gptme/lessons/hybrid_matcher.py                                                                87            123            223
tests/test_git_worktree.py                                                                     57             37            222
gptme/eval/suites/practical6.py                                                                56             46            221
gptme/lessons/commands.py                                                                      91             48            219
gptme/hooks/tests/test_cli_confirm.py                                                          75             23            218
gptme/util/_sound_sounddevice.py                                                               57             50            218
tests/test_util_keyword_matching.py                                                            75             46            218
gptme/hooks/aw_watcher_agent.py                                                                49             21            217
gptme/tools/subagent/hooks.py                                                                  70            120            217
tests/test_lessons_tool.py                                                                     62             34            216
tests/test_subagent_roundtrip.py                                                               70             51            216
tests/test_tools_python.py                                                                     90             60            216
gptme/eval/swe_extra/swe_bench_extra_data.py                                                   69             51            213
gptme/hooks/elicitation.py                                                                     90            132            213
tests/test_cli_resume.py                                                                       64             15            212
tests/test_checkpoint.py                                                                       88             20            211
tests/test_server_fresh_bad_input.py                                                           43             38            211
gptme/config/cli_setup.py                                                                      36             42            209
gptme/eval/swebench/evaluate.py                                                                39             61            208
tests/test_autocompact_scoring.py                                                              86             39            208
tests/test_server_v2_hooks.py                                                                  80             60            207
tests/test_executor.py                                                                         50             31            206
gptme/hooks/cost_awareness.py                                                                  65             73            205
tests/test_oauth_openrouter.py                                                                 62              9            205
gptme/tools/autocompact/engine.py                                                              41             58            204
gptme/lessons/auto_include.py                                                                  71             94            203
gptme/server/panels_api.py                                                                     51             51            203
tests/test_tools_screenshot.py                                                                 55             48            203
tests/test_util_file_storage.py                                                                51             36            203
gptme/server/session_models.py                                                                 57             69            202
gptme/eval/suites/practical7.py                                                                57             81            201
gptme/hooks/auto_snapshots.py                                                                  51             66            201
gptme/util/sound.py                                                                            65             72            200
gptme/hooks/tests/test_active_context.py                                                       37             29            198
gptme/hooks/__init__.py                                                                        20             42            197
gptme/hooks/tests/test_server_elicit.py                                                        58             23            196
gptme/cli/cmd_batch.py                                                                         31              6            195
tests/test_tools_save.py                                                                       57             36            193
gptme/eval/suites/practical8.py                                                                68             62            191
tests/test_chats_clean.py                                                                      46             18            191
tests/test_computer_task.py                                                                   116             31            189
tests/test_telemetry.py                                                                        68             31            189
gptme/tools/pruner.py                                                                          44              0            188
gptme/eval/agents/claude_code.py                                                               41             33            187
gptme/hooks/tests/test_server_confirm.py                                                       48             32            186
gptme/eval/suites/practical14.py                                                               64             52            185
gptme/tools/morph.py                                                                           43             49            185
tests/test_computer_screenshot_cli.py                                                          53             12            183
gptme/commands/base.py                                                                         64             61            182
gptme/util/safety.py                                                                           40             33            181
gptme/context/selector/file_selector.py                                                        50             61            180
tests/test_dspy_hybrid.py                                                                      65             45            179
tests/test_tools_tmux.py                                                                       77             65            179
gptme/cli/cmd_mcp.py                                                                           52             29            178
gptme/tools/autocompact/resume.py                                                              50             74            178
tests/test_dspy_basic.py                                                                       66             44            177
gptme/eval/suites/practical4.py                                                                47             24            176
tests/test_server_tools_query.py                                                               51             28            176
tests/test_cost_tracker.py                                                                     26             26            175
gptme/commands/session.py                                                                      58             47            174
gptme/llm/validate.py                                                                          30             29            174
tests/test_tools_todo.py                                                                       81             65            173
gptme/tools/patch_anchored.py                                                                  54             79            172
tests/test_chats_export.py                                                                     48             17            172
tests/test_util_cli_generate.py                                                                35              7            172
gptme/circuit_breaker.py                                                                       49             72            171
gptme/eval/suites/practical10.py                                                               55             65            171
tests/test_acp_types.py                                                                        35             12            171
tests/test_tools_patch.py                                                                      91            214            171
gptme/eval/agents/swebench.py                                                                  35             22            170
tests/test_util_cli_models.py                                                                  23             25            170
gptme/util/git_worktree.py                                                                     40             67            169
gptme/hooks/cache_awareness.py                                                                118            186            168
gptme/oauth/openrouter.py                                                                      48             43            168
tests/test_tree.py                                                                             61             37            168
tests/test_util_terminal.py                                                                    52             34            168
tests/test_tools_elicit.py                                                                     50             25            167
gptme/server/acp_session_runtime.py                                                            34             30            165
tests/test_util_cli_skills.py                                                                  63             42            165
gptme/eval/suites/practical2.py                                                                46             18            164
gptme/llm/llm_gptme.py                                                                         64            112            164
gptme/server/computer_api.py                                                                   44             51            164
gptme/hooks/types.py                                                                           96            136            163
tests/test_computer_api.py                                                                     70            189            163
tests/test_tools_time_awareness.py                                                             52             34            163
tests/test_util_cost.py                                                                        29             26            163
gptme/server/auth.py                                                                           57             80            160
tests/test_acp_protocol_logging.py                                                             56             15            160
gptme/llm/utils.py                                                                             56             84            159
gptme/mcp/server.py                                                                            48             56            159
gptme/util/tokens.py                                                                           46             69            159
tests/test_acp_client.py                                                                       64             34            159
gptme/eval/suites/practical3.py                                                                27             19            158
tests/test_acp_stdout.py                                                                       76             37            158
tests/test_anti_slop.py                                                                        67             24            158
tests/test_server_default_profile.py                                                           65             39            158
tests/test_uri.py                                                                              55             30            158
gptme/llm/llm_openai_models_deprecated.py                                                       5             14            157
gptme/util/__init__.py                                                                         34             29            157
tests/test_backtrack.py                                                                        39             11            157
gptme/tui/main.py                                                                              25             15            156
tests/test_commands_account.py                                                                 37              6            156
gptme/eval/suites/practical15.py                                                               65             92            154
tests/test_eval_pass_rate_gate.py                                                              48              9            154
tests/test_shell_allowlist_autoconfirm.py                                                      38             38            154
gptme/server/api_v2_common.py                                                                  83             63            153
gptme/hooks/cli_confirm.py                                                                     50             54            152
gptme/tools/autocompact/scoring.py                                                             53             89            152
tests/test_subagent_integration.py                                                             48             21            152
gptme/commands/account.py                                                                      45             20            151
gptme/eval/suites/behavioral/add_deprecation_warning.py                                        73            138            151
gptme/eval/suites/practical9.py                                                                69             76            151
gptme/eval/swebench/retrieval.py                                                               46             62            151
gptme/util/tool_format.py                                                                      48             75            151
tests/test_util_tree.py                                                                        44             33            151
gptme/tools/restart.py                                                                         53             83            150
tests/test_server_api_v2_common.py                                                             46             46            150
gptme/server/client.py                                                                         63             79            149
tests/test_browser_state.py                                                                    75             31            148
tests/test_util_install.py                                                                     34             31            148
gptme/eval/agents/__init__.py                                                                  24             15            147
gptme/util/clipboard.py                                                                        22             12            147
scripts/check_rst_formatting.py                                                                41             52            147
tests/test_master_context.py                                                                   39             24            147
tests/test_util_safety.py                                                                      44             12            147
gptme/hooks/token_awareness.py                                                                 47             46            146
gptme/tools/form.py                                                                            42             64            145
tests/test_file_selector_integration.py                                                        50             23            145
tests/test_vent.py                                                                             32             10            145
tests/test_subagent_concurrency.py                                                             37             16            144
gptme/commands/checkpoint.py                                                                   21              4            143
gptme/hooks/tests/test_aw_watcher_agent.py                                                     26              6            143
gptme/acp/__main__.py                                                                          52             57            142
tests/test_search_alias.py                                                                     32             25            142
gptme/logmanager/eventlog.py                                                                   51             39            141
tests/test_dspy_integration.py                                                                 54             32            139
tests/test_tools_token_awareness.py                                                            59             47            139
gptme/eval/suites/practical5.py                                                                67             80            138
tests/test_computer_milestone_integration.py                                                   61             59            138
tests/test_tools_vision.py                                                                     36             31            138
gptme/hooks/agents_md_inject.py                                                                36             63            137
tests/test_server_elicitation.py                                                               47             17            137
tests/test_util_content.py                                                                     49             25            137
tests/test_llm_openai_sampling.py                                                              29              0            136
gptme/eval/swebench/utils.py                                                                   30             10            135
gptme/hooks/tool_target_instructions.py                                                        37             47            135
gptme/tools/elicit.py                                                                          39            121            135
tests/test_chat_config.py                                                                      53             44            135
tests/test_server_v2_tool_confirmation.py                                                      33             33            135
gptme/config/core.py                                                                           47             50            134
gptme/llm/models/types.py                                                                      50             66            134
tests/test_computer_gate.py                                                                    76             40            133
tests/test_server_config_workspace_containment.py                                              40             43            133
gptme/server/api_v2_agents.py                                                                  25             17            132
gptme/cli/cmd_attest.py                                                                        21              5            131
gptme/eval/suites/practical17.py                                                               64            137            131
gptme/eval/suites/behavioral/minimal_feature_preserve_default_with_decoys.py                   41             72            130
gptme/hooks/injection_screening.py                                                             31             34            130
gptme/server/app.py                                                                            34             78            130
gptme/util/replay.py                                                                           42             49            129
tests/test_agent_workspace_timeouts.py                                                         41             22            129
tests/test_snapshot_list.py                                                                    45              7            129
tests/test_tui.py                                                                              25             12            129
tests/test_acp_adapter.py                                                                      42             33            128
tests/test_cwe214_docker_env_leak.py                                                           42             41            128
gptme/hooks/tests/test_markdown_validation.py                                                  29             21            127
gptme/eval/suites/practical21.py                                                               76            184            126
tests/test_active_context.py                                                                   41             22            126
gptme/hooks/tests/test_cache_awareness.py                                                      47             34            125
gptme/server/skills_api.py                                                                     32              4            125
tests/test_util_context_dedup.py                                                               61             43            125
tests/test_treeofthoughts.py                                                                   34             23            124
gptme/eval/suites/behavioral/handle_specific_exception.py                                      15              8            123
gptme/hooks/form_autodetect.py                                                                 48             65            123
tests/test_computer_risk_streaming.py                                                          54             44            123
tests/test_prompt.py                                                                           36             36            123
gptme/commands/export.py                                                                       31             21            122
gptme/eval/suites/practical11.py                                                               53             26            122
gptme/eval/suites/practical12.py                                                               56             49            122
gptme/hooks/server_confirm.py                                                                  51             58            122
tests/test_server_webui_dir.py                                                                 59             21            121
tests/test_subagent_planner_roles.py                                                           39             30            121
tests/test_util_interrupt.py                                                                   48             38            121
tests/test_integration_phase4.py                                                               22             19            119
gptme/eval/suites/practical20.py                                                               77            190            118
tests/test_cost_cache_cold_warning.py                                                          33              8            118
gptme/commands/backtrack.py                                                                    31             29            117
gptme/server/metrics.py                                                                        36             19            117
tests/test_util_clipboard_paste.py                                                             27             14            117
gptme/eval/suites/behavioral/add_type_hints.py                                                 40             97            116
gptme/plugins/registry.py                                                                      40             35            116
gptme/tools/autocompact/hook.py                                                                40             48            116
tests/test_agent_service_timeouts.py                                                           19             18            116
tests/test_llm_validate.py                                                                     26             20            116
scripts/auto_rename_logs.py                                                                    34             23            115
tests/test_cli_status.py                                                                       31             16            115
gptme/eval/suites/practical18.py                                                               52            117            114
gptme/util/cost_tracker.py                                                                     46             69            114
tests/test_misc_subprocess_timeouts.py                                                         43             27            114
gptme/hooks/server_elicit.py                                                                   52             56            113
tests/test_lessons_status.py                                                                   67             96            113
tests/test_chats_rename.py                                                                     42             16            112
gptme/hooks/tests/test_time_awareness.py                                                       36             11            111
gptme/util/export.py                                                                           26             29            111
gptme/hooks/confirm.py                                                                         53             88            109
tests/test_computer_run_task_cli.py                                                            40             14            109
gptme/dirs.py                                                                                  46             35            108
tests/test_cost_awareness_delayed_warning.py                                                   42             32            108
gptme/eval/suites/practical29.py                                                               69            129            107
tests/test_tools_chats.py                                                                      26             19            107
gptme/eval/suites/practical28.py                                                               66            155            106
gptme/cli/checkpoint.py                                                                        23             14            105
gptme/eval/suites/behavioral/implement_lru_cache.py                                            56            101            105
gptme/eval/suites/practical13.py                                                               47             47            105
gptme/eval/suites/practical19.py                                                               58            133            105
gptme/eval/suites/behavioral/implement_event_emitter.py                                        48             94            104
gptme/eval/suites/practical22.py                                                               76            174            104
gptme/tools/choice.py                                                                          34             41            104
scripts/train/collect.py                                                                       35             52            104
gptme/lessons/matcher.py                                                                       35             47            103
tests/test_browser_session_persistence.py                                                      62             33            103
tests/test_tools_choice.py                                                                     51             26            103
tests/test_util_output_storage.py                                                              23             13            103
gptme/eval/suites/practical23.py                                                               75            190            102
gptme/eval/suites/practical30.py                                                               68            110            102
gptme/eval/suites/behavioral/bounded_bugfix_with_decoys.py                                     55             93            101
gptme/eval/suites/behavioral/root_cause_pipeline_debug.py                                      48            117            101
gptme/eval/suites/practical25.py                                                               70            147            101
gptme/eval/suites/practical27.py                                                               70            154            101
gptme/eval/suites/practical33.py                                                               68            109            101
gptme/eval/suites/behavioral/refactor_for_testability.py                                       22             45            100
gptme/eval/suites/practical32.py                                                               70            134            100
gptme/hooks/active_context.py                                                                  25             23            100
gptme/tools/_anchored.py                                                                       33             41            100
gptme/tools/_computer_gate.py                                                                  33             61            100
tests/test_command_completion.py                                                               33             23            100
tests/test_hooks_mcp_namespace_hint.py                                                         30             14            100
gptme/eval/suites/practical24.py                                                               78            204             99
gptme/eval/suites/practical26.py                                                               72            162             99
gptme/eval/suites/practical31.py                                                               69            112             99
gptme/eval/swe_extra/run_swe_extra.py                                                          25             15             99
gptme/eval/suites/behavioral/implement_priority_queue.py                                       61            109             98
gptme/eval/types.py                                                                            31             53             97
gptme/eval/suites/behavioral/optimize_n_squared.py                                             31             43             96
gptme/tools/screenshot.py                                                                      29             40             95
tests/test_session.py                                                                          40             21             95
gptme/tools/vent.py                                                                            39             64             93
gptme/prompts/chat_history.py                                                                  34             27             91
tests/test_server_etag.py                                                                      22              5             91
gptme/acp/types.py                                                                             25             13             90
gptme/server/tts_api.py                                                                        24             18             90
tests/test_agent_memory.py                                                                     26             17             90
tests/test_browser_lynx.py                                                                     35             15             90
gptme/cli/cmd_slop.py                                                                          17             10             89
gptme/eval/tbench/run.py                                                                       16             12             89
gptme/util/ask_execute.py                                                                      25             40             89
tests/test_swebench_utils.py                                                                   27              2             89
gptme/commands/__init__.py                                                                     15             21             88
tests/test_commands_rag.py                                                                     16              2             88
tests/test_server_cors.py                                                                      33             20             88
gptme/eval/suites/behavioral/circuit_breaker.py                                                53            118             87
gptme/util/tree.py                                                                             21             15             87
scripts/verify_cloudflare_pages_deep_links.py                                                  17              1             87
gptme/hooks/time_awareness.py                                                                  32             29             86
gptme/tools/autocompact/decision.py                                                            34             48             86
tests/test_browser_github_routing.py                                                           27              0             86
gptme/eval/suites/behavioral/implement_memoization.py                                          50            112             85
tests/test_util.py                                                                             42             85             85
tests/test_output_format.py                                                                    29             21             84
tests/test_server_auth.py                                                                      40             19             84
gptme/__version__.py                                                                           18              5             83
gptme/eval/suites/behavioral/validate_user_input.py                                            33             55             83
gptme/eval/suites/behavioral/add_docstrings.py                                                 47            103             82
gptme/eval/suites/behavioral/add_feature_preserve_default.py                                   27             40             82
gptme/tools/autocommit.py                                                                      37             58             81
tests/test_eval_swebench_retrieval.py                                                          25              4             81
tests/test_prompt_skills_summary.py                                                            44             44             80
gptme/cli/cmd_agents.py                                                                        19             14             79
tests/test_onboard.py                                                                          17             17             79
gptme/eval/suites/behavioral/rate_limiting.py                                                  52            118             78
gptme/util/context_savings.py                                                                  20              6             77
tests/test_eval_timeouts.py                                                                    32             33             77
tests/test_server_perf.py                                                                      22             21             77
gptme/context/compress.py                                                                      63            131             76
gptme/gears.py                                                                                 16              4             76
gptme/eval/pass_rate_gate.py                                                                   23             44             75
tests/test_cli_llm_generate.py                                                                 17             10             75
tests/test_markdown_validation.py                                                              43             34             75
tests/test_shell_issue729.py                                                                   50             52             75
gptme/eval/suites/behavioral/retry_with_backoff.py                                             30             49             74
gptme/hooks/tests/test_cwd_awareness.py                                                        13             12             74
gptme/tools/subagent/control.py                                                                19              3             74
tests/test_custom_providers.py                                                                 32             44             74
gptme/prompt_queue.py                                                                          30              5             73
gptme/tools/progress.py                                                                        23             53             73
gptme/tools/vision.py                                                                          28             21             73
tests/test_shell_issue772.py                                                                   48             47             73
gptme/util/output_storage.py                                                                   29             37             71
gptme/llm/llm_anthropic_models_deprecated.py                                                    5             11             70
gptme/session.py                                                                               39             64             70
gptme/config/__init__.py                                                                        6             15             69
gptme/config/project.py                                                                        23             28             69
gptme/context/selector/llm_based.py                                                            32             38             69
gptme/plugins/entrypoints.py                                                                   24             35             69
gptme/util/generate_name.py                                                                     5              6             69
tests/test_server_audio_transcription.py                                                       20             15             69
tests/test_hooks_form_autodetect.py                                                            22             34             68
gptme/prompts/context_cmd.py                                                                   11             12             67
tests/test_tools_form.py                                                                       22             19             67
gptme/eval/swe_extra/swe_bench_constants.py                                                     9              9             66
gptme/util/master_context.py                                                                   28             38             66
tests/test_util_context_savings.py                                                             12              0             66
gptme/eval/suites/behavioral/fix_mutable_default.py                                            31             57             65
gptme/eval/tbench/agent.py                                                                     20             24             65
gptme/logmanager/conv_checkpoints.py                                                           21             19             65
tests/test_eval_tool_efficiency.py                                                             20             11             64
gptme/eval/filestore.py                                                                        11              8             63
gptme/lessons/skills/python-repl/python_helpers.py                                             28             26             63
gptme/eval/suites/__init__.py                                                                  22             18             62
gptme/eval/suites/behavioral/test_driven_error_handling.py                                     35             56             62
gptme/eval/suites/init_projects.py                                                             21              1             62
gptme/llm/models/__init__.py                                                                    3             12             62
gptme/util/_sound_cmd.py                                                                       22             17             62
gptme/eval/suites/behavioral/add_logging.py                                                    27             39             61
gptme/tools/_browser_lynx.py                                                                   12             12             60
gptme/tools/_browser_perplexity.py                                                             22             16             60
tests/test_llm_mock.py                                                                         22             12             60
tests/test_shell_output_mixing_issue408.py                                                     25             29             60
gptme/context/selector/rule_based.py                                                           20             13             59
gptme/eval/suites/behavioral/merge_conflict_resolution.py                                      31             63             59
gptme/eval/suites/behavioral/noisy_worktree_fix.py                                             45             77             59
gptme/eval/suites/behavioral/scope_discipline_bugfix.py                                        37             52             59
gptme/util/uri.py                                                                              29             42             59
tests/test_eval_practical20.py                                                                 27              8             59
tests/test_git_cmd_resolver.py                                                                 23             15             59
tests/test_server_client.py                                                                    33             26             59
tests/test_server_metrics.py                                                                   20             20             59
gptme/eval/suites/behavioral/fix_data_mutation.py                                              26             44             58
gptme/eval/suites/behavioral/fix_security_path_traversal.py                                    23             31             58
gptme/prompts/skills.py                                                                        16             10             58
gptme/tools/clarify.py                                                                         17             26             57
tests/test_webui_redirects.py                                                                  11              7             57
gptme/eval/dspy/signatures.py                                                                  19             21             56
gptme/eval/suites/behavioral/extract_function_refactor.py                                      30             52             56
tests/test_chat_history.py                                                                     14             12             56
gptme/context/selector/file_integration.py                                                     13             10             55
gptme/eval/suites/behavioral/write_test_suite.py                                               24             33             55
gptme/tools/autocompact/handlers.py                                                            19              9             55
gptme/util/cost.py                                                                             20             21             55
gptme/hooks/cwd_changed.py                                                                     18             11             54
gptme/hooks/mcp_namespace_hint.py                                                              21             24             54
tests/test_computer_artifacts.py                                                               14              3             54
tests/test_server_skills_api.py                                                                13              1             54
gptme/credentials.py                                                                           16              7             53
gptme/util/context_dedup.py                                                                    41             93             53
gptme/util/terminal.py                                                                         28             23             53
tests/test_eval_practical17.py                                                                 33              3             53
tests/test_eval_practical18.py                                                                 23              4             53
tests/test_eval_practical19.py                                                                 23              6             53
tests/test_server_tts_api.py                                                                   21              0             53
gptme/hooks/markdown_validation.py                                                             36             41             51
tests/test_github_bot.py                                                                       12              1             51
gptme/eval/suites/behavioral/remove_dead_code.py                                               40             63             50
tests/test_server_parent_death_watcher.py                                                      16             14             50
tests/test_server_v2_sse.py                                                                    15             13             50
gptme/cli/cmd_snapshot.py                                                                      12              6             49
gptme/eval/suites/behavioral/multi_file_rename.py                                              27             42             49
gptme/eval/suites/behavioral/use_existing_helper.py                                            32             45             49
gptme/eval/swebench/info.py                                                                     8              3             49
gptme/tools/subagent/concurrency.py                                                            12             10             49
tests/test_execute_msg_defensive.py                                                            19             19             49
gptme/llm/provider_plugins.py                                                                  39             35             48
gptme/eval/suites/behavioral/git_selective_commit.py                                           21             52             47
tests/test_dspy_gepa.py                                                                        18              9             46
gptme/eval/suites/behavioral/debug_data_pipeline.py                                            30             61             45
tests/test_demo_capture.py                                                                     19              9             45
tests/test_util_generate_name.py                                                               17             10             45
gptme/logmanager/__init__.py                                                                    3              9             44
tests/test_pdf_to_images.py                                                                    13             13             43
gptme/eval/suites/behavioral/stage_new_files.py                                                12             18             42
tests/test_server_cli_fallback.py                                                              16             12             42
gptme/cli/cmd_mcp_serve.py                                                                     14             17             41
gptme/context/selector/file_config.py                                                          10              8             41
gptme/hooks/test.py                                                                            14              6             41
gptme/llm/llm_mock.py                                                                          16             22             41
tests/test_xml_format.py                                                                       19             68             41
gptme/eval/cost.py                                                                             18             25             40
gptme/util/file_storage.py                                                                     30             47             40
gptme/context/selector/hybrid.py                                                               14             16             39
gptme/util/keyword_matching.py                                                                 35             66             39
tests/test_shell_fd_leak.py                                                                    23             16             39
tests/test_utils.py                                                                            14             17             38
gptme/tools/autocompact/__init__.py                                                             3             12             37
gptme/cli/wut.py                                                                               13             12             36
gptme/commands/rag.py                                                                          17              8             36
tests/test_gears.py                                                                            18              0             36
tests/test_util_export.py                                                                      20             11             36
gptme/eval/suites/behavioral/iterative_debug.py                                                28             39             35
tests/test_message_command.py                                                                  13             12             35
tests/test_tools_pruner.py                                                                      9              0             35
gptme/tools/subagent/context.py                                                                22             81             34
tests/test_cli_confirm_hook.py                                                                 24             20             34
tests/test_commands_llm.py                                                                      7              0             34
tests/test_credentials.py                                                                      16              0             34
gptme/context/__init__.py                                                                       8              8             33
tests/test_shell_for_loop_issue724.py                                                          16             24             33
gptme/eval/suites/behavioral/_common.py                                                         9              5             32
gptme/hooks/tests/test_auto_confirm.py                                                         12              4             32
gptme/context/selector/__init__.py                                                             12             16             31
gptme/util/content.py                                                                          18             24             30
gptme/util/install.py                                                                          13             25             30
tests/test_package_exports.py                                                                  10              3             29
gptme/eval/swebench/__init__.py                                                                 1              0             28
gptme/hooks/cwd_awareness.py                                                                   11             17             28
tests/test_eval_practical16.py                                                                 11              0             28
gptme/__init__.py                                                                               8              3             27
gptme/constants.py                                                                             19             25             27
gptme/tools/_allowlist.py                                                                      11              7             27
gptme/util/useredit.py                                                                         11             13             26
tests/test_quota_skip.py                                                                        5              3             26
gptme/acp/adapter.py                                                                           19             22             25
gptme/executor.py                                                                              18             26             24
gptme/hooks/auto_confirm.py                                                                    11              9             24
tests/test_tool_loading_duplicate.py                                                           16             15             24
gptme/context/selector/base.py                                                                 14             23             23
gptme/mcp/__init__.py                                                                           4              3             23
gptme/util/interrupt.py                                                                        13             15             23
gptme/util/conversation_ids.py                                                                  7              4             22
tests/test_credentials_integration.py                                                           8              0             22
tests/test_setup_completions.py                                                                 9              6             22
gptme/acp/__init__.py                                                                           5             13             21
gptme/context/selector/config.py                                                                8              8             21
gptme/agent/__init__.py                                                                         3              6             19
gptme/context/config.py                                                                        12             25             19
tests/test_server_cli_tools.py                                                                 12              4             19
tests/test_tools_shell_multiline.py                                                             7             19             19
gptme/lessons/__init__.py                                                                       7             15             18
tests/test_browser_format.py                                                                    8              6             18
gptme/eval/suites/browser.py                                                                    5              0             17
gptme/plugins/plugin.py                                                                        25             39             17
gptme/util/git_cmd.py                                                                           7             14             17
gptme/cli/__init__.py                                                                          10             13             15
tests/test_screenshot.py                                                                        9              6             15
gptme/__main__.py                                                                               2              0             12
gptme/util/stdio.py                                                                             8              9             12
gptme/prompts/architect.py                                                                     26             52             11
gptme/server/constants.py                                                                       7             11              9
gptme/eval/tbench/__init__.py                                                                  13             22              8
gptme/eval/dspy/__init__.py                                                                     6              6              7
gptme/llm/constants.py                                                                          2              6              5
scripts/eval_trends.py                                                                          2              1              5
gptme/eval/__init__.py                                                                          2              2              4
scripts/eval_leaderboard.py                                                                     2              1              4
gptme/eval/__main__.py                                                                          1              0              3
gptme/eval/dspy/__main__.py                                                                     3              5              3
gptme/eval/swebench/__main__.py                                                                 1              0              3
gptme/server/__init__.py                                                                        2              3              3
gptme/server/__main__.py                                                                        1              0              3
gptme/tools/_browser_format.py                                                                  3              5              3
gptme/oauth/__init__.py                                                                         1              4              0
gptme/tui/__init__.py                                                                           4             12              0
-------------------------------------------------------------------------------------------------------------------------------
SUM:                                                                                        54925          51284         199129
-------------------------------------------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

Code Metrics#

$ make metrics
make[2]: Entering directory '/home/runner/work/gptme/gptme'
=== Code Metrics Summary ===

Project Overview:
  Files: 760
  Total blocks: 15158
  Average complexity: 3.694484760522496

Most Complex Functions (D+):
  gptme/init.py
      F 99:0 init_model - D
  gptme/lessons/parser.py
      F 273:0 parse_lesson - D
  gptme/lessons/installer.py
      F 240:0 install_skill - E
      F 507:0 check_dependencies - D
  gptme/lessons/index.py
      M 97:4 LessonIndex._default_dirs - E
      M 415:4 LessonIndex._load_manifest_skill_stubs - D
  gptme/plugins/__init__.py
      F 202:0 _load_plugin - D
  gptme/tools/shell_background.py
      M 56:4 BackgroundJob._read_output - D
  gptme/tools/read.py
      F 135:0 _read_one - D
  gptme/tools/python.py
      F 236:0 execute_python - D
  gptme/tools/lessons.py
      F 244:0 auto_include_lessons_hook - D
  gptme/tools/computer.py
      F 1381:0 _dispatch_transport - D
  gptme/tools/complete.py
      F 361:0 stuck_detect_hook - D
  gptme/tools/subagent/api.py
  gptme/tools/subagent/execution.py
      F 146:0 _create_subagent_thread - E
  gptme/tools/subagent/batch.py
  gptme/tools/chats.py
  gptme/tools/tmux.py
      F 423:0 execute_tmux - D
  gptme/tools/mcp.py
  gptme/tools/autocompact/engine.py
  gptme/tools/gh.py
      F 549:0 execute_gh - E
      F 99:0 _wait_for_checks - D
  gptme/tools/shell.py
      M 730:4 ShellSession._read_output_unix - E
      M 565:4 ShellSession._read_output_windows - D
      M 432:4 ShellSession._run_pipe - D
      F 1619:0 execute_shell - D
  gptme/tools/__init__.py
      F 253:0 get_toolchain - D
      F 158:0 init_tools - D
  gptme/codeblock.py
  gptme/config/user.py
      F 184:0 load_user_config - E
      F 478:0 _merge_config_data - D
  gptme/config/core.py
      M 61:4 Config.mcp - D
  gptme/config/cli_setup.py
  gptme/config/chat.py
      M 114:4 ChatConfig.from_dict - D
  gptme/config/models.py
      M 325:4 ProjectConfig.from_dict - D
  gptme/context/selector/rule_based.py
      M 27:4 RuleBasedSelector.select - D
  gptme/context/selector/file_selector.py
  gptme/llm/openai_responses.py
      F 313:0 _stream_responses_events - E
  gptme/llm/models/listing.py
      F 282:0 list_models - D
  gptme/llm/models/resolution.py
  gptme/llm/llm_openai.py
      F 435:0 init - E
      F 907:0 chat - E
      F 1213:0 stream - D
      F 1565:0 _transform_msgs_for_special_provider - D
      F 644:0 _handle_openai_transient_error - D
  gptme/llm/llm_anthropic.py
      F 1290:0 _prepare_messages_for_api - D
      F 675:0 chat - D
  gptme/llm/__init__.py
  gptme/acp/agent.py
      M 521:4 GptmeAgent.new_session - D
      M 956:4 GptmeAgent.prompt - D
  gptme/prompts/workspace.py
  gptme/prompts/chat_history.py
      F 20:0 prompt_chat_history - E
  gptme/prompts/__init__.py
      F 199:0 _build_prompt_sections - D
  gptme/server/api_v2_agents.py
      F 55:0 api_agents_put - D
  gptme/server/tasks_api.py
      F 381:0 get_git_status - D
  gptme/server/openapi_docs.py
      F 917:0 _convert_to_openapi_nullable - D
  gptme/server/api_v2_sessions.py
      F 301:0 api_conversation_step - E
      F 568:0 api_conversation_tool_confirm - D
      F 935:0 api_conversation_transcript - D
  gptme/server/session_step.py
  gptme/server/a2a_api.py
      F 489:0 _task_from_conversation - D
  gptme/server/api_v2.py
      F 1480:0 api_conversation_put - E
      F 1862:0 api_conversation_edit_message - E
      F 1348:0 api_conversation - D
      F 2516:0 api_conversation_config_patch - D
      F 1687:0 api_conversation_post - D
  gptme/chat.py
      F 340:0 _process_message_conversation - E
      F 183:0 _run_chat_loop - D
  gptme/workspace_snapshot.py
      F 417:0 prune_by_age - D
  gptme/commands/backtrack.py
      F 65:0 cmd_backtrack - D
  gptme/commands/llm.py
      F 129:0 cmd_tools - D
      F 212:0 cmd_context - D
  gptme/commands/meta.py
      F 142:0 cmd_plugin - E
  gptme/commands/snapshot.py
      F 42:0 _print_prunable - D
  gptme/commands/checkpoint.py
      F 43:0 cmd_checkpoint - D
  gptme/eval/leaderboard.py
      F 915:0 compute_rate_trends - D
      F 679:0 aggregate_per_test - D
  gptme/eval/main.py
  gptme/eval/trends.py
      F 157:0 compute_diff - D
  gptme/eval/run.py
      F 310:0 execute - D
  gptme/eval/suites/practical16.py
      F 68:0 check_queue_all_producers_mentioned - D
  gptme/eval/dspy/hybrid_optimizer.py
      C 239:0 TaskComplexity - D
      M 283:4 TaskComplexity.analyze - D
  gptme/info.py
      F 428:0 format_version_info - D
  gptme/util/context.py
      F 463:0 include_paths - E
      F 810:0 _resource_to_codeblock - E
  gptme/util/cost_display.py
      F 290:0 display_costs - D
      F 136:0 gather_conversation_costs - D
  gptme/util/tool_format.py
      F 104:0 format_tools_list - D
  gptme/util/gh.py
      F 980:0 get_github_run_logs - D
      F 1163:0 search_github_issues - D
      F 1269:0 search_github_prs - D
      F 1371:0 merge_github_pr - D
  gptme/util/reduce.py
      F 291:0 proactive_summarize_log - E
  gptme/util/_telemetry.py
      F 329:0 init_telemetry - D
  gptme/util/prompt.py
      M 294:4 GptmeCompleter.get_completions - D
  gptme/telemetry.py
      F 347:0 record_llm_request - E
  gptme/agent/doctor.py
      F 339:0 check_lessons - E
  gptme/cli/doctor.py
      F 546:0 _check_computer - D
  gptme/cli/main.py
  gptme/cli/util.py
      F 674:0 llm_generate - D
      F 1180:0 models_test - D
  gptme/cli/cmd_computer.py
      F 1409:0 doctor_cmd - E
      F 1170:0 latency_cmd - D
      F 1751:0 demo_cmd - D
  gptme/cli/cmd_skills.py
      F 17:0 skills_list - D
  gptme/cli/cmd_hooks.py
      F 265:0 run - D
  gptme/cli/cmd_agents.py
      F 25:0 run_scan - D
  gptme/hooks/workspace_agents.py
      F 1352:0 scan_agents - D
  gptme/hooks/token_awareness.py
      F 93:0 add_token_usage_warning - D
  gptme/hooks/cli_confirm.py
      F 162:0 _looks_like_diff - D
  gptme/hooks/registry.py
      M 178:4 HookRegistry.trigger - D
  gptme/hooks/tool_target_instructions.py
      F 67:0 _extract_paths - D
  tests/test_server.py
      F 309:0 test_api_conversation_list_detail_flag - D
  tests/test_eval_behavioral_solutions.py
      F 55:0 _apply_solution - E
  tests/test_server_v2_auto_stepping.py
      F 16:0 test_auto_stepping - E
      F 245:0 test_multi_tool_per_message - D
  tests/test_config.py
      F 665:0 test_project_config_loaded_from_toml - D
      F 702:0 test_project_config_loaded_from_json - D
  tests/test_util_cli.py
      F 19:0 test_tokens_count - D
      F 406:0 test_tools_list - D
      F 557:0 test_models_list - D
  tests/test_server_v2_tool_confirmation.py
      F 15:0 test_tool_confirmation_flow - D
  scripts/treeofthoughts.py
      F 183:0 tree_search - D
  scripts/demo_capture.py
      F 485:0 main - D
  scripts/auto_rename_logs.py
      F 32:0 auto_rename_logs - D
  scripts/github_bot.py
      F 555:0 main - D
  scripts/check_rst_formatting.py
      F 26:0 check_file - E

Largest Files (>300 SLOC):
  4282 tests/test_subagent_unit.py
  2753 tests/test_server_v2.py
  2733 tests/test_tools_subagent.py
  2572 gptme/server/api_v2.py
  2249 tests/test_eval_behavioral.py
  2114 tests/test_llm_openai.py
  1939 gptme/tools/computer.py
  1727 gptme/cli/cmd_computer.py
  1533 tests/test_init.py
  1524 gptme/tools/shell.py
  1376 tests/test_tools_shell.py
  1359 gptme/llm/llm_openai.py
  1355 tests/test_config.py
  1299 tests/test_tools_computer.py
  1298 gptme/cli/main.py
  1255 gptme/hooks/workspace_agents.py
  1252 tests/test_cli.py
  1179 gptme/util/gh.py
  1174 gptme/eval/leaderboard.py
  1127 tests/test_eval_behavioral_solutions.py
  1090 tests/test_acp_agent.py
  1086 tests/test_server.py
  1060 tests/test_util_gh.py
  1040 gptme/cli/util.py
   999 tests/test_server_v2_sessions.py
   987 gptme/acp/agent.py
   961 tests/test_tools_base.py
   947 gptme/eval/dspy/tasks.py
   945 gptme/hooks/tests/test_workspace_agents.py
   931 tests/test_doctor.py
   924 gptme/cli/doctor.py
   922 gptme/tools/subagent/api.py
   917 gptme/eval/main.py
   916 gptme/llm/llm_anthropic.py
   889 tests/test_eval_leaderboard.py
   886 tests/test_llm_utils.py
   881 tests/test_computer_audit.py
   878 tests/test_info.py
   869 tests/test_codeblock.py
   832 tests/test_util_cli.py
   820 gptme/eval/suites/computer.py
   819 tests/test_eval_computer_suite.py
   812 tests/test_tasks_api.py
   801 gptme/server/api_v2_sessions.py
   784 tests/test_util_gh_mocked.py
   776 gptme/tools/base.py
   775 gptme/server/session_step.py
   773 tests/test_tools_browser.py
   773 gptme/tui/app.py
   771 gptme/server/openapi_docs.py
   745 gptme/tools/browser.py
   728 tests/test_eval.py
   727 gptme/tools/subagent/execution.py
   725 gptme/tools/chats.py
   722 tests/test_server_workspace.py
   715 gptme/eval/suites/basic.py
   713 gptme/tools/subagent/batch.py
   710 gptme/llm/__init__.py
   701 tests/test_agent.py
   699 tests/test_acp_session_runtime.py
   696 tests/test_hooks_registry.py
   676 gptme/tools/_browser_playwright.py
   675 tests/test_tools_gh.py
   665 gptme/server/tasks_api.py
   659 tests/test_prompt_templates.py
   652 tests/test_reduce.py
   648 gptme/tools/mcp_adapter.py
   639 tests/test_llm_models_resolution.py
   632 gptme/cli/setup.py
   626 tests/test_subagent_budget.py
   623 tests/test_json_output.py
   619 tests/test_llm_anthropic.py
   616 gptme/util/context.py
   612 tests/test_lessons.py
   610 scripts/github_bot.py
   607 tests/test_computer_doctor_cmd.py
   603 tests/test_auto_compact.py
   598 tests/test_cost_display.py
   597 tests/test_tools_complete.py
   593 gptme/tools/gh.py
   583 gptme/logmanager/manager.py
   580 tests/test_tools_lessons.py
   578 tests/test_tools_precommit.py
   576 tests/test_lessons_parser.py
   573 tests/test_skill_installer.py
   567 scripts/github_ci_self_heal.py
   556 tests/test_computer_transport.py
   554 tests/test_eval_subagent.py
   551 tests/test_server_panels.py
   550 gptme/eval/run.py
   547 gptme/server/a2a_api.py
   546 tests/test_computer_actions.py
   539 tests/test_server_path_traversal.py
   533 gptme/server/artifacts_api.py
   526 gptme/eval/execenv.py
   518 tests/test_server_bad_input.py
   517 gptme/tools/subagent/__init__.py
   516 tests/test_hooks_cost_awareness.py
   515 gptme/llm/models/data.py
   514 tests/test_chat.py
   514 gptme/lessons/installer.py
   512 gptme/tools/computer_transport.py
   502 gptme/hooks/registry.py
   485 gptme/llm/llm_openai_subscription.py
   484 tests/test_hooks_cache_awareness.py
   483 gptme/tools/tmux.py
   480 tests/test_computer_demo_cmd.py
   477 tests/test_snapshot_command.py
   476 tests/test_llm_auth.py
   470 gptme/cli/cmd_chats.py
   468 gptme/server/workspace_api.py
   466 tests/test_server_session_models.py
   463 tests/test_commands.py
   461 tests/test_gptme_provider.py
   457 tests/test_mcp_server.py
   456 tests/test_tools_shell_background.py
   451 scripts/demo_capture.py
   447 gptme/prompts/__init__.py
   447 gptme/chat.py
   445 scripts/analyze_compression.py
   439 tests/test_tools.py
   437 tests/test_lessons_index.py
   430 gptme/util/prompt.py
   427 tests/conftest.py
   426 tests/test_tools_browser_thread.py
   426 tests/test_prompts.py
   424 gptme/message.py
   422 tests/test_lessons_commands.py
   421 tests/test_dirs.py
   421 gptme/eval/dspy/prompt_optimizer.py
   420 tests/test_tools_patch_many.py
   419 gptme/agent/service.py
   418 tests/test_util_cli_mcp.py
   418 tests/context/test_task_analyzer.py
   415 tests/test_server_artifacts.py
   414 tests/test_subagent_worktree_isolation.py
   409 tests/test_message.py
   407 gptme/util/_telemetry.py
   399 tests/test_tools_shell_validation.py
   399 gptme/eval/suites/subagent.py
   398 tests/test_tools_mcp.py
   396 gptme/agent/workspace.py
   395 tests/test_profiles.py
   395 tests/test_hybrid_lessons.py
   395 gptme/agent/cli.py
   394 gptme/telemetry.py
   393 tests/test_computer_latency_cmd.py
   388 gptme/workspace_snapshot.py
   388 gptme/agent/doctor.py
   385 gptme/lessons/index.py
   383 tests/test_util_hooks.py
   383 tests/test_computer_use_integration.py
   381 gptme/config/user.py
   378 gptme/cli/cmd_init.py
   376 tests/test_unified_plugins.py
   376 gptme/cli/cmd_hooks.py
   372 tests/test_lessons_matcher.py
   371 tests/test_github_ci_self_heal.py
   369 tests/test_workspace_api.py
   369 gptme/cli/cmd_status.py
   368 gptme/llm/llm_openai_models.py
   367 gptme/hooks/tests/test_cost_awareness.py
   364 tests/test_computer_record.py
   364 gptme/eval/dspy/cli.py
   363 gptme/info.py
   361 gptme/llm/openai_responses.py
   356 tests/test_mcp_discovery.py
   355 gptme/eval/dspy/experiments.py
   352 gptme/tools/mcp.py
   352 gptme/tools/__init__.py
   350 gptme/eval/dspy/metrics.py
   346 tests/test_tools_patch.py
   346 tests/lessons/test_wildcard_matching.py
   343 gptme/logmanager/conversations.py
   343 gptme/hooks/tests/test_elicitation.py
   342 tests/test_shell_background.py
   340 gptme/tools/complete.py
   338 tests/test_tui_e2e.py
   337 tests/test_provider_plugins.py
   337 tests/test_llm_openai_subscription.py
   337 gptme/util/reduce.py
   336 tests/test_eval_trends.py
   334 tests/test_mcp_adapter.py
   329 tests/test_workspace_agents.py
   328 gptme/hooks/tests/test_agents_md_inject.py
   327 tests/test_computer_api.py
   326 scripts/treeofthoughts.py
   326 gptme/tools/python.py
   326 gptme/eval/suites/practical.py
   325 gptme/util/cost_display.py
   322 tests/test_workspace_snapshot.py
   322 tests/test_util_tool_format.py
   322 tests/test_circuit_breaker.py
   321 gptme/checkpoint.py
   320 tests/test_replay.py
   319 gptme/hooks/tests/test_tool_target_instructions.py
   318 tests/test_agent_doctor.py
   318 gptme/tools/subagent/types.py
   317 gptme/eval/suites/practical16.py
   316 gptme/eval/trends.py
   314 tests/test_eval_swebench.py
   312 tests/test_plugins.py
   310 tests/test_tools_morph.py
   310 gptme/tools/patch.py
   309 gptme/hooks/tests/test_confirm.py
   307 tests/test_chats_external_search.py
   307 gptme/mcp/client.py
   303 gptme/prompts/templates.py
   301 tests/test_tools_rag.py
   301 gptme/tools/save.py

make[3]: Entering directory '/home/runner/work/gptme/gptme'
Most Duplicated Files:
npm warn exec The following package was not found and will be installed: jscpd@5.0.12
Clone found (python)
 -  [20:44 - 31:30] (12 lines, 54 tokens)
   __init__.py [36:55 - 47:30]
Clone found (python)
 -  [20:44 - 33:29] (14 lines, 62 tokens)
   selector/__init__.py [46:61 - 59:75]
Clone found (python)
 - client.py [239:9 - 246:9] (8 lines, 85 tokens)
   client.py [428:5 - 435:5]
Clone found (python)
 - cli.py [97:6 - 120:4] (24 lines, 84 tokens)
   cmd_agents.py [76:8 - 99:4]
Clone found (python)
 - cmd_batch.py [45:67 - 58:17] (14 lines, 74 tokens)
   main.py [159:77 - 172:17]
Clone found (python)
 - cmd_chats.py [77:22 - 89:15] (13 lines, 67 tokens)
   cmd_chats.py [117:24 - 129:15]
Clone found (python)
 - cmd_mcp.py [162:21 - 182:4] (21 lines, 80 tokens)
   cmd_mcp_serve.py [14:28 - 34:4]
Clone found (python)
 - cmd_mcp.py [207:5 - 217:24] (11 lines, 65 tokens)
   cmd_mcp_serve.py [62:5 - 72:24]
Clone found (python)
 - doctor.py [232:37 - 247:40] (16 lines, 60 tokens)
   doctor.py [254:47 - 269:40]
Clone found (python)
 - main.py [1072:40 - 1088:35] (17 lines, 102 tokens)
   main.py [1213:26 - 1229:27]
Clone found (python)
 - util.py [1344:9 - 1351:72] (8 lines, 54 tokens)
   util.py [1377:5 - 1384:68]
Clone found (python)
 - meta.py [165:9 - 173:49] (9 lines, 58 tokens)
   meta.py [214:9 - 222:49]
Clone found (python)
 - user.py [414:5 - 425:4] (12 lines, 50 tokens)
   user.py [467:5 - 478:4]
Clone found (python)
 - adaptive_compressor.py [56:1 - 69:23] (14 lines, 92 tokens)
   autocompact/scoring.py [145:1 - 158:23]
Clone found (python)
 - adaptive_compressor.py [69:46 - 81:15] (13 lines, 52 tokens)
   autocompact/scoring.py [158:24 - 167:60]
Clone found (python)
 - adaptive_compressor.py [175:1 - 186:79] (12 lines, 53 tokens)
   autocompact/scoring.py [236:61 - 247:79]
Clone found (python)
 - adaptive_compressor.py [203:48 - 212:48] (10 lines, 55 tokens)
   autocompact/scoring.py [263:25 - 272:48]
Clone found (python)
 - agents/swebench.py [110:9 - 116:86] (7 lines, 60 tokens)
   agents/swebench.py [134:13 - 142:14]
Clone found (python)
 - dspy/cli.py [78:1 - 92:2] (15 lines, 79 tokens)
   dspy/cli.py [316:66 - 330:2]
Clone found (python)
 - dspy/cli.py [160:9 - 176:15] (17 lines, 57 tokens)
   dspy/cli.py [423:45 - 439:15]
Clone found (python)
 - dspy/cli.py [187:13 - 192:51] (6 lines, 58 tokens)
   dspy/cli.py [450:13 - 455:51]
Clone found (python)
 - execenv.py [180:9 - 201:62] (22 lines, 63 tokens)
   execenv.py [482:9 - 503:62]
Clone found (python)
 - execenv.py [207:13 - 220:11] (14 lines, 59 tokens)
   execenv.py [508:13 - 521:11]
Clone found (python)
 - execenv.py [207:13 - 227:28] (21 lines, 92 tokens)
   execenv.py [718:13 - 737:16]
Clone found (python)
 - execenv.py [237:57 - 248:33] (12 lines, 94 tokens)
   filestore.py [59:60 - 70:33]
Clone found (python)
 - execenv.py [360:5 - 379:22] (20 lines, 137 tokens)
   execenv.py [585:5 - 604:22]
Clone found (python)
 - execenv.py [395:17 - 414:29] (20 lines, 82 tokens)
   execenv.py [615:17 - 634:29]
Clone found (python)
 - leaderboard.py [208:5 - 214:46] (7 lines, 61 tokens)
   leaderboard.py [689:5 - 695:85]
Clone found (python)
 - leaderboard.py [304:28 - 319:28] (16 lines, 63 tokens)
   leaderboard.py [364:68 - 379:28]
Clone found (python)
 - leaderboard.py [461:3 - 467:27] (7 lines, 82 tokens)
   leaderboard.py [835:3 - 841:27]
Clone found (python)
 - leaderboard.py [461:3 - 467:27] (7 lines, 82 tokens)
   leaderboard.py [1143:3 - 1149:27]
Clone found (python)
 - suites/behavioral/add_feature_preserve_default.py [61:5 - 79:17] (19 lines, 102 tokens)
   suites/behavioral/minimal_feature_preserve_default_with_decoys.py [112:5 - 130:17]
Clone found (python)
 - suites/behavioral/add_feature_preserve_default.py [83:43 - 131:5] (49 lines, 230 tokens)
   suites/behavioral/minimal_feature_preserve_default_with_decoys.py [162:59 - 210:5]
Clone found (python)
 - suites/behavioral/add_type_hints.py [19:62 - 27:44] (9 lines, 59 tokens)
   suites/behavioral/add_type_hints.py [41:70 - 49:44]
Clone found (python)
 - suites/behavioral/add_type_hints.py [19:62 - 27:33] (9 lines, 58 tokens)
   suites/behavioral/add_type_hints.py [82:71 - 90:33]
Clone found (python)
 - suites/behavioral/add_type_hints.py [42:43 - 49:69] (8 lines, 55 tokens)
   suites/behavioral/fix_mutable_default.py [28:41 - 35:69]
Clone found (python)
 - suites/behavioral/circuit_breaker.py [1:42 - 19:4] (19 lines, 68 tokens)
   suites/behavioral/rate_limiting.py [1:40 - 19:4]
Clone found (python)
 - suites/behavioral/circuit_breaker.py [91:51 - 111:44] (21 lines, 121 tokens)
   suites/behavioral/rate_limiting.py [82:49 - 102:44]
Clone found (python)
 - suites/behavioral/circuit_breaker.py [125:1 - 138:4] (14 lines, 73 tokens)
   suites/behavioral/rate_limiting.py [117:1 - 130:4]
Clone found (python)
 - suites/behavioral/circuit_breaker.py [170:46 - 178:68] (9 lines, 58 tokens)
   suites/behavioral/circuit_breaker.py [208:27 - 216:68]
Clone found (python)
 - suites/behavioral/implement_event_emitter.py [53:74 - 61:72] (9 lines, 69 tokens)
   suites/behavioral/implement_event_emitter.py [67:82 - 75:72]
Clone found (python)
 - suites/behavioral/implement_event_emitter.py [53:74 - 61:72] (9 lines, 69 tokens)
   suites/behavioral/implement_event_emitter.py [84:77 - 92:72]
Clone found (python)
 - suites/behavioral/implement_priority_queue.py [31:46 - 38:30] (8 lines, 50 tokens)
   suites/behavioral/implement_priority_queue.py [44:45 - 51:30]
Clone found (python)
 - suites/behavioral/root_cause_pipeline_debug.py [176:10 - 181:6] (6 lines, 59 tokens)
   suites/behavioral/root_cause_pipeline_debug.py [214:12 - 219:6]
Clone found (python)
 - suites/practical.py [26:63 - 33:40] (8 lines, 50 tokens)
   suites/practical.py [44:57 - 51:40]
Clone found (python)
 - suites/practical.py [26:63 - 33:40] (8 lines, 50 tokens)
   suites/practical.py [59:71 - 66:40]
Clone found (python)
 - registry.py [127:9 - 133:91] (7 lines, 64 tokens)
   registry.py [637:5 - 643:87]
Clone found (python)
 - tests/test_agents_md_inject.py [62:9 - 71:34] (10 lines, 56 tokens)
   tests/test_agents_md_inject.py [131:9 - 140:34]
Clone found (python)
 - tests/test_agents_md_inject.py [156:74 - 171:35] (16 lines, 68 tokens)
   tests/test_agents_md_inject.py [191:46 - 206:35]
Clone found (python)
 - tests/test_agents_md_inject.py [156:74 - 171:40] (16 lines, 71 tokens)
   tests/test_agents_md_inject.py [239:55 - 254:40]
Clone found (python)
 - tests/test_agents_md_inject.py [156:74 - 170:68] (15 lines, 62 tokens)
   tests/test_agents_md_inject.py [263:54 - 278:58]
Clone found (python)
 - tests/test_agents_md_inject.py [156:74 - 172:21] (17 lines, 72 tokens)
   tests/test_agents_md_inject.py [289:48 - 305:19]
Clone found (python)
 - tests/test_agents_md_inject.py [335:68 - 350:35] (16 lines, 71 tokens)
   tests/test_agents_md_inject.py [372:44 - 387:35]
Clone found (python)
 - tests/test_cost_awareness.py [238:78 - 252:29] (15 lines, 56 tokens)
   tests/test_cost_awareness.py [270:76 - 284:29]
Clone found (python)
 - tests/test_cost_awareness.py [359:72 - 376:46] (18 lines, 62 tokens)
   tests/test_cost_awareness.py [382:82 - 399:46]
Clone found (python)
 - tests/test_server_confirm.py [254:35 - 266:34] (13 lines, 83 tokens)
   tests/test_server_elicit.py [265:35 - 277:34]
Clone found (python)
 - tests/test_time_awareness.py [114:36 - 120:21] (7 lines, 52 tokens)
   tests/test_time_awareness.py [132:32 - 138:21]
Clone found (python)
 - tests/test_time_awareness.py [114:36 - 120:21] (7 lines, 52 tokens)
   tests/test_time_awareness.py [146:31 - 152:21]
Clone found (python)
 - tests/test_tool_target_instructions.py [132:43 - 140:62] (9 lines, 55 tokens)
   tests/test_tool_target_instructions.py [260:36 - 270:38]
Clone found (python)
 - tests/test_tool_target_instructions.py [134:31 - 141:25] (8 lines, 53 tokens)
   tests/test_tool_target_instructions.py [157:32 - 164:25]
Clone found (python)
 - tests/test_workspace_agents.py [276:9 - 296:58] (21 lines, 124 tokens)
   tests/test_workspace_agents.py [321:9 - 341:58]
Clone found (python)
 - tests/test_workspace_agents.py [713:13 - 725:44] (13 lines, 57 tokens)
   tests/test_workspace_agents.py [979:13 - 991:44]
Clone found (python)
 - __init__.py [282:21 - 288:14] (7 lines, 57 tokens)
   __init__.py [654:21 - 660:14]
Clone found (python)
 - __init__.py [414:19 - 422:5] (9 lines, 56 tokens)
   __init__.py [550:12 - 558:5]
Clone found (python)
 - llm_anthropic.py [171:29 - 196:20] (26 lines, 109 tokens)
   llm_openai.py [206:26 - 231:20]
Clone found (python)
 - llm_anthropic.py [407:5 - 424:21] (18 lines, 61 tokens)
   llm_openai.py [662:5 - 680:21]
Clone found (python)
 - llm_anthropic.py [460:5 - 469:39] (10 lines, 64 tokens)
   llm_openai.py [778:5 - 787:39]
Clone found (python)
 - llm_anthropic.py [485:5 - 511:30] (27 lines, 128 tokens)
   llm_openai.py [801:5 - 827:30]
Clone found (python)
 - llm_anthropic.py [675:9 - 682:32] (8 lines, 56 tokens)
   llm_anthropic.py [774:11 - 781:32]
Clone found (python)
 - llm_anthropic.py [692:5 - 727:6] (36 lines, 161 tokens)
   llm_anthropic.py [799:5 - 834:6]
Clone found (python)
 - llm_mock.py [49:9 - 57:5] (9 lines, 55 tokens)
   llm_mock.py [62:11 - 70:5]
Clone found (python)
 - llm_openai.py [907:9 - 915:5] (9 lines, 52 tokens)
   llm_openai.py [1213:11 - 1221:5]
Clone found (python)
 - llm_openai.py [922:5 - 931:84] (10 lines, 50 tokens)
   llm_openai.py [1228:5 - 1237:84]
Clone found (python)
 - llm_openai.py [992:5 - 1006:82] (15 lines, 93 tokens)
   llm_openai.py [1258:5 - 1272:82]
Clone found (python)
 - llm_openai_models.py [298:20 - 307:7] (10 lines, 51 tokens)
   llm_openai_models.py [317:14 - 326:7]
Clone found (python)
 - llm_openai_models.py [298:20 - 307:7] (10 lines, 51 tokens)
   llm_openai_models.py [328:20 - 337:7]
Clone found (python)
 - llm_openai_models.py [339:24 - 348:7] (10 lines, 51 tokens)
   llm_openai_models.py [350:20 - 359:7]
Clone found (python)
 - llm_openai_models.py [339:24 - 348:7] (10 lines, 51 tokens)
   llm_openai_models.py [372:14 - 381:7]
Clone found (python)
 - models/data.py [35:26 - 47:15] (13 lines, 54 tokens)
   models/data.py [49:26 - 61:15]
Clone found (python)
 - models/data.py [117:35 - 127:11] (11 lines, 55 tokens)
   models/data.py [128:33 - 138:11]
Clone found (python)
 - models/listing.py [175:21 - 181:10] (7 lines, 50 tokens)
   models/listing.py [348:32 - 354:14]
Clone found (python)
 - validate.py [150:9 - 163:4] (14 lines, 50 tokens)
   validate.py [189:54 - 202:4]
Clone found (python)
 - validate.py [188:48 - 202:4] (15 lines, 58 tokens)
   validate.py [205:45 - 219:4]
Clone found (python)
 - validate.py [188:48 - 199:64] (12 lines, 57 tokens)
   validate.py [222:37 - 233:64]
Clone found (python)
 - __init__.py [478:5 - 503:4] (26 lines, 110 tokens)
   install.py [14:5 - 39:4]
Clone found (python)
 -  [40:5 - 53:4] (14 lines, 70 tokens)
   subagent/control.py [34:5 - 47:4]
Clone found (python)
 - __init__.py [337:21 - 348:5] (12 lines, 80 tokens)
   __init__.py [445:15 - 456:5]
Clone found (python)
 - api_v2.py [1689:5 - 1696:76] (8 lines, 61 tokens)
   api_v2.py [2519:5 - 2526:76]
Clone found (python)
 - api_v2.py [1836:118 - 1851:11] (16 lines, 54 tokens)
   api_v2.py [1975:97 - 1990:11]
Clone found (python)
 - api_v2.py [1901:86 - 1920:10] (20 lines, 80 tokens)
   api_v2.py [2010:78 - 2030:10]
Clone found (python)
 - api_v2.py [2727:58 - 2740:38] (14 lines, 94 tokens)
   api_v2.py [2763:51 - 2776:38]
Clone found (python)
 - api_v2.py [2731:5 - 2743:40] (13 lines, 78 tokens)
   api_v2.py [3050:5 - 3062:15]
Clone found (python)
 - api_v2.py [2873:53 - 2878:76] (6 lines, 51 tokens)
   api_v2.py [2944:52 - 2949:76]
Clone found (python)
 - api_v2.py [2873:53 - 2878:76] (6 lines, 51 tokens)
   api_v2.py [2985:50 - 2990:76]
Clone found (python)
 - api_v2.py [2873:53 - 2878:76] (6 lines, 51 tokens)
   api_v2.py [3089:54 - 3094:76]
Clone found (python)
 - api_v2.py [2873:53 - 2878:76] (6 lines, 51 tokens)
   api_v2.py [3137:54 - 3142:76]
Clone found (python)
 - api_v2_agents.py [57:5 - 63:15] (7 lines, 52 tokens)
   tasks_api.py [731:5 - 737:7]
Clone found (python)
 - api_v2_sessions.py [302:96 - 314:81] (13 lines, 74 tokens)
   api_v2_sessions.py [1028:60 - 1040:81]
Clone found (python)
 - api_v2_sessions.py [318:5 - 329:15] (12 lines, 51 tokens)
   api_v2_sessions.py [601:9 - 612:19]
Clone found (python)
 - api_v2_sessions.py [597:9 - 613:11] (17 lines, 80 tokens)
   api_v2_sessions.py [1038:5 - 1055:7]
Clone found (python)
 - api_v2_sessions.py [598:27 - 613:11] (16 lines, 68 tokens)
   api_v2_sessions.py [750:19 - 766:7]
Clone found (python)
 - session_models.py [230:25 - 242:46] (13 lines, 76 tokens)
   session_models.py [286:29 - 298:42]
Clone found (python)
 - session_models.py [255:21 - 271:8] (17 lines, 58 tokens)
   session_models.py [309:17 - 325:8]
Clone found (python)
 - tasks_api.py [490:73 - 499:64] (10 lines, 53 tokens)
   tasks_api.py [503:51 - 512:64]
Clone found (python)
 - workspace_api.py [46:68 - 53:6] (8 lines, 63 tokens)
   workspace_api.py [67:5 - 74:6]
Clone found (python)
 - workspace_api.py [313:74 - 322:26] (10 lines, 73 tokens)
   workspace_api.py [581:77 - 590:26]
Clone found (python)
 - workspace_api.py [313:74 - 322:26] (10 lines, 73 tokens)
   workspace_api.py [648:9 - 657:26]
Clone found (python)
 - workspace_api.py [537:9 - 557:67] (21 lines, 149 tokens)
   workspace_api.py [620:9 - 640:67]
Clone found (python)
 -  [57:24 - 79:8] (23 lines, 135 tokens)
   _telemetry.py [326:34 - 348:8]
Clone found (python)
 -  [110:9 - 119:45] (10 lines, 60 tokens)
    [506:5 - 515:41]
Clone found (python)
 - _browser_playwright.py [749:9 - 764:8] (16 lines, 89 tokens)
   browser.py [1024:9 - 1039:8]
Clone found (python)
 - _browser_playwright.py [766:60 - 774:62] (9 lines, 59 tokens)
   browser.py [942:68 - 950:62]
Clone found (python)
 - _browser_playwright.py [887:69 - 900:27] (14 lines, 77 tokens)
   browser.py [1121:44 - 1134:27]
Clone found (python)
 - _browser_playwright.py [1070:1 - 1085:43] (16 lines, 61 tokens)
   browser.py [1248:1 - 1263:43]
Clone found (python)
 - autocompact/engine.py [186:13 - 195:18] (10 lines, 57 tokens)
   autocompact/engine.py [237:17 - 246:22]
Clone found (python)
 - clarify.py [45:5 - 60:31] (16 lines, 83 tokens)
   complete.py [68:5 - 83:31]
Clone found (python)
 - complete.py [112:5 - 120:15] (9 lines, 50 tokens)
   complete.py [186:5 - 194:15]
Clone found (python)
 - computer.py [1479:13 - 1496:14] (18 lines, 71 tokens)
   computer.py [1868:13 - 1885:14]
Clone found (python)
 - computer.py [1625:13 - 1644:37] (20 lines, 93 tokens)
   computer_transport.py [260:13 - 279:37]
Clone found (python)
 - computer.py [1657:53 - 1668:30] (12 lines, 52 tokens)
   computer.py [1684:49 - 1695:30]
Clone found (python)
 - computer.py [1744:9 - 1753:19] (10 lines, 50 tokens)
   computer.py [1838:9 - 1847:19]
Clone found (python)
 - gh.py [78:9 - 87:59] (10 lines, 53 tokens)
   gh.py [151:13 - 159:63]
Clone found (python)
 - patch.py [331:5 - 343:23] (13 lines, 55 tokens)
   save.py [132:5 - 144:23]
Clone found (python)
 - patch_anchored.py [101:1 - 106:3] (6 lines, 52 tokens)
   patch_anchored.py [189:1 - 194:2]
Clone found (python)
 - patch_anchored.py [109:26 - 116:32] (8 lines, 57 tokens)
   patch_anchored.py [236:27 - 243:32]
Clone found (python)
 - precommit.py [114:52 - 121:61] (8 lines, 51 tokens)
   precommit.py [125:67 - 132:61]
Clone found (python)
 - shell.py [565:29 - 577:11] (13 lines, 66 tokens)
   shell.py [730:26 - 742:11]
Clone found (python)
 - shell.py [641:37 - 657:75] (17 lines, 63 tokens)
   shell.py [809:37 - 825:75]
Clone found (python)
 - shell.py [1186:5 - 1196:31] (11 lines, 55 tokens)
   shell.py [1237:5 - 1247:31]
Clone found (python)
 - shell_background.py [71:24 - 79:27] (9 lines, 57 tokens)
   shell_background.py [89:39 - 97:23]
Clone found (python)
 - subagent/batch.py [492:33 - 505:5] (14 lines, 90 tokens)
   subagent/batch.py [1099:25 - 1112:5]
Clone found (python)
 - subagent/batch.py [529:53 - 539:43] (11 lines, 118 tokens)
   subagent/batch.py [663:54 - 673:43]
Clone found (python)
 - subagent/batch.py [534:27 - 539:81] (6 lines, 72 tokens)
   subagent/batch.py [1142:81 - 1147:81]
Clone found (python)
 - subagent/batch.py [807:13 - 822:14] (16 lines, 59 tokens)
   subagent/batch.py [932:13 - 947:14]
Clone found (python)
 - subagent/context.py [20:9 - 30:16] (11 lines, 60 tokens)
   subagent/context.py [47:9 - 57:16]
Clone found (python)
 - _sound_sounddevice.py [61:46 - 72:56] (12 lines, 73 tokens)
   _sound_sounddevice.py [102:46 - 113:56]
Clone found (python)
 - gh.py [419:28 - 428:23] (10 lines, 51 tokens)
   gh.py [1209:13 - 1218:23]
Clone found (python)
 - gh.py [1193:17 - 1207:7] (15 lines, 55 tokens)
   gh.py [1297:14 - 1311:7]
Clone found (python)
 -  [389:5 - 403:26] (15 lines, 88 tokens)
    [467:5 - 481:26]
Clone found (python)
 -  [55:82 - 67:32] (13 lines, 63 tokens)
    [152:54 - 164:32]
Clone found (python)
 -  [116:9 - 127:34] (12 lines, 61 tokens)
    [220:9 - 231:34]
Clone found (python)
 -  [91:16 - 97:69] (7 lines, 53 tokens)
    [165:18 - 171:69]
┌────────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format     │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash       │ 12             │ 1452        │ 3078         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ css        │ 1              │ 174         │ 1100         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ javascript │ 1              │ 618         │ 3358         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markdown   │ 5              │ 999         │ 1396         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markup     │ 2              │ 482         │ 3220         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python     │ 428            │ 155346      │ 725641       │ 142          │ 1707 (1.10%)     │ 9905 (1.37%)      │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ text       │ 2              │ 527         │ 267          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ txt        │ 1              │ 146         │ 245          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ yaml       │ 1              │ 82          │ 151          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:     │ 453            │ 159826      │ 738456       │ 142          │ 1707 (1.07%)     │ 9905 (1.34%)      │
└────────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 142 clones.
time: 347.386ms
make[3]: Leaving directory '/home/runner/work/gptme/gptme'
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

The metrics above show:

  • Project Overview: Basic stats about the codebase size and complexity

  • Complex Functions: Functions rated D+ (high complexity, should be refactored)

  • Large Files: Files over 300 SLOC (should be split into smaller modules)

  • Duplicated Files: Using jscpd to find duplicated code

We should aim to:

  • Keep average complexity below 4.0

  • Have no E-rated functions (extremely complex)

  • Have few D-rated functions (very complex)

  • Keep files under 300 SLOC where possible