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 uv run python -X importtime -m gptme --model openai --non-interactive 2>&1 | grep "import time" | cut -d'|' -f 2- | sort -n | tail -n 10
     127075 |       anthropic.lib.vertex._client
     127173 |     anthropic.lib.vertex
     149334 |     anthropic.types
     160815 | gptme.chat
     208438 |           anthropic.types.beta
     208458 |         anthropic.types.beta.beta_message
     209922 |       anthropic.lib.middleware._fallbacks
     210011 |     anthropic.lib.middleware
     568666 |   anthropic
     568681 | anthropic._types

real	0m1.303s
user	0m1.014s
sys	0m0.215s
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 ± σ):      63.5 ms ±   0.5 ms    [User: 52.1 ms, System: 11.4 ms]
  Range (min … max):    62.8 ms …  64.6 ms    10 runs
 
Benchmark 2: gptme --help
  Time (mean ± σ):      1.081 s ±  0.012 s    [User: 0.924 s, System: 0.157 s]
  Range (min … max):    1.067 s …  1.110 s    10 runs
 
Benchmark 3: full start/exit cycle
  Time (mean ± σ):      1.410 s ±  0.009 s    [User: 1.188 s, System: 0.233 s]
  Range (min … max):    1.402 s …  1.427 s    10 runs
 
Summary
  import gptme.cli.main ran
   17.01 ± 0.22 times faster than gptme --help
   22.18 ± 0.22 times faster than full start/exit cycle
make[2]: Leaving directory '/home/runner/work/gptme/gptme'

Code size#

Profile: monorepo · 317,785 source lines · 451,419 test lines · generated 2026-12-04T08:28:00+00:00

Counts exclude prose and configuration files.

Largest source files#

Lines

File

Group

Changes

5,905

gptme/tui/app.py

Core

70

4,938

gptme/server/api_v2.py

Server

30

4,233

gptme/tools/shell.py

Tools

39

3,525

gptme/server/session_step.py

Server

58

3,496

gptme/llm/llm_openai.py

LLM

44

3,142

webui/src/utils/api.ts

Web UI

22

2,968

gptme/tools/computer.py

Tools

4

2,962

gptme/tools/subagent/api.py

Tools

35

2,576

gptme/tools/shell_background.py

Tools

25

2,435

gptme/acp/agent.py

Core

12

2,409

gptme/cli/doctor.py

Core

12

2,324

gptme/logmanager/manager.py

Core

29

2,224

gptme/cli/util.py

Core

22

2,218

gptme/tools/subagent/execution.py

Tools

30

2,213

gptme/llm/llm_anthropic.py

LLM

27

Over threshold#

  • ≥ 1,500 lines (38): gptme/tui/app.py (5,905), gptme/server/api_v2.py (4,938), gptme/tools/shell.py (4,233), gptme/server/session_step.py (3,525), gptme/llm/llm_openai.py (3,496), webui/src/utils/api.ts (3,142), gptme/tools/computer.py (2,968), gptme/tools/subagent/api.py (2,962), gptme/tools/shell_background.py (2,576), gptme/acp/agent.py (2,435), gptme/cli/doctor.py (2,409), gptme/logmanager/manager.py (2,324), gptme/cli/util.py (2,224), gptme/tools/subagent/execution.py (2,218), gptme/llm/llm_anthropic.py (2,213), gptme/cli/cmd_computer.py (2,143), webui/src/components/ChatInput.tsx (1,983), webui/src/hooks/useConversation.ts (1,936), gptme/chat.py (1,906), gptme/util/gh.py (1,905), gptme/cli/main.py (1,873), gptme/tools/autocompact/resume.py (1,824), gptme/server/api_v2_sessions.py (1,813), gptme/tools/base.py (1,783), gptme/tools/mcp_adapter.py (1,779), webui/src/utils/smd.js (1,728), gptme/codeblock.py (1,704), gptme/config/user.py (1,679), tauri/src-tauri/src/lib.rs (1,669), gptme/hooks/_credential_output.py (1,648), gptme/hooks/workspace_agents.py (1,641), gptme/server/openapi_docs.py (1,605), gptme/mcp/client.py (1,572), gptme/tools/browser.py (1,550), gptme/tools/python.py (1,547), gptme/util/review.py (1,514), gptme/llm/__init__.py (1,507), gptme/tools/gh.py (1,504)

  • ≥ 3,000 lines (6): gptme/tui/app.py (5,905), gptme/server/api_v2.py (4,938), gptme/tools/shell.py (4,233), gptme/server/session_step.py (3,525), gptme/llm/llm_openai.py (3,496), webui/src/utils/api.ts (3,142)

Hotspots (size × churn)#

Score

Lines

Changes

File

49756

5,905

70

gptme/tui/app.py

27494

4,938

30

gptme/server/api_v2.py

27076

3,525

58

gptme/server/session_step.py

26772

4,233

39

gptme/tools/shell.py

23452

3,496

44

gptme/llm/llm_openai.py

17772

2,962

35

gptme/tools/subagent/api.py

15069

3,142

22

webui/src/utils/api.ts

13135

2,576

25

gptme/tools/shell_background.py

12729

2,324

29

gptme/logmanager/manager.py

12349

2,218

30

gptme/tools/subagent/execution.py

12055

1,906

39

gptme/chat.py

11710

2,213

27

gptme/llm/llm_anthropic.py

11322

1,813

38

gptme/server/api_v2_sessions.py

10666

2,224

22

gptme/cli/util.py

10259

1,873

29

gptme/cli/main.py

By group#

Group

Source

Tests

Test ratio

Last commit

Core

115,598

11,042

9%

2026-12-04

Tools

61,670

0

0%

2026-12-04

Web UI

51,398

45,854

47%

2026-12-04

Eval

32,735

153

0%

2026-11-30

Server

23,399

0

0%

2026-12-04

LLM

16,786

0

0%

2026-12-04

scripts

9,166

0

0%

2026-12-02

site

3,238

130

4%

2026-12-01

Desktop

3,232

267

8%

2026-12-01

docs

475

0

0%

2026-12-04

.github

88

0

0%

2026-12-02

Tests

0

393,973

100%

2026-12-04

Trend (weekly git samples)#

Week

Commit

Source

Tests

Largest file

2026-W42

31177a2528

261,110

289,024

gptme/server/api_v2.py (4,410)

2026-W43

fc2c17be32

263,293

294,967

gptme/server/api_v2.py (4,410)

2026-W44

36c97a710f

272,491

335,449

gptme/tui/app.py (4,486)

2026-W45

f44fa0aef0

273,911

341,149

gptme/tui/app.py (4,512)

2026-W46

b4420fea79

284,215

365,853

gptme/tui/app.py (5,447)

2026-W47

5daa3dd44b

291,831

385,254

gptme/tui/app.py (5,862)

2026-W48

cfe82cf6ae

306,540

426,801

gptme/tui/app.py (5,874)

2026-W49

e4b115982f

317,785

451,419

gptme/tui/app.py (5,905)

The report counts physical lines in tracked code files. It uses the same code-size tool as the gptme-contrib dashboard. Follow the shared report tracking issue for changes to these measures.

Code Metrics#

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

Project Overview:
  Files: 1297
  Total blocks: 29717
  Average complexity: 4.1422754652219265

Most Complex Functions (D+):
  gptme/util/redact.py
      F 567:0 redact_secret_values_from_output - D
  gptme/util/context_budget.py
      F 45:0 get_context_budget - D
  gptme/util/review.py
      F 1428:0 validate_artifact_dict - D
      M 894:4 ReviewArtifact._from_forge_neutral - D
      M 263:4 ReviewFinding.from_dict - D
  gptme/util/reduce.py
      F 373:0 limit_log - E
      F 302:0 _drop_orphaned_tool_pairs - D
  gptme/util/capabilities_export.py
      F 549:0 validate_snapshot - D
  gptme/util/tool_format.py
      F 104:0 format_tools_list - D
  gptme/util/prompt.py
  gptme/util/cost_display.py
      F 408:0 display_costs - D
      F 227:0 gather_conversation_costs - D
  gptme/util/gh.py
      F 1213:0 get_github_run_logs - E
      F 1443:0 search_github_issues - D
      F 1549:0 search_github_prs - D
      F 1651:0 merge_github_pr - D
  gptme/util/completion_verification.py
      F 151:0 _split_shell_statements - E
      F 244:0 _mask_inert_shell_text - D
      F 1026:0 discover_verification_command - D
  gptme/util/_telemetry.py
      F 330:0 init_telemetry - D
  gptme/util/ask_execute.py
      F 96:0 execute_with_confirmation - D
  gptme/util/context.py
      F 951:0 _iter_discovered_paths - D
  gptme/tui/app.py
      M 1272:4 StreamingMessage._update_hidden_segments - D
      M 1931:4 ChatInput._on_key - D
      F 1563:0 renderables_for_message - D
      F 1721:0 complete_input - D
      M 2020:4 ChatInput._cycle_completion - D
  gptme/tui/child_view.py
      M 240:4 ChildView._read_snapshot - D
      M 315:4 ChildView._submit - D
  gptme/plugins/__init__.py
      F 205:0 _load_plugin - D
  gptme/plugins/registry.py
      F 36:0 discover_all_plugins - D
  gptme/commands/meta.py
      F 146:0 cmd_plugin - E
  gptme/commands/snapshot.py
      F 42:0 _print_prunable - D
  gptme/commands/backtrack.py
      F 67:0 cmd_backtrack - D
  gptme/commands/llm.py
      F 198:0 cmd_tools - D
      F 289:0 cmd_context - D
  gptme/commands/checkpoint.py
      F 43:0 cmd_checkpoint - D
  gptme/commands/export.py
      F 107:0 _replay_tool - D
  gptme/eval/leaderboard.py
      F 955:0 compute_rate_trends - E
      F 719:0 aggregate_per_test - D
  gptme/eval/suites/constraint_satisfaction.py
      F 255:0 check_boundary_domain_no_infra_import - D
  gptme/eval/suites/practical16.py
      F 68:0 check_queue_all_producers_mentioned - D
  gptme/eval/trends.py
      F 73:0 compute_trends - D
      F 176:0 compute_diff - D
  gptme/eval/run.py
      F 333:0 execute - E
  gptme/eval/dspy/hybrid_optimizer.py
      C 239:0 TaskComplexity - D
      M 283:4 TaskComplexity.analyze - D
  gptme/eval/main.py
  gptme/lessons/installer.py
      F 412:0 _install_local_skill - E
      F 782:0 check_dependencies - D
  gptme/lessons/index.py
      M 288:4 LessonIndex._default_dirs - E
      M 549:4 LessonIndex._index_directory - D
      M 751:4 LessonIndex._load_manifest_skill_stubs - D
  gptme/lessons/parser.py
  gptme/lessons/hybrid_matcher.py
      M 400:4 HybridLessonMatcher._match_with_bm25 - D
  gptme/lessons/selector.py
  gptme/lessons/auto_include.py
      F 270:0 _classify_lesson - D
  gptme/workspace_snapshot.py
      F 463:0 prune_by_age - D
  gptme/codeblock.py
      M 291:4 _ShellFenceState.scan - E
      F 403:0 _scan_ipython_triple_quote - D
      F 189:0 _skip_expansion_on_line - D
  gptme/llm/__init__.py
  gptme/llm/llm_anthropic.py
      F 2045:0 _prepare_messages_for_api - E
      F 1514:0 _extract_thinking_content - D
      F 1707:0 _handle_tools - D
      F 1893:0 _transform_system_messages - D
      F 1016:0 chat - D
  gptme/llm/llm_openai.py
      F 669:0 init - E
      F 968:0 _handle_openai_transient_error - E
      F 1769:0 extra_body - D
      F 2699:0 _handle_tools - D
      F 295:0 _record_usage - D
      F 499:0 _prepare_messages_for_responses_api - D
  gptme/llm/models/resolution.py
  gptme/llm/responses_phase.py
      F 187:0 replay_responses_output - D
  gptme/llm/openai_responses.py
      F 631:0 _stream_responses_events - D
      M 541:4 _ResponseFunctionCalls.get - D
  gptme/llm/recovery.py
      F 294:0 is_transient_provider_error - E
  gptme/context/selector/rule_based.py
      M 27:4 RuleBasedSelector.select - D
  gptme/context/selector/file_selector.py
  gptme/context/compress.py
      F 332:0 _render_reasoning_segments - D
  gptme/memory/schema.py
  gptme/tools/shell.py
      M 1486:4 ShellSession._read_output_windows - E
      M 1291:4 ShellSession._run_pipe - E
      F 3644:0 _explicit_timeout_seconds - D
      M 1036:4 ShellSession._run_with_tty - D
  gptme/tools/__init__.py
      F 538:0 init_tools - E
      F 701:0 get_toolchain - E
      F 437:0 _init_file_plugin_tools - D
      F 1356:0 load_tool - D
      F 918:0 execute_msg - D
      F 819:0 _add_required_tools - D
  gptme/tools/tmux.py
  gptme/tools/lessons.py
  gptme/tools/save.py
      F 183:0 execute_save_impl - D
  gptme/tools/patch_many.py
      F 282:0 _publish_patches - D
      F 372:0 execute_patch_many_impl - D
  gptme/tools/python_kernel.py
      M 640:4 KernelBackend._ensure_started - D
  gptme/tools/watch.py
      F 1260:0 _watch - E
      F 650:0 _poll_run - D
  gptme/tools/shell_heredoc.py
      F 417:0 _find_heredoc_regions - E
      F 321:0 _scan_nesting - E
      F 83:0 _shell_context - D
      F 236:0 _heredoc_delimiter - D
  gptme/tools/_browser_lynx.py
      F 252:0 _parse_set_cookie - D
  gptme/tools/shell_validation.py
      F 573:0 _token_is_sensitive - E
      F 336:0 _is_recursive_reader - D
      F 1296:0 check_with_shellcheck - D
      F 696:0 _has_sensitive_args - D
      F 817:0 _has_command_substitution - D
      F 276:0 _recursive_roots - D
      F 441:0 _cd_destinations - D
      F 1142:0 _interpreter_gets_program - D
  gptme/tools/vision.py
      F 71:0 view_image - D
  gptme/tools/subagent/hooks.py
      F 43:0 _subagent_control_hook - D
  gptme/tools/subagent/batch.py
  gptme/tools/subagent/types.py
      M 947:4 Subagent._read_log - E
      M 668:4 Subagent._read_usage - D
  gptme/tools/subagent/execution.py
      F 1030:0 _run_subagent_subprocess - E
      F 226:0 _subprocess_tools_arg - D
      F 287:0 _resolve_profile_tools - D
  gptme/tools/subagent/api.py
      F 2629:0 subagent_snapshots - D
      F 2106:0 subagent_continue - D
  gptme/tools/todo.py
      F 218:0 _restore_todos - E
  gptme/tools/read.py
  gptme/tools/mcp.py
  gptme/tools/shell_flags.py
      F 414:0 _split_lines - D
      F 566:0 _check_segment - D
  gptme/tools/restart.py
      F 352:0 _filter_same_interface_args - D
  gptme/tools/mcp_adapter.py
      F 395:0 create_mcp_tools - D
  gptme/tools/python.py
      F 1134:0 execute_python - E
      F 1055:0 _execute_python_kernel - D
  gptme/tools/autocompact/decision.py
      F 39:0 estimate_compaction_savings - D
  gptme/tools/autocompact/engine.py
  gptme/tools/autocompact/hook.py
  gptme/tools/autocompact/resume.py
      F 1143:0 _apply_native_compaction - E
  gptme/tools/gh.py
      F 796:0 _local_exec_reason - E
      F 185:0 _wait_for_checks - D
      F 541:0 _handle_pr_merge - D
      F 883:0 _group_list_search - D
  gptme/tools/shell_background.py
      F 1515:0 format_job_output - D
      M 1113:4 BackgroundJob._read_output - D
      F 2263:0 background_job_wait_hook - D
      M 755:4 BackgroundJob._commit_spool_bytes - D
  gptme/tools/hashline_edit.py
      F 988:0 execute_hashline_edit - E
  gptme/tools/convert.py
      M 942:4 DocumentToTextConverter._convert - E
      M 615:4 ImageConverter._convert - D
  gptme/tools/complete.py
      F 278:0 _run_verify_cmd - D
      F 1314:0 stuck_detect_hook - D
  gptme/tools/base.py
      F 405:0 render_tool_conditionals - D
  gptme/tools/memory.py
      F 139:0 _parse_memory_call - D
  gptme/tools/computer.py
      F 1392:0 _dispatch_transport - D
  gptme/tools/chats.py
      F 447:0 _format_message_with_context - D
      F 605:0 print_chat - D
  gptme/server/openapi_docs.py
      F 1279:0 _convert_to_openapi_nullable - D
  gptme/server/a2a_api.py
      F 540:0 _task_from_conversation - D
  gptme/server/cli.py
      F 320:0 serve - D
  gptme/server/session_models.py
      M 1005:4 SessionManager.clean_inactive_sessions - D
  gptme/server/api_v2_agents.py
      F 57:0 api_agents_put - D
  gptme/server/tasks_api.py
      F 396:0 get_git_status - D
      F 856:0 api_tasks_update - D
  gptme/server/api_v2_sessions.py
      F 1694:0 api_conversation_interrupt - D
      F 1224:0 api_conversation_rerun - D
  gptme/server/session_step.py
      F 1347:0 _acp_step - E
      F 516:0 _close_revoked_reply - D
  gptme/server/api_v2.py
      F 1968:0 api_conversation - E
      F 2362:0 api_conversation_post - E
      F 927:0 _restore_conversation_mcp_secrets - E
      F 998:0 _parse_mcp_request - D
  gptme/config/models.py
      M 706:4 ProjectConfig.from_dict - D
  gptme/config/core.py
      M 92:4 Config.mcp - D
  gptme/config/user.py
      F 1550:0 _merge_config_data - E
      F 1247:0 _write_config_text - D
  gptme/config/cli_setup.py
      F 133:0 parse_tool_specs - D
      F 53:0 _normalize_tool_allowlist - D
  gptme/config/chat.py
      M 176:4 ChatConfig.from_dict - E
      M 361:4 ChatConfig._workspace_transition - D
      M 464:4 ChatConfig.save - D
  gptme/config/validate.py
      F 32:0 _repaired_providers_text - D
  gptme/hooks/__init__.py
      F 118:0 init_hooks - D
  gptme/hooks/tool_target_instructions.py
      F 68:0 _extract_paths - D
  gptme/hooks/registry.py
      M 189:4 HookRegistry.trigger - D
  gptme/hooks/token_awareness.py
      F 93:0 add_token_usage_warning - D
  gptme/hooks/_secret_reach.py
      F 104:0 _parse_grep - E
      F 801:0 _matches_values - E
      F 574:0 _glob_patterns - D
      F 906:0 _check_reader_path - D
  gptme/hooks/time_awareness.py
      F 307:0 add_time_message - E
  gptme/hooks/workspace_agents.py
      F 1345:0 scan_agents - D
  gptme/hooks/cli_confirm.py
      F 192:0 _looks_like_diff - D
  gptme/hooks/elicitation.py
      F 365:0 _cli_form - D
  gptme/hooks/guardrails.py
      F 642:0 _rag_index_paths - D
  gptme/hooks/_credential_output.py
      F 810:0 _unwrap - D
      F 1295:0 _find_print_arguments - D
      F 911:0 _shell_options - D
      F 298:0 _parse_options - D
  gptme/logmanager/metadata.py
      F 88:0 validate_metadata_patch - D
  gptme/logmanager/manager.py
      M 943:4 LogManager.write - E
      M 283:4 Log.write_jsonl - D
      M 428:4 LogManager.__init__ - D
  gptme/message.py
      F 769:0 format_msgs - D
      F 879:0 print_msg - D
  gptme/init.py
      F 164:0 init_model - D
      F 326:0 _record_selection_trace - D
  gptme/acp/agent.py
      M 1437:4 GptmeAgent.prompt - E
      M 960:4 GptmeAgent.new_session - E
  gptme/prompts/__init__.py
      F 262:0 _build_prompt_sections - E
  gptme/prompts/chat_history.py
      F 20:0 prompt_chat_history - E
  gptme/prompts/workspace.py
  gptme/prompts/templates.py
      F 99:0 prompt_gptme - E
  gptme/cli/cmd_computer.py
      F 1278:0 doctor_cmd - E
      F 1039:0 latency_cmd - D
      F 1620:0 demo_cmd - D
  gptme/cli/cmd_service.py
      F 597:0 init - E
  gptme/cli/cmd_hooks.py
      F 269:0 run - E
  gptme/cli/auth.py
      F 57:0 auth_login - D
  gptme/cli/cmd_resume.py
      F 65:0 _task_from_user_content - D
  gptme/cli/cmd_agents.py
      F 25:0 run_scan - D
  gptme/cli/cmd_review_watch.py
  gptme/cli/util.py
      F 1057:0 context_files - E
      F 1253:0 llm_generate - D
      F 1963:0 models_test - D
      F 1868:0 models_info - D
  gptme/cli/cmd_review_pr.py
      F 1154:0 review_pr - D
      F 704:0 _spawn_review_session - D
  gptme/cli/doctor.py
      F 1873:0 _check_plugins - E
      F 506:0 _provider_repair_needed - D
      F 1229:0 _check_computer - D
      F 2308:0 doctor - D
  gptme/cli/setup.py
      F 112:0 _install_click_completions - D
  gptme/cli/cmd_memory.py
      F 627:0 memory_migrate_knowledge_jsonl - E
  gptme/cli/cmd_mcp.py
      F 313:0 mcp_info - D
      F 217:0 mcp_test - D
  gptme/cli/cmd_skills.py
      F 18:0 skills_list - D
  gptme/cli/main.py
      M 362:4 CommaSeparatedChoice.convert - D
      M 135:4 _DynamicHelpCommand.parse_args - D
  gptme/cli/cmd_knowledge.py
      F 288:0 knowledge_search_cmd - D
  gptme/telemetry.py
      F 442:0 record_llm_request - E
      F 362:0 _calculate_llm_cost - D
  gptme/info.py
      F 431:0 format_version_info - D
  gptme/chat.py
      F 1289:0 _should_prompt_for_input - E
      F 320:0 chat - D
      F 1689:0 step - D
  gptme/agent/doctor.py
      F 344:0 check_lessons - E
  gptme/mcp/imports.py
      F 971:0 _secret_values - D
  gptme/mcp/registry.py
      M 103:4 MCPRegistry.search_official_registry - D
  tests/test_util_review.py
      M 3913:4 TestSchemaFixtures.test_full_fixture_preserves_all_union_fields - D
  tests/test_dataset_history.py
      F 67:0 history - D
  tests/test_tui_before_tool_execution.py
      F 27:0 test_reply_visible_before_tools_and_not_duplicated - D
  tests/test_server.py
      F 579:0 test_api_conversation_list_detail_flag - D
  tests/test_skill_events.py
      F 32:0 test_queue_is_not_completion_and_terminal_requires_valid_transition - D
  tests/test_config.py
      F 2881:0 test_runtime_config_builtin_defaults_lifecycle - E
      F 1648:0 test_project_config_loaded_from_toml - D
      F 1685:0 test_project_config_loaded_from_json - D
  tests/test_browser_state_load_failure.py
      F 95:0 test_real_browser_preserves_draft_and_loads_valid_state - D
  tests/test_build_distribution.py
      F 33:0 test_build_distribution_roundtrip - E
  tests/test_session_workspace_hostile_cwd.py
      F 198:0 _check - D
  tests/test_server_hostile_host_cwd.py
      F 349:0 _check - D
  tests/test_openai_responses_input.py
      F 20:0 test_missing_tool_results_are_paired_without_replacing_real_results - D
  tests/test_server_confirmation_sessions.py
      F 431:0 test_interrupt_answers_native_call_before_registration - E
      F 649:0 test_post_generation_stop_closes_unregistered_calls - D
      F 308:0 test_revoked_native_call_is_answered_before_the_next_turn - D
  tests/test_server_v2_auto_stepping.py
      F 16:0 test_auto_stepping - E
      F 447:0 test_multi_tool_per_message - D
  tests/test_tools_parameter_conformance.py
      F 110:0 _extract_executor_kwargs_keys - E
  tests/test_tools_convert_literal_paths.py
      F 21:0 test_image_output_filename_is_literal - D
  tests/test_tui_work_view.py
      F 925:0 test_work_overview_renders_one_physical_row_per_child - E
  tests/test_server_default_profile.py
      F 255:0 test_runtime_fragments_survive_patch_and_restart - D
  tests/test_llm_image_attachments.py
      F 75:0 test_provider_preserves_image_attachment - D
  tests/test_shell_foreground_promotion.py
      F 1051:0 test_large_foreground_output_spools_before_completion - D
  tests/test_server_step_thread_crash.py
      F 26:0 test_step_thread_crash_releases_generating - D
  tests/test_tui_work_acceptance.py
  tests/test_tools_vision_exif.py
      F 42:0 test_large_exif_display_pixels - D
  tests/test_memory_migrate_knowledge.py
      F 468:0 test_migrate_preserves_unparseable_occupied_destinations - D
  tests/test_server_a2a.py
      F 1545:0 test_manual_rerun_after_interrupt_continues_once - D
  tests/test_conversation_effort.py
      F 211:0 test_real_step_applies_effort_and_records_metadata - D
  tests/test_tui_child_main.py
      F 74:0 test_child_back_preserves_parent_editor_and_widget_identity - D
  tests/test_hashline_confirmation_ownership.py
      F 28:0 test_confirmation_preserves_target_ownership - D
  tests/test_memory_store.py
      M 819:4 TestStore.test_concurrent_supersede_keeps_links_consistent - D
  tests/test_skill_metrics.py
      F 100:0 test_ledger_and_metrics_agree_without_duplicate_terminal_counts - E
  tests/test_server_v2_sse.py
      F 69:0 test_event_stream_resumes - D
  tests/test_responses_phase.py
      F 961:0 test_review_attachments_decline_text_only_replay - D
  tests/test_commands_llm.py
      F 219:0 test_commands_refresh_runtime_fragments_from_live_config - D
  tests/test_eval_behavioral_solutions.py
      F 55:0 _apply_solution - E
  tests/test_util_cli.py
      F 779:0 test_tools_list - D
      F 992:0 test_models_list - D
      F 835:0 test_tools_info - D
      F 1534:0 test_context_tree_respects_gitignore_anchored_and_negation - D
  tests/test_tui_frames.py
      F 230:0 test_prompt_queued_during_tool_waits_below_it_then_joins - D
  tests/test_workspace_api.py
      M 501:4 TestAttachmentResourceEndpoint.test_model_relative_resources_and_legacy_routes - D
  tests/test_tui_recovery.py
      F 41:0 test_retry_resets_only_uncommitted_preview - D
  tests/test_tui_work_unread.py
      F 45:0 test_indicator_and_completion_acknowledgement - D
  tests/test_cli_from_turn.py
      F 432:0 test_chats_fork_retains_only_explicit_policy - D
  tests/test_server_v2_tool_confirmation.py
      F 15:0 test_tool_confirmation_flow - D
  scripts/eval_phase0_pruning.py
      F 376:0 main - D
  scripts/github_bot.py
      F 554:0 main - D
  scripts/docs_structure.py
      F 263:0 check_nav - E
  scripts/check_rst_formatting.py
      F 66:0 check_lines - E
  scripts/auto_rename_logs.py
      F 32:0 auto_rename_logs - D
  scripts/treeofthoughts.py
      F 183:0 tree_search - D
  scripts/demo_capture.py
      F 485:0 main - D
  scripts/measure_output_capture.py
      F 80:0 measure - D

Largest Files (>300 SLOC):
  6975 tests/test_subagent_unit.py
  6855 tests/test_server_v2.py
  4550 tests/test_auto_compact.py
  4420 gptme/tui/app.py
  4302 tests/test_llm_openai.py
  3722 gptme/server/api_v2.py
  3559 tests/test_tui.py
  3535 tests/test_config.py
  3456 tests/test_server_v2_sessions.py
  3346 tests/test_acp_session_runtime.py
  3198 tests/test_tools_subagent.py
  3167 tests/test_util_review.py
  3156 gptme/tools/shell.py
  3119 tests/test_acp_agent.py
  2835 tests/test_doctor.py
  2488 tests/test_codeblock.py
  2411 gptme/llm/llm_openai.py
  2407 gptme/server/session_step.py
  2275 tests/test_tools_shell.py
  2252 tests/test_eval_behavioral.py
  1993 tests/test_subagent_persistence.py
  1974 gptme/tools/shell_background.py
  1942 gptme/tools/computer.py
  1929 gptme/tools/subagent/api.py
  1909 gptme/cli/doctor.py
  1860 tests/test_tools_complete.py
  1848 tests/test_chat.py
  1823 tests/test_cli.py
  1800 tests/test_tools_shell_validation.py
  1699 tests/test_tools_browser.py
  1693 tests/test_memory_store.py
  1690 gptme/acp/agent.py
  1683 tests/test_util_cli.py
  1620 tests/test_llm_anthropic.py
  1613 tests/test_mcp_imports.py
  1599 tests/test_init.py
  1592 gptme/cli/cmd_computer.py
  1581 tests/test_tools_gh.py
  1574 gptme/logmanager/manager.py
  1571 gptme/cli/util.py
  1562 tests/test_tools_watch.py
  1498 tests/test_llm_utils.py
  1488 tests/test_tools_convert.py
  1442 gptme/llm/llm_anthropic.py
  1423 tests/test_prompts.py
  1418 tests/test_util_gh.py
  1410 gptme/tools/subagent/execution.py
  1408 tests/test_server_a2a.py
  1408 tests/test_server.py
  1407 gptme/cli/main.py
  1375 tests/test_guardrail_secret_reach.py
  1363 gptme/server/api_v2_sessions.py
  1354 tests/test_mcp_adapter.py
  1326 tests/test_logmanager.py
  1322 gptme/util/gh.py
  1300 tests/test_tools_computer.py
  1294 gptme/chat.py
  1285 tests/test_util_cli_review_watch.py
  1283 gptme/tools/autocompact/resume.py
  1270 tests/test_shell_foreground_promotion.py
  1265 tests/test_tools_todo_isolation.py
  1259 tests/test_server_confirmation_sessions.py
  1249 gptme/hooks/workspace_agents.py
  1237 tests/test_mcp.py
  1214 tests/test_tools_base.py
  1205 gptme/hooks/_credential_output.py
  1202 gptme/eval/leaderboard.py
  1178 gptme/tools/base.py
  1149 gptme/tools/mcp_adapter.py
  1146 gptme/hooks/tests/test_agents_md_inject.py
  1139 gptme/codeblock.py
  1134 gptme/tools/convert.py
  1131 gptme/tools/gh.py
  1128 gptme/tools/watch.py
  1127 tests/test_eval_behavioral_solutions.py
  1126 tests/test_tools_patch_many.py
  1110 gptme/mcp/client.py
  1104 tests/test_shell_background.py
  1103 tests/test_config_write_safety.py
  1090 tests/test_credential_output.py
  1090 gptme/config/user.py
  1079 tests/test_eval.py
  1079 tests/test_completion_verification.py
  1075 gptme/tools/python_kernel.py
  1066 gptme/server/openapi_docs.py
  1040 gptme/tools/python.py
  1019 gptme/tools/complete.py
  1000 gptme/mcp/imports.py
   996 gptme/util/review.py
   992 gptme/llm/__init__.py
   987 tests/test_lessons_auto_include.py
   982 tests/test_cmd_service.py
   976 gptme/util/context.py
   972 tests/test_info.py
   971 tests/test_cli_shell_completion.py
   969 gptme/eval/main.py
   959 tests/test_tools_python_kernel.py
   956 gptme/hooks/tests/test_workspace_agents.py
   951 tests/test_tools_precommit.py
   950 gptme/cli/cmd_review_pr.py
   947 gptme/eval/dspy/tasks.py
   939 tests/test_mcp_discovery.py
   938 tests/test_cli_fatal_error_envelope.py
   936 gptme/tools/__init__.py
   930 tests/test_dataset.py
   926 tests/test_eval_leaderboard.py
   917 tests/test_tui_work_view.py
   908 tests/test_mcp_import_previews.py
   906 tests/test_compaction_recall.py
   906 gptme/tools/shell_validation.py
   901 tests/test_llm_openai_subscription.py
   901 gptme/hooks/_secret_reach.py
   890 tests/test_responses_phase.py
   884 gptme/tools/chats.py
   883 tests/test_shell_job_spool.py
   882 gptme/llm/models/data.py
   879 tests/test_overflow_recovery.py
   874 gptme/util/completion_verification.py
   873 gptme/hooks/tests/test_guardrails.py
   864 gptme/tools/_browser_playwright.py
   859 gptme/tools/browser.py
   858 tests/test_noninteractive_drain.py
   856 gptme/server/session_models.py
   853 tests/test_gptme_provider.py
   853 gptme/tools/hashline_edit.py
   852 tests/test_context.py
   846 tests/test_tools.py
   843 tests/test_knowledge.py
   840 tests/test_prompt_templates.py
   835 tests/test_lessons_parser.py
   831 tests/test_tasks_api.py
   831 tests/test_guardrail_hook.py
   830 tests/test_lessons_index.py
   826 tests/test_util_gh_mocked.py
   821 tests/test_tools_lessons.py
   820 tests/test_tools_python.py
   820 gptme/eval/suites/computer.py
   819 tests/test_eval_computer_suite.py
   808 tests/test_cli_completion.py
   807 tests/test_server_workspace.py
   802 tests/test_browser_lynx.py
   801 tests/test_sandbox.py
   792 tests/test_commands.py
   788 tests/test_cost_display.py
   783 tests/test_subagent_yield.py
   778 tests/test_util_cli_mcp.py
   773 gptme/tools/tmux.py
   773 gptme/cli/cmd_memory.py
   766 tests/test_message.py
   763 tests/test_conversation_effort.py
   755 gptme/llm/openai_responses.py
   752 gptme/eval/execenv.py
   744 gptme/lessons/installer.py
   743 tests/test_memory_match.py
   741 gptme/tools/subagent/batch.py
   735 tests/test_file_publication.py
   732 gptme/cli/cmd_review_watch.py
   728 tests/test_mcp_project_import.py
   728 tests/test_llm_models_resolution.py
   720 tests/test_tools_restart.py
   718 gptme/tools/subagent/types.py
   717 tests/test_eventlog.py
   716 tests/test_hooks_registry.py
   715 gptme/eval/suites/basic.py
   713 tests/test_computer_transport.py
   707 tests/test_agent.py
   703 tests/test_config_trust.py
   699 gptme/prompts/workspace.py
   687 tests/test_relevance_pruning.py
   683 gptme/cli/cmd_service.py
   681 tests/test_mcp_server.py
   680 tests/test_tui_e2e.py
   680 gptme/server/tasks_api.py
   675 gptme/tools/mcp.py
   666 tests/conftest.py
   663 tests/test_context_scout.py
   662 gptme/llm/llm_openai_subscription.py
   660 gptme/server/acp_session_runtime.py
   656 gptme/hooks/tests/test_anomaly_watchdog.py
   654 tests/test_tools_read.py
   653 tests/test_shell_redact_secrets.py
   643 tests/test_llm_grok_subscription.py
   643 tests/test_json_output.py
   642 tests/test_telemetry.py
   640 tests/test_server_session_models.py
   639 gptme/cli/setup.py
   631 gptme/util/prompt.py
   629 tests/test_skill_install_replacement.py
   629 gptme/lessons/index.py
   627 tests/test_subagent_retention.py
   626 tests/test_subagent_budget.py
   620 tests/test_config_validate.py
   619 tests/test_unified_plugins.py
   617 tests/test_server_panels.py
   612 tests/test_lessons.py
   610 tests/test_server_peer_wake.py
   610 tests/test_chat_transient_recovery.py
   609 tests/test_llm_models.py
   609 tests/test_explicit_attachments.py
   609 scripts/github_bot.py
   608 tests/test_skill_installer.py
   607 tests/test_computer_doctor_cmd.py
   601 gptme/cli/cmd_chats.py
   600 tests/test_mcp_oauth.py
   599 tests/test_util_hooks.py
   599 gptme/util/capabilities_export.py
   598 tests/test_dirs.py
   593 gptme/eval/run.py
   592 gptme/hooks/guardrails.py
   588 gptme/prompts/__init__.py
   585 tests/test_server_subscription_connect.py
   582 tests/test_tui_completion.py
   580 gptme/server/a2a_api.py
   578 tests/test_tools_request_tool_change.py
   578 tests/test_cli_resume.py
   576 tests/test_served_model_metadata.py
   571 gptme/tools/subagent/__init__.py
   567 scripts/github_ci_self_heal.py
   567 gptme/tools/computer_transport.py
   562 gptme/memory/store.py
   561 gptme/message.py
   554 tests/test_eval_subagent.py
   553 tests/test_server_conversation_metadata.py
   552 tests/test_script_hooks.py
   552 gptme/tools/subagent/hooks.py
   551 tests/test_memory_index_policy.py
   547 scripts/bench_conversation_workers.py
   546 tests/test_computer_actions.py
   543 tests/test_server_voice.py
   541 gptme/server/artifacts_api.py
   541 gptme/config/models.py
   540 tests/test_execenv.py
   539 tests/test_server_path_traversal.py
   538 tests/test_cc_memory.py
   537 tests/test_model_attestation.py
   534 tests/test_memory_migrate_knowledge.py
   534 tests/test_capabilities_export.py
   533 tests/test_reduce.py
   532 tests/test_checkpoint.py
   525 tests/test_server_restart_dangling_calls.py
   525 tests/test_hooks_cost_awareness.py
   525 gptme/tools/lessons.py
   524 tests/test_server_bad_input.py
   523 gptme/tools/todo.py
   518 gptme/hooks/registry.py
   514 tests/test_compaction_native_anthropic.py
   513 tests/test_skill_install_git.py
   510 gptme/tools/autocompact/hook.py
   508 tests/test_workspace_api.py
   506 gptme/server/workspace_api.py
   502 tests/test_conversations.py
   501 tests/test_subagent_worktree_isolation.py
   501 tests/test_provider_plugins.py
   496 gptme/dataset/trajectory_to_env.py
   492 tests/test_config_workspace_publication.py
   492 gptme/tools/patch_many.py
   491 gptme/tools/read.py
   490 gptme/config/chat.py
   489 tests/test_tools_save.py
   487 gptme/llm/llm_openai_models.py
   484 tests/test_hooks_cache_awareness.py
   482 tests/test_computer_demo_cmd.py
   479 tests/test_plugin_security.py
   478 gptme/logmanager/conversations.py
   477 tests/test_snapshot_command.py
   472 tests/test_work_snapshots.py
   472 gptme/hooks/tests/test_cost_awareness.py
   472 gptme/cli/cmd_hooks.py
   471 tests/test_chats_stats.py
   471 gptme/agent/workspace.py
   470 tests/test_tools_patch.py
   470 tests/test_llm_auth.py
   469 tests/test_llm_openai_sampling.py
   463 tests/test_wake_admission_matrix.py
   461 tests/test_server_skill_events.py
   461 tests/test_cli_from_turn.py
   456 tests/test_tools_time_awareness.py
   456 gptme/telemetry.py
   455 gptme/hooks/tests/test_time_awareness.py
   454 tests/test_tools_morph.py
   453 gptme/tools/autocompact/engine.py
   451 tests/test_llm_anthropic_stream_usage.py
   451 scripts/demo_capture.py
   451 scripts/check_rst_formatting.py
   450 tests/test_tools_browser_thread.py
   450 tests/test_lesson_hook_latency.py
   450 gptme/util/_telemetry.py
   447 gptme/plugins/security.py
   447 gptme/config/trust.py
   446 tests/test_tools_mcp.py
   446 gptme/tools/shell_flags.py
   445 tests/test_python_kernel_uv_interrupt.py
   445 scripts/analyze_compression.py
   445 gptme/server/voice_api.py
   444 tests/test_hooks_dirty_diff.py
   442 tests/test_tools_rag.py
   440 tests/test_python_kernel_raster.py
   438 tests/test_util_cli_providers.py
   437 tests/test_hybrid_lessons.py
   436 tests/test_server_v2_auto_stepping.py
   436 tests/test_computer_api.py
   436 gptme/lessons/auto_include.py
   433 tests/test_chats_clean_safety.py
   432 tests/test_compaction_measurement.py
   428 gptme/cli/cmd_init.py
   427 tests/test_lessons_selector.py
   427 gptme/workspace_snapshot.py
   427 gptme/tools/save.py
   427 gptme/cli/auth.py
   426 tests/test_lessons_matcher.py
   424 tests/test_cost_tracker.py
   424 gptme/llm/llm_grok_subscription.py
   423 tests/test_external_sessions.py
   423 gptme/util/cost_display.py
   422 tests/test_lessons_commands.py
   421 gptme/eval/dspy/prompt_optimizer.py
   419 gptme/agent/service.py
   418 tests/context/test_task_analyzer.py
   417 gptme/prompts/templates.py
   415 tests/test_server_artifacts.py
   414 tests/test_preview_proxy.py
   411 tests/test_python_conversation_isolation.py
   411 tests/test_profiles.py
   411 gptme/tools/restart.py
   410 tests/test_tui_child_review.py
   407 tests/test_tools_precommit_paths.py
   405 gptme/cli/onboard.py
   404 tests/test_llm_validate.py
   404 tests/test_llm_generation_recovery.py
   403 tests/test_issue_5199_storage.py
   403 tests/test_eval_trends.py
   400 gptme/cli/cmd_mcp.py
   399 gptme/eval/suites/subagent.py
   395 gptme/tools/shell_heredoc.py
   394 gptme/agent/cli.py
   393 tests/test_computer_latency_cmd.py
   393 scripts/eval_phase0_pruning.py
   393 gptme/sandbox.py
   392 gptme/init.py
   391 tests/test_mcp_dead_server.py
   391 tests/test_github_ci_self_heal.py
   391 gptme/agent/doctor.py
   390 tests/test_eval_claude_code.py
   389 tests/test_context_providers.py
   389 tests/test_chats_external_search.py
   388 tests/test_server_hostile_host_cwd.py
   388 tests/test_search_alias.py
   387 gptme/util/redact.py
   386 tests/test_util_cli_attest.py
   386 tests/test_tui_literal_thinking.py
   383 tests/test_computer_use_integration.py
   380 tests/test_util_export.py
   380 gptme/tools/_browser_lynx.py
   376 tests/test_skill_commands.py
   373 tests/test_chat_empty_final_reply.py
   373 gptme/checkpoint.py
   372 tests/test_anti_slop.py
   372 gptme/server/external_sessions.py
   371 gptme/mcp/oauth.py
   371 gptme/cli/cmd_status.py
   370 tests/test_server_v2_agents.py
   370 gptme/hooks/dirty_diff.py
   369 tests/test_subagent_writer_lock.py
   368 tests/test_lessons_emissions.py
   366 tests/test_tools_form.py
   365 tests/test_util_cli_skills.py
   365 tests/test_tools_convert_publication.py
   365 gptme/info.py
   365 gptme/hooks/tests/test_tool_target_instructions.py
   364 tests/test_computer_record.py
   364 gptme/eval/dspy/cli.py
   363 tests/test_replay.py
   363 gptme/lessons/hybrid_matcher.py
   362 tests/test_subscription_terminal_recovery.py
   361 tests/test_tui_work_acceptance.py
   357 tests/test_tui_work_unread.py
   357 gptme/server/cli.py
   355 gptme/eval/dspy/experiments.py
   353 tests/test_workspace_agents.py
   353 tests/test_complete.py
   352 tests/test_tui_recovery.py
   352 tests/test_config_encoding.py
   351 gptme/llm/local_discovery.py
   350 scripts/docs_structure.py
   350 gptme/eval/dspy/metrics.py
   349 tests/test_tools_gh_followthrough.py
   347 tests/test_dataset_history.py
   347 gptme/hooks/tests/test_confirm.py
   346 tests/test_browser_open_page_session.py
   346 tests/lessons/test_wildcard_matching.py
   345 gptme/lessons/parser.py
   344 gptme/tools/patch.py
   343 gptme/hooks/tests/test_elicitation.py
   342 gptme/tui/main.py
   342 gptme/hooks/anomaly_watchdog.py
   340 tests/test_hol_guard_shell_hook.py
   340 tests/test_context_selector.py
   340 tests/test_computer_semantic_fixtures.py
   338 tests/test_agent_doctor.py
   337 gptme/hooks/cost_awareness.py
   336 gptme/tui/child_view.py
   335 tests/test_tools_tmux_quoting.py
   334 tests/test_program_status.py
   333 gptme/server/preview_proxy_api.py
   332 gptme/eval/suites/constraint_satisfaction.py
   332 gptme/cli/cmd_knowledge.py
   331 tests/test_tools_vision.py
   331 tests/test_llm_anthropic_system_messages.py
   331 tests/test_chat_turn_boundary.py
   331 gptme/tools/rag.py
   331 gptme/eval/trends.py
   330 gptme/util/safety.py
   328 tests/test_minimax_models.py
   328 tests/test_hooks_server_confirm.py
   326 tests/test_util_output_storage.py
   326 scripts/treeofthoughts.py
   326 gptme/eval/suites/practical.py
   324 tests/test_block_budget.py
   322 tests/test_workspace_snapshot.py
   322 tests/test_util_tool_format.py
   322 tests/test_circuit_breaker.py
   322 gptme/hooks/agents_md_inject.py
   321 tests/test_util_safety.py
   321 tests/test_recovery_stream_overload.py
   321 tests/test_ephemeral.py
   320 gptme/hooks/tests/test_server_elicit.py
   318 gptme/util/reduce.py
   318 gptme/hooks/time_awareness.py
   317 tests/test_util_cli_batch.py
   317 gptme/eval/suites/practical16.py
   316 tests/test_custom_providers.py
   316 gptme/llm/recovery.py
   315 tests/test_responses_stream_errors.py
   315 tests/test_openai_responses_input.py
   315 gptme/tools/precommit.py
   314 tests/test_eval_swebench.py
   313 gptme/tools/_browser_thread.py
   312 tests/test_skill_metrics.py
   312 tests/test_plugins.py
   312 gptme/commands/llm.py
   311 gptme/server/auth.py
   308 tests/test_browser.py
   307 gptme/util/output_storage.py
   307 gptme/attestation.py
   305 tests/test_hooks_knowledge_inject.py
   304 tests/test_tool_use.py
   304 tests/test_tool_memory_native.py
   304 tests/test_llm_request_limits.py
   303 tests/test_release_preflight.py
   303 gptme/llm/validate.py
   301 tests/test_tools_todo.py
   301 tests/test_tools_convert_tiff.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.4.3
Clone found (python)
 - __init__.py [34:47 - 45:30] (12 lines, 54 tokens)
   context/__init__.py [36:55 - 47:30]
Clone found (python)
 - __init__.py [34:47 - 45:30] (12 lines, 54 tokens)
   context/selector/__init__.py [46:61 - 57:30]
Clone found (python)
 - acp/agent.py [674:13 - 683:14] (10 lines, 58 tokens)
   acp/agent.py [1660:17 - 1669:18]
Clone found (python)
 - acp/client.py [239:9 - 246:9] (8 lines, 85 tokens)
   acp/client.py [459:5 - 466:5]
Clone found (python)
 - agent/cli.py [97:6 - 120:4] (24 lines, 84 tokens)
   cli/cmd_agents.py [76:8 - 99:4]
Clone found (python)
 - chat.py [1466:5 - 1483:36] (18 lines, 103 tokens)
   tui/app.py [3714:9 - 3731:40]
Clone found (python)
 - cli/argparse_completion.py [207:55 - 219:3] (13 lines, 57 tokens)
   cli/argparse_completion.py [256:68 - 268:3]
Clone found (python)
 - cli/auth.py [382:5 - 398:60] (17 lines, 90 tokens)
   llm/llm_grok_subscription.py [361:5 - 376:60]
Clone found (python)
 - cli/auth.py [401:5 - 419:76] (19 lines, 108 tokens)
   llm/llm_grok_subscription.py [382:5 - 399:81]
Clone found (python)
 - cli/auth.py [425:40 - 433:86] (9 lines, 54 tokens)
   llm/llm_grok_subscription.py [405:58 - 413:86]
Clone found (python)
 - cli/auth.py [471:9 - 484:18] (14 lines, 58 tokens)
   llm/llm_grok_subscription.py [457:5 - 470:14]
Clone found (python)
 - cli/cmd_batch.py [45:67 - 58:17] (14 lines, 74 tokens)
   cli/main.py [279:77 - 292:17]
Clone found (python)
 - cli/cmd_batch.py [139:5 - 152:39] (14 lines, 54 tokens)
   cli/cmd_review_watch.py [582:5 - 595:39]
Clone found (python)
 - cli/cmd_batch.py [152:37 - 166:38] (15 lines, 61 tokens)
   cli/cmd_review_watch.py [597:45 - 611:38]
Clone found (python)
 - cli/cmd_chats.py [77:22 - 89:15] (13 lines, 67 tokens)
   cli/cmd_chats.py [117:24 - 129:15]
Clone found (python)
 - cli/cmd_dataset.py [40:25 - 60:13] (21 lines, 92 tokens)
   cli/cmd_dataset.py [101:26 - 121:13]
Clone found (python)
 - cli/cmd_init.py [63:1 - 74:61] (12 lines, 70 tokens)
   cli/cmd_service.py [317:1 - 328:61]
Clone found (python)
 - cli/cmd_mcp.py [417:21 - 445:4] (29 lines, 111 tokens)
   cli/cmd_mcp_serve.py [14:28 - 42:4]
Clone found (python)
 - cli/cmd_mcp.py [473:5 - 488:24] (16 lines, 83 tokens)
   cli/cmd_mcp_serve.py [73:5 - 88:24]
Clone found (python)
 - cli/cmd_review_watch.py [101:5 - 112:14] (12 lines, 87 tokens)
   cli/cmd_review_watch.py [134:5 - 145:14]
Clone found (python)
 - cli/cmd_review_watch.py [863:86 - 877:80] (15 lines, 55 tokens)
   cli/cmd_review_watch.py [1030:64 - 1048:33]
Clone found (python)
 - cli/doctor.py [688:37 - 703:40] (16 lines, 60 tokens)
   cli/doctor.py [710:47 - 725:40]
Clone found (python)
 - cli/util.py [553:5 - 570:49] (18 lines, 68 tokens)
   cli/util.py [593:5 - 610:49]
Clone found (python)
 - cli/util.py [2127:9 - 2134:72] (8 lines, 54 tokens)
   cli/util.py [2160:5 - 2167:68]
Clone found (python)
 - commands/meta.py [169:9 - 177:49] (9 lines, 58 tokens)
   commands/meta.py [218:9 - 226:49]
Clone found (python)
 - config/chat.py [66:10 - 85:4] (20 lines, 132 tokens)
   tools/autocompact/events.py [59:23 - 78:4]
Clone found (python)
 - config/chat.py [70:13 - 85:4] (16 lines, 100 tokens)
   logmanager/eventlog.py [102:13 - 117:4]
Clone found (python)
 - context/__init__.py [40:16 - 49:75] (10 lines, 57 tokens)
   context/selector/__init__.py [50:16 - 59:75]
Clone found (python)
 - context/adaptive_compressor.py [56:1 - 69:23] (14 lines, 92 tokens)
   tools/autocompact/scoring.py [295:1 - 308:23]
Clone found (python)
 - context/adaptive_compressor.py [175:1 - 186:79] (12 lines, 53 tokens)
   tools/autocompact/scoring.py [405:61 - 416:79]
Clone found (python)
 - eval/agents/swebench.py [110:9 - 116:86] (7 lines, 60 tokens)
   eval/agents/swebench.py [134:13 - 142:14]
Clone found (python)
 - eval/dspy/cli.py [78:1 - 92:2] (15 lines, 79 tokens)
   eval/dspy/cli.py [316:66 - 330:2]
Clone found (python)
 - eval/dspy/cli.py [160:9 - 176:15] (17 lines, 57 tokens)
   eval/dspy/cli.py [423:45 - 439:15]
Clone found (python)
 - eval/dspy/cli.py [187:13 - 192:51] (6 lines, 58 tokens)
   eval/dspy/cli.py [450:13 - 455:51]
Clone found (python)
 - eval/execenv.py [194:9 - 215:62] (22 lines, 63 tokens)
   eval/execenv.py [800:9 - 821:62]
Clone found (python)
 - eval/execenv.py [221:13 - 234:11] (14 lines, 59 tokens)
   eval/execenv.py [826:13 - 839:11]
Clone found (python)
 - eval/execenv.py [221:13 - 234:11] (14 lines, 59 tokens)
   eval/execenv.py [1036:13 - 1049:11]
Clone found (python)
 - eval/execenv.py [251:57 - 262:33] (12 lines, 94 tokens)
   eval/filestore.py [59:60 - 70:33]
Clone found (python)
 - eval/execenv.py [678:5 - 697:22] (20 lines, 137 tokens)
   eval/execenv.py [903:5 - 922:22]
Clone found (python)
 - eval/execenv.py [713:17 - 732:29] (20 lines, 82 tokens)
   eval/execenv.py [933:17 - 952:29]
Clone found (python)
 - eval/execenv.py [828:35 - 845:16] (18 lines, 82 tokens)
   eval/execenv.py [1038:35 - 1055:16]
Clone found (python)
 - eval/leaderboard.py [248:5 - 254:46] (7 lines, 61 tokens)
   eval/leaderboard.py [729:5 - 735:85]
Clone found (python)
 - eval/leaderboard.py [344:28 - 359:28] (16 lines, 63 tokens)
   eval/leaderboard.py [404:68 - 419:28]
Clone found (python)
 - eval/leaderboard.py [501:3 - 507:27] (7 lines, 82 tokens)
   eval/leaderboard.py [875:3 - 881:27]
Clone found (python)
 - eval/leaderboard.py [501:3 - 507:27] (7 lines, 82 tokens)
   eval/leaderboard.py [1191:3 - 1197:27]
Clone found (python)
 - eval/suites/behavioral/add_feature_preserve_default.py [61:5 - 79:17] (19 lines, 102 tokens)
   eval/suites/behavioral/minimal_feature_preserve_default_with_decoys.py [112:5 - 130:17]
Clone found (python)
 - eval/suites/behavioral/add_feature_preserve_default.py [83:43 - 131:5] (49 lines, 230 tokens)
   eval/suites/behavioral/minimal_feature_preserve_default_with_decoys.py [162:59 - 210:5]
Clone found (python)
 - eval/suites/behavioral/add_type_hints.py [19:62 - 27:44] (9 lines, 59 tokens)
   eval/suites/behavioral/add_type_hints.py [41:70 - 49:44]
Clone found (python)
 - eval/suites/behavioral/add_type_hints.py [19:62 - 27:33] (9 lines, 58 tokens)
   eval/suites/behavioral/add_type_hints.py [82:71 - 90:33]
Clone found (python)
 - eval/suites/behavioral/add_type_hints.py [42:43 - 49:69] (8 lines, 55 tokens)
   eval/suites/behavioral/fix_mutable_default.py [28:41 - 35:69]
Clone found (python)
 - eval/suites/behavioral/circuit_breaker.py [1:42 - 19:4] (19 lines, 68 tokens)
   eval/suites/behavioral/rate_limiting.py [1:40 - 19:4]
Clone found (python)
 - eval/suites/behavioral/circuit_breaker.py [91:51 - 111:44] (21 lines, 121 tokens)
   eval/suites/behavioral/rate_limiting.py [82:49 - 102:44]
Clone found (python)
 - eval/suites/behavioral/circuit_breaker.py [125:1 - 138:4] (14 lines, 73 tokens)
   eval/suites/behavioral/rate_limiting.py [117:1 - 130:4]
Clone found (python)
 - eval/suites/behavioral/circuit_breaker.py [170:46 - 178:68] (9 lines, 58 tokens)
   eval/suites/behavioral/circuit_breaker.py [208:27 - 216:68]
Clone found (python)
 - eval/suites/behavioral/implement_event_emitter.py [53:74 - 61:72] (9 lines, 69 tokens)
   eval/suites/behavioral/implement_event_emitter.py [67:82 - 75:72]
Clone found (python)
 - eval/suites/behavioral/implement_event_emitter.py [53:74 - 61:72] (9 lines, 69 tokens)
   eval/suites/behavioral/implement_event_emitter.py [84:77 - 92:72]
Clone found (python)
 - eval/suites/behavioral/implement_priority_queue.py [31:46 - 38:30] (8 lines, 50 tokens)
   eval/suites/behavioral/implement_priority_queue.py [44:45 - 51:30]
Clone found (python)
 - eval/suites/behavioral/root_cause_pipeline_debug.py [176:10 - 181:6] (6 lines, 59 tokens)
   eval/suites/behavioral/root_cause_pipeline_debug.py [214:12 - 219:6]
Clone found (python)
 - eval/suites/practical.py [26:63 - 33:40] (8 lines, 50 tokens)
   eval/suites/practical.py [44:57 - 51:40]
Clone found (python)
 - eval/suites/practical.py [26:63 - 33:40] (8 lines, 50 tokens)
   eval/suites/practical.py [59:71 - 66:40]
Clone found (python)
 - hooks/_secret_reach.py [405:20 - 419:64] (15 lines, 73 tokens)
   hooks/_secret_reach.py [474:22 - 488:64]
Clone found (python)
 - hooks/_secret_reach.py [405:20 - 419:64] (15 lines, 73 tokens)
   hooks/_secret_reach.py [605:24 - 619:64]
Clone found (python)
 - hooks/anomaly_watchdog.py [611:66 - 618:36] (8 lines, 78 tokens)
   hooks/aw_watcher_agent.py [252:69 - 259:36]
Clone found (python)
 - hooks/anomaly_watchdog.py [642:53 - 651:10] (10 lines, 50 tokens)
   hooks/aw_watcher_agent.py [275:48 - 284:10]
Clone found (python)
 - hooks/dirty_diff.py [95:5 - 106:4] (12 lines, 59 tokens)
   hooks/knowledge_inject.py [86:5 - 97:4]
Clone found (python)
 - hooks/dirty_diff.py [111:9 - 119:36] (9 lines, 54 tokens)
   hooks/knowledge_inject.py [43:9 - 51:36]
Clone found (python)
 - hooks/dirty_diff.py [456:22 - 463:7] (8 lines, 55 tokens)
   hooks/knowledge_inject.py [97:29 - 104:7]
Clone found (python)
 - hooks/guardrails.py [601:38 - 607:38] (7 lines, 54 tokens)
   tools/python.py [530:30 - 536:38]
Clone found (python)
 - hooks/registry.py [129:9 - 135:91] (7 lines, 64 tokens)
   hooks/registry.py [664:5 - 670:87]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [77:9 - 86:34] (10 lines, 56 tokens)
   hooks/tests/test_agents_md_inject.py [146:9 - 155:34]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [171:74 - 186:35] (16 lines, 68 tokens)
   hooks/tests/test_agents_md_inject.py [206:46 - 221:35]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [171:74 - 186:40] (16 lines, 71 tokens)
   hooks/tests/test_agents_md_inject.py [254:55 - 269:40]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [171:74 - 185:68] (15 lines, 62 tokens)
   hooks/tests/test_agents_md_inject.py [278:54 - 293:58]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [171:74 - 186:40] (16 lines, 71 tokens)
   hooks/tests/test_agents_md_inject.py [304:48 - 319:40]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [261:21 - 270:19] (10 lines, 50 tokens)
   hooks/tests/test_agents_md_inject.py [311:21 - 320:19]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [350:68 - 365:35] (16 lines, 71 tokens)
   hooks/tests/test_agents_md_inject.py [387:44 - 402:35]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [577:57 - 585:8] (9 lines, 54 tokens)
   hooks/tests/test_agents_md_inject.py [591:38 - 600:8]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [825:42 - 832:61] (8 lines, 52 tokens)
   hooks/tests/test_agents_md_inject.py [1399:41 - 1406:61]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [877:42 - 887:8] (11 lines, 62 tokens)
   hooks/tests/test_agents_md_inject.py [1239:41 - 1249:8]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [1268:25 - 1280:8] (13 lines, 74 tokens)
   hooks/tests/test_agents_md_inject.py [1318:66 - 1330:8]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [1294:59 - 1307:8] (14 lines, 79 tokens)
   hooks/tests/test_agents_md_inject.py [1340:55 - 1353:8]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [1317:64 - 1327:15] (11 lines, 57 tokens)
   hooks/tests/test_agents_md_inject.py [1468:37 - 1478:15]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [1318:65 - 1330:8] (13 lines, 75 tokens)
   hooks/tests/test_agents_md_inject.py [1427:41 - 1439:8]
Clone found (python)
 - hooks/tests/test_agents_md_inject.py [1417:70 - 1425:67] (9 lines, 63 tokens)
   hooks/tests/test_agents_md_inject.py [1442:71 - 1450:67]
Clone found (python)
 - hooks/tests/test_anomaly_watchdog.py [781:47 - 786:49] (6 lines, 50 tokens)
   hooks/tests/test_anomaly_watchdog.py [791:38 - 796:49]
Clone found (python)
 - hooks/tests/test_confirm.py [421:48 - 431:13] (11 lines, 57 tokens)
   hooks/tests/test_confirm.py [443:55 - 453:13]
Clone found (python)
 - hooks/tests/test_cost_awareness.py [363:78 - 377:29] (15 lines, 56 tokens)
   hooks/tests/test_cost_awareness.py [395:76 - 409:29]
Clone found (python)
 - hooks/tests/test_cost_awareness.py [484:72 - 501:46] (18 lines, 62 tokens)
   hooks/tests/test_cost_awareness.py [507:82 - 524:46]
Clone found (python)
 - hooks/tests/test_server_confirm.py [254:35 - 269:6] (16 lines, 84 tokens)
   hooks/tests/test_server_elicit.py [271:35 - 286:6]
Clone found (python)
 - hooks/tests/test_server_elicit.py [198:38 - 217:22] (20 lines, 75 tokens)
   hooks/tests/test_server_elicit.py [362:9 - 381:22]
Clone found (python)
 - hooks/tests/test_time_awareness.py [147:36 - 153:21] (7 lines, 52 tokens)
   hooks/tests/test_time_awareness.py [165:32 - 171:21]
Clone found (python)
 - hooks/tests/test_time_awareness.py [147:36 - 153:21] (7 lines, 52 tokens)
   hooks/tests/test_time_awareness.py [179:31 - 185:21]
Clone found (python)
 - hooks/tests/test_time_awareness.py [381:88 - 387:64] (7 lines, 56 tokens)
   hooks/tests/test_time_awareness.py [575:89 - 581:64]
Clone found (python)
 - hooks/tests/test_time_awareness.py [509:28 - 515:76] (7 lines, 52 tokens)
   hooks/tests/test_time_awareness.py [544:71 - 550:12]
Clone found (python)
 - hooks/tests/test_tool_target_instructions.py [132:43 - 140:62] (9 lines, 55 tokens)
   hooks/tests/test_tool_target_instructions.py [268:36 - 278:38]
Clone found (python)
 - hooks/tests/test_tool_target_instructions.py [134:31 - 141:25] (8 lines, 53 tokens)
   hooks/tests/test_tool_target_instructions.py [157:32 - 164:25]
Clone found (python)
 - hooks/tests/test_workspace_agents.py [296:9 - 316:58] (21 lines, 124 tokens)
   hooks/tests/test_workspace_agents.py [341:9 - 361:58]
Clone found (python)
 - hooks/tests/test_workspace_agents.py [733:13 - 745:44] (13 lines, 57 tokens)
   hooks/tests/test_workspace_agents.py [999:13 - 1011:44]
Clone found (python)
 - init.py [368:5 - 373:6] (6 lines, 52 tokens)
   model_attestation.py [310:5 - 315:6]
Clone found (python)
 - knowledge.py [275:5 - 282:14] (8 lines, 63 tokens)
   knowledge.py [316:5 - 323:14]
Clone found (python)
 - llm/__init__.py [453:21 - 459:32] (7 lines, 67 tokens)
   llm/__init__.py [950:21 - 956:32]
Clone found (python)
 - llm/__init__.py [647:19 - 655:5] (9 lines, 56 tokens)
   llm/__init__.py [820:12 - 828:5]
Clone found (python)
 - llm/__init__.py [678:9 - 704:17] (27 lines, 102 tokens)
   llm/__init__.py [851:69 - 877:17]
Clone found (python)
 - llm/llm_anthropic.py [269:29 - 286:68] (18 lines, 77 tokens)
   llm/llm_openai.py [375:30 - 392:68]
Clone found (python)
 - llm/llm_anthropic.py [652:5 - 669:21] (18 lines, 61 tokens)
   llm/llm_openai.py [993:5 - 1011:21]
Clone found (python)
 - llm/llm_anthropic.py [798:13 - 816:30] (19 lines, 63 tokens)
   llm/llm_openai.py [1207:45 - 1225:30]
Clone found (python)
 - llm/llm_anthropic.py [1016:9 - 1023:32] (8 lines, 56 tokens)
   llm/llm_anthropic.py [1160:11 - 1167:32]
Clone found (python)
 - llm/llm_anthropic.py [1017:5 - 1023:32] (7 lines, 55 tokens)
   llm/llm_anthropic.py [1193:5 - 1199:32]
Clone found (python)
 - llm/llm_anthropic.py [1040:5 - 1075:6] (36 lines, 161 tokens)
   llm/llm_anthropic.py [1224:5 - 1259:6]
Clone found (python)
 - llm/llm_anthropic.py [1161:28 - 1170:51] (10 lines, 77 tokens)
   llm/llm_anthropic.py [1193:28 - 1202:51]
Clone found (python)
 - llm/llm_anthropic_models_deprecated.py [37:31 - 48:7] (12 lines, 59 tokens)
   llm/llm_anthropic_models_deprecated.py [50:29 - 61:7]
Clone found (python)
 - llm/llm_grok_subscription.py [296:63 - 310:14] (15 lines, 51 tokens)
   llm/llm_openai_subscription.py [426:50 - 439:27]
Clone found (python)
 - llm/llm_grok_subscription.py [340:36 - 346:75] (7 lines, 53 tokens)
   llm/llm_openrouter_subscription.py [67:74 - 73:75]
Clone found (python)
 - llm/llm_mock.py [49:9 - 57:5] (9 lines, 55 tokens)
   llm/llm_mock.py [62:11 - 70:5]
Clone found (python)
 - llm/llm_openai.py [1307:9 - 1315:5] (9 lines, 52 tokens)
   llm/llm_openai.py [2077:11 - 2085:5]
Clone found (python)
 - llm/llm_openai.py [1308:5 - 1315:5] (8 lines, 51 tokens)
   llm/llm_openai.py [2131:5 - 2138:5]
Clone found (python)
 - llm/llm_openai.py [1436:5 - 1453:82] (18 lines, 111 tokens)
   llm/llm_openai.py [2169:5 - 2185:82]
Clone found (python)
 - llm/llm_openai.py [1489:67 - 1506:14] (18 lines, 58 tokens)
   llm/llm_openai.py [2257:13 - 2276:18]
Clone found (python)
 - llm/llm_openai.py [2078:15 - 2086:18] (9 lines, 63 tokens)
   llm/llm_openai.py [2131:15 - 2139:18]
Clone found (python)
 - llm/llm_openai.py [3041:48 - 3048:52] (8 lines, 50 tokens)
   llm/llm_openai.py [3054:32 - 3061:52]
Clone found (python)
 - llm/llm_openai_models.py [417:20 - 426:7] (10 lines, 51 tokens)
   llm/llm_openai_models.py [436:14 - 445:7]
Clone found (python)
 - llm/llm_openai_models.py [417:20 - 426:7] (10 lines, 51 tokens)
   llm/llm_openai_models.py [447:20 - 456:7]
Clone found (python)
 - llm/llm_openai_models.py [458:24 - 467:7] (10 lines, 51 tokens)
   llm/llm_openai_models.py [469:20 - 478:7]
Clone found (python)
 - llm/llm_openai_models.py [458:24 - 467:7] (10 lines, 51 tokens)
   llm/llm_openai_models.py [491:14 - 500:7]
Clone found (python)
 - llm/models/data.py [206:26 - 219:15] (14 lines, 58 tokens)
   llm/models/data.py [221:26 - 234:15]
Clone found (python)
 - llm/openai_responses.py [631:29 - 636:59] (6 lines, 54 tokens)
   llm/openai_responses.py [725:35 - 730:59]
Clone found (python)
 - llm/validate.py [299:9 - 309:4] (11 lines, 55 tokens)
   llm/validate.py [367:9 - 377:4]
Clone found (python)
 - llm/validate.py [361:48 - 377:4] (17 lines, 78 tokens)
   llm/validate.py [380:45 - 396:4]
Clone found (python)
 - llm/validate.py [361:48 - 374:64] (14 lines, 77 tokens)
   llm/validate.py [399:37 - 412:64]
Clone found (python)
 - logmanager/manager.py [860:13 - 865:18] (6 lines, 60 tokens)
   logmanager/manager.py [873:13 - 878:18]
Clone found (python)
 - logmanager/manager.py [1130:9 - 1135:14] (6 lines, 56 tokens)
   logmanager/manager.py [1615:13 - 1620:14]
Clone found (python)
 - mcp/oauth.py [119:52 - 135:68] (17 lines, 127 tokens)
   memory/store.py [171:38 - 187:68]
Clone found (python)
 - message.py [717:19 - 723:52] (7 lines, 56 tokens)
   message.py [994:16 - 1000:52]
Clone found (python)
 - plugins/__init__.py [481:5 - 506:4] (26 lines, 110 tokens)
   util/install.py [14:5 - 39:4]
Clone found (python)
 - prompts/__init__.py [453:21 - 465:39] (13 lines, 91 tokens)
   prompts/__init__.py [576:15 - 588:39]
Clone found (python)
 - prompts/__init__.py [469:5 - 486:6] (18 lines, 73 tokens)
   prompts/__init__.py [653:5 - 670:6]
Clone found (python)
 - server/api_v2.py [1564:84 - 1582:4] (19 lines, 69 tokens)
   server/api_v2.py [1616:5 - 1634:4]
Clone found (python)
 - server/api_v2.py [1584:5 - 1600:15] (17 lines, 118 tokens)
   server/api_v2.py [1655:5 - 1671:15]
Clone found (python)
 - server/api_v2.py [2364:5 - 2371:76] (8 lines, 61 tokens)
   server/api_v2.py [3526:5 - 3533:76]
Clone found (python)
 - server/api_v2.py [2401:5 - 2413:14] (13 lines, 59 tokens)
   server/api_v2.py [3035:5 - 3047:14]
Clone found (python)
 - server/api_v2.py [2585:118 - 2600:11] (16 lines, 54 tokens)
   server/api_v2.py [2750:97 - 2765:11]
Clone found (python)
 - server/api_v2.py [2645:5 - 2664:40] (20 lines, 79 tokens)
   server/api_v2.py [2779:5 - 2799:30]
Clone found (python)
 - server/api_v2.py [2664:86 - 2683:14] (20 lines, 80 tokens)
   server/api_v2.py [2799:78 - 2819:14]
Clone found (python)
 - server/api_v2.py [2900:5 - 2911:10] (12 lines, 61 tokens)
   server/api_v2.py [2927:9 - 2940:14]
Clone found (python)
 - server/api_v2.py [3043:31 - 3056:30] (14 lines, 51 tokens)
   server/api_v2.py [3592:33 - 3605:30]
Clone found (python)
 - server/api_v2.py [3832:58 - 3845:38] (14 lines, 94 tokens)
   server/api_v2.py [3868:51 - 3881:38]
Clone found (python)
 - server/api_v2.py [3836:5 - 3845:38] (10 lines, 73 tokens)
   server/api_v2.py [4501:5 - 4510:38]
Clone found (python)
 - server/api_v2.py [3873:74 - 3884:15] (12 lines, 54 tokens)
   server/api_v2.py [4502:74 - 4513:15]
Clone found (python)
 - server/api_v2.py [3987:53 - 3992:76] (6 lines, 51 tokens)
   server/api_v2.py [4086:52 - 4091:76]
Clone found (python)
 - server/api_v2.py [3987:53 - 3994:40] (8 lines, 59 tokens)
   server/api_v2.py [4368:64 - 4375:40]
Clone found (python)
 - server/api_v2.py [3987:53 - 3992:76] (6 lines, 51 tokens)
   server/api_v2.py [4436:50 - 4441:76]
Clone found (python)
 - server/api_v2.py [3987:53 - 3992:76] (6 lines, 51 tokens)
   server/api_v2.py [4541:54 - 4546:76]
Clone found (python)
 - server/api_v2.py [3987:53 - 3992:76] (6 lines, 51 tokens)
   server/api_v2.py [4590:54 - 4595:76]
Clone found (python)
 - server/api_v2.py [3988:14 - 3995:12] (8 lines, 57 tokens)
   server/api_v2.py [4369:14 - 4376:7]
Clone found (python)
 - server/api_v2_agents.py [59:5 - 65:15] (7 lines, 52 tokens)
   server/tasks_api.py [746:5 - 752:7]
Clone found (python)
 - server/api_v2_sessions.py [515:96 - 527:81] (13 lines, 74 tokens)
   server/api_v2_sessions.py [1695:60 - 1707:81]
Clone found (python)
 - server/api_v2_sessions.py [531:5 - 542:15] (12 lines, 51 tokens)
   server/api_v2_sessions.py [949:9 - 960:19]
Clone found (python)
 - server/api_v2_sessions.py [945:9 - 960:19] (16 lines, 79 tokens)
   server/api_v2_sessions.py [1705:5 - 1720:15]
Clone found (python)
 - server/api_v2_sessions.py [946:27 - 960:19] (15 lines, 67 tokens)
   server/api_v2_sessions.py [1242:19 - 1256:15]
Clone found (python)
 - server/session_models.py [734:9 - 741:33] (8 lines, 54 tokens)
   server/session_models.py [901:9 - 908:33]
Clone found (python)
 - server/session_models.py [1088:25 - 1101:46] (14 lines, 84 tokens)
   server/session_models.py [1155:29 - 1168:42]
Clone found (python)
 - server/session_models.py [1122:25 - 1140:8] (19 lines, 70 tokens)
   server/session_models.py [1187:21 - 1205:8]
Clone found (python)
 - server/tasks_api.py [505:73 - 514:64] (10 lines, 53 tokens)
   server/tasks_api.py [518:51 - 527:64]
Clone found (python)
 - server/workspace_api.py [56:68 - 63:6] (8 lines, 63 tokens)
   server/workspace_api.py [77:5 - 84:6]
Clone found (python)
 - server/workspace_api.py [367:74 - 376:26] (10 lines, 73 tokens)
   server/workspace_api.py [642:77 - 651:26]
Clone found (python)
 - server/workspace_api.py [367:74 - 376:26] (10 lines, 73 tokens)
   server/workspace_api.py [709:9 - 718:26]
Clone found (python)
 - server/workspace_api.py [593:9 - 613:67] (21 lines, 149 tokens)
   server/workspace_api.py [681:9 - 701:67]
Clone found (python)
 - telemetry.py [66:24 - 88:8] (23 lines, 135 tokens)
   util/_telemetry.py [327:34 - 349:8]
Clone found (python)
 - telemetry.py [119:9 - 128:45] (10 lines, 60 tokens)
   telemetry.py [597:5 - 606:41]
Clone found (python)
 - tools/_browser_playwright.py [1046:9 - 1061:8] (16 lines, 89 tokens)
   tools/browser.py [1225:9 - 1240:8]
Clone found (python)
 - tools/_browser_playwright.py [1063:60 - 1075:52] (13 lines, 95 tokens)
   tools/browser.py [1139:68 - 1151:52]
Clone found (python)
 - tools/_browser_playwright.py [1197:69 - 1210:27] (14 lines, 77 tokens)
   tools/browser.py [1323:44 - 1336:27]
Clone found (python)
 - tools/_browser_playwright.py [1385:1 - 1400:43] (16 lines, 61 tokens)
   tools/browser.py [1450:1 - 1465:43]
Clone found (python)
 - tools/autocompact/engine.py [583:13 - 591:18] (9 lines, 59 tokens)
   tools/autocompact/engine.py [631:17 - 641:22]
Clone found (python)
 - tools/autocompact/resume.py [1250:9 - 1256:64] (7 lines, 57 tokens)
   tools/autocompact/resume.py [1469:13 - 1475:68]
Clone found (python)
 - tools/autocompact/resume.py [1266:5 - 1280:25] (15 lines, 87 tokens)
   tools/autocompact/resume.py [1499:9 - 1514:29]
Clone found (python)
 - tools/browser.py [492:38 - 506:29] (15 lines, 64 tokens)
   tools/mcp_adapter.py [166:34 - 180:29]
Clone found (python)
 - tools/clarify.py [45:5 - 60:31] (16 lines, 83 tokens)
   tools/complete.py [527:5 - 542:31]
Clone found (python)
 - tools/complete.py [811:5 - 819:15] (9 lines, 50 tokens)
   tools/complete.py [896:5 - 904:15]
Clone found (python)
 - tools/computer.py [1490:13 - 1507:14] (18 lines, 71 tokens)
   tools/computer.py [1879:13 - 1896:14]
Clone found (python)
 - tools/computer.py [1636:13 - 1655:37] (20 lines, 93 tokens)
   tools/computer_transport.py [262:13 - 281:37]
Clone found (python)
 - tools/computer.py [1668:53 - 1679:30] (12 lines, 52 tokens)
   tools/computer.py [1695:49 - 1706:30]
Clone found (python)
 - tools/computer.py [1755:9 - 1764:19] (10 lines, 50 tokens)
   tools/computer.py [1849:9 - 1858:19]
Clone found (python)
 - tools/convert.py [612:19 - 627:35] (16 lines, 70 tokens)
   tools/convert.py [1121:18 - 1136:35]
Clone found (python)
 - tools/convert.py [613:9 - 626:73] (14 lines, 64 tokens)
   tools/convert.py [940:34 - 953:73]
Clone found (python)
 - tools/convert.py [615:5 - 627:35] (13 lines, 68 tokens)
   tools/convert.py [798:5 - 810:35]
Clone found (python)
 - tools/patch.py [18:1 - 28:14] (11 lines, 53 tokens)
   tools/save.py [12:1 - 22:14]
Clone found (python)
 - tools/python_kernel.py [1080:36 - 1087:53] (8 lines, 57 tokens)
   tools/python_kernel.py [1110:24 - 1117:53]
Clone found (python)
 - tools/save.py [199:5 - 212:34] (14 lines, 50 tokens)
   tools/save.py [330:5 - 343:34]
Clone found (python)
 - tools/shell.py [486:5 - 500:4] (15 lines, 72 tokens)
   tools/shell_background.py [120:5 - 134:4]
Clone found (python)
 - tools/shell.py [607:71 - 628:4] (22 lines, 95 tokens)
   tools/subagent/execution.py [1548:75 - 1569:4]
Clone found (python)
 - tools/shell.py [1486:29 - 1500:11] (15 lines, 76 tokens)
   tools/shell.py [1918:26 - 1932:11]
Clone found (python)
 - tools/shell.py [1624:21 - 1633:40] (10 lines, 50 tokens)
   tools/shell.py [1709:29 - 1718:48]
Clone found (python)
 - tools/shell.py [1624:21 - 1643:26] (20 lines, 94 tokens)
   tools/shell.py [1739:25 - 1758:30]
Clone found (python)
 - tools/shell.py [1624:21 - 1643:26] (20 lines, 94 tokens)
   tools/shell.py [1795:25 - 1814:30]
Clone found (python)
 - tools/shell.py [1625:25 - 1645:39] (21 lines, 103 tokens)
   tools/shell.py [1768:25 - 1788:39]
Clone found (python)
 - tools/shell.py [1632:69 - 1646:27] (15 lines, 64 tokens)
   tools/shell.py [1775:69 - 1789:31]
Clone found (python)
 - tools/shell.py [1738:64 - 1758:30] (21 lines, 95 tokens)
   tools/shell.py [1842:39 - 1862:26]
Clone found (python)
 - tools/shell.py [1747:73 - 1760:25] (14 lines, 53 tokens)
   tools/shell.py [1803:73 - 1816:25]
Clone found (python)
 - tools/shell.py [2830:5 - 2840:31] (11 lines, 55 tokens)
   tools/shell.py [2883:5 - 2893:31]
Clone found (python)
 - tools/subagent/api.py [1731:9 - 1740:32] (10 lines, 59 tokens)
   tools/subagent/api.py [1757:9 - 1766:32]
Clone found (python)
 - tools/subagent/batch.py [517:33 - 530:5] (14 lines, 90 tokens)
   tools/subagent/batch.py [1129:25 - 1142:5]
Clone found (python)
 - tools/subagent/batch.py [554:53 - 564:43] (11 lines, 118 tokens)
   tools/subagent/batch.py [688:54 - 698:43]
Clone found (python)
 - tools/subagent/batch.py [559:27 - 564:81] (6 lines, 72 tokens)
   tools/subagent/batch.py [1172:81 - 1177:81]
Clone found (python)
 - tools/subagent/batch.py [832:13 - 847:14] (16 lines, 59 tokens)
   tools/subagent/batch.py [958:13 - 973:14]
Clone found (python)
 - tools/subagent/hooks.py [520:30 - 528:7] (9 lines, 52 tokens)
   tools/subagent/hooks.py [586:35 - 594:7]
Clone found (python)
 - tools/watch.py [551:9 - 556:26] (6 lines, 55 tokens)
   tools/watch.py [679:9 - 684:27]
Clone found (python)
 - tui/app.py [711:69 - 717:21] (7 lines, 54 tokens)
   tui/app.py [761:73 - 767:21]
Clone found (python)
 - tui/app.py [731:41 - 738:15] (8 lines, 83 tokens)
   tui/app.py [745:38 - 752:15]
Clone found (python)
 - tui/app.py [5701:53 - 5710:23] (10 lines, 51 tokens)
   tui/app.py [5755:42 - 5764:23]
Clone found (python)
 - util/_sound_sounddevice.py [61:46 - 72:56] (12 lines, 73 tokens)
   util/_sound_sounddevice.py [102:46 - 113:56]
Clone found (python)
 - util/gh.py [609:28 - 618:23] (10 lines, 51 tokens)
   util/gh.py [1489:13 - 1498:23]
Clone found (python)
 - util/gh.py [1473:17 - 1487:7] (15 lines, 55 tokens)
   util/gh.py [1577:14 - 1591:7]
Clone found (python)
 - util/output_storage.py [286:5 - 291:49] (6 lines, 69 tokens)
   util/output_storage.py [353:9 - 358:53]
Clone found (python)
 - util/redact.py [32:9 - 45:9] (14 lines, 73 tokens)
   util/redact.py [139:9 - 147:9]
Clone found (python)
 - util/redact.py [33:9 - 43:16] (11 lines, 60 tokens)
   util/redact.py [60:9 - 70:16]
Clone found (python)
 - util/review.py [807:9 - 819:65] (13 lines, 96 tokens)
   util/review.py [1166:9 - 1178:65]
Clone found (python)
 - util/review.py [821:73 - 843:10] (23 lines, 121 tokens)
   util/review.py [1181:61 - 1203:10]
Clone found (python)
 - util/review.py [851:9 - 856:67] (6 lines, 66 tokens)
   util/review.py [1127:9 - 1132:67]
Clone found (python)
 - util/review.py [873:36 - 894:8] (22 lines, 73 tokens)
   util/review.py [1215:42 - 1236:8]
Clone found (python)
 - util/tool_format.py [139:79 - 153:10] (15 lines, 54 tokens)
   util/tool_format.py [172:65 - 186:10]
Clone found (python)
 - workspace_snapshot.py [435:5 - 449:26] (15 lines, 88 tokens)
   workspace_snapshot.py [513:5 - 527:26]
Clone found (python)
 - analyze_compression.py [55:82 - 67:32] (13 lines, 63 tokens)
   analyze_compression.py [152:54 - 164:32]
Clone found (python)
 - analyze_compression.py [116:9 - 127:34] (12 lines, 61 tokens)
   analyze_compression.py [220:9 - 231:34]
Clone found (python)
 - generate_sounds.py [91:16 - 97:69] (7 lines, 53 tokens)
   generate_sounds.py [165:18 - 171:69]
┌────────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format     │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash       │ 11             │ 805         │ 3385         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ css        │ 1              │ 174         │ 1100         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ javascript │ 1              │ 621         │ 3369         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ lua        │ 1              │ 18          │ 70           │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markdown   │ 8              │ 2011        │ 16292        │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markup     │ 2              │ 488         │ 3271         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python     │ 553            │ 268130      │ 1335541      │ 225          │ 2923 (1.09%)     │ 15784 (1.18%)     │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ rest       │ 54             │ 15113       │ 135234       │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ text       │ 2              │ 26          │ 267          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ txt        │ 1              │ 25          │ 247          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ yaml       │ 3              │ 257         │ 1648         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:     │ 637            │ 287668      │ 1500424      │ 225          │ 2923 (1.02%)     │ 15784 (1.05%)     │
└────────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 225 clones.
time: 534.850ms
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