lcode-cli 0.61.0__tar.gz → 0.63.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/CHANGELOG.md +94 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/PKG-INFO +1 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/automation.md +3 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/bench.md +10 -4
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/configuration.md +1 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/how-it-works.md +11 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/installation.md +3 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/models.md +2 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/public-benchmarks.md +11 -5
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/quickstart.md +1 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/troubleshooting.md +14 -2
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/usage.md +29 -6
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/__init__.py +1 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent.py +34 -8
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_base.py +2 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_checks.py +39 -6
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_model.py +12 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/api.py +8 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/backends.py +2 -2
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench.py +32 -19
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/checkpoints.py +12 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/checks.py +196 -9
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/cli.py +1 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/config.py +1 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/doctor.py +3 -9
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/harbor_bench.py +16 -5
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/ollama.py +32 -1
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repl.py +15 -6
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/replay.py +1 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/residency.py +37 -13
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/subagents.py +1 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/traces.py +3 -3
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_api.py +45 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_bench.py +59 -0
- lcode_cli-0.63.0/tests/test_broken_stream.py +182 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_checkpoints.py +18 -0
- lcode_cli-0.63.0/tests/test_checks.py +560 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_harbor_bench.py +13 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_modes.py +3 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_residency.py +57 -9
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_stuck.py +85 -2
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_traces.py +31 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/uv.lock +27 -27
- lcode_cli-0.61.0/tests/test_checks.py +0 -243
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.editorconfig +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/CODEOWNERS +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/dependabot.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/workflows/ci.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/workflows/docs.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.github/workflows/release.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.gitignore +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/.pre-commit-config.yaml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/AGENTS.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/CODE_OF_CONDUCT.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/CONTRIBUTING.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/LICENSE +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/README.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/SECURITY.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/action.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/agents.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/assets/demo.svg +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/assets/extra.css +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/assets/long-clip-tulip.jpg +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/changelog.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/commands.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/contributing.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/editors.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/git.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/hooks.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/index.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/lsp.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/mcp.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/memory.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/modes.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/sandbox.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/search.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/servers.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/docs/traces.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/examples/README.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/examples/api/fix_tests.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/examples/commands/review.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/examples/skills/commit-message/SKILL.md +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/install.sh +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/mkdocs.yml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/overrides/main.html +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/pyproject.toml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/scripts/make_logos.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/scripts/record_demo.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/scripts/social-preview.html +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/__main__.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/acp.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/action.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_context.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_prompt.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/agent_sessions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/assistant.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_backend.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_budgets.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_checks.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_dedupe.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_flaky.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_logsum.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_quick.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_quotes.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/bench_runtime.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/catalog.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/cli_args.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/clipboard.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/clips.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/cloud.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/codesearch.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/comfy.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/context.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/edits.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/escalate.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/extensions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/film.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/frontmatter.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/gitflow.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/harbor.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/hardware.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/hooks.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/imageopts.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/jobs.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/limits.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/lsp.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/manual.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/matching.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/__init__.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/auth.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/catalog.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/catalog.toml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/client.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/commands.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/config.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/http.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/manager.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/protocol.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/server.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/mcp/stdio.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/media.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/media.toml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/media_catalog.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/media_cloud.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/media_video.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/memory.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/models.toml +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/modes.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/notify.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/permissions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/planning.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/preview.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/qt_hook.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/render.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repeats.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repl_history.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repl_media.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repl_models.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repl_sessions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repoid.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/repomap.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/review.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/sandbox.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/screenshots.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/screenshots_web.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/secretscan.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/servers/__init__.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/servers/encord.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/servers/valohai.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/servers/xai.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/sessions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/steer.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tool_helpers.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tool_schemas.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tools.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tools_base.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tools_edit.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/tools_shell.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/trace_export.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/trace_view.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/unreachable.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/update.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/vision.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/web.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/__init__.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/remove-background.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/smooth-film.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/wan21-vace.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/comfy_standin.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/conftest.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/fake_lsp_server.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/fake_mcp_server.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_acp.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_action.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_agent.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_assistant.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_backends.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_bench_work.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_catalog.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_cli.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_clipboard.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_cloud.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_codesearch.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_comfy.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_config.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_context.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_context_picker.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_conversations.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_escalate.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_extensions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_film.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_gitflow.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_gpu_handover.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_hooks.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_image_edit.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_image_generate.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_jobs.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_long_clips.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_look.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_lsp.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_manual.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_matching.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_mcp.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_media_catalog.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_media_cloud.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_memory.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_model_picker.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_permissions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_plan_mode.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_repeats.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_repomap.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_review.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_robustness.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_sandbox.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_screenshots.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_secretscan.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_servers.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_sessions.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_steer.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_subagents.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_tools.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_update.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_video.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_vision.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_web.py +0 -0
- {lcode_cli-0.61.0 → lcode_cli-0.63.0}/tests/test_xai.py +0 -0
|
@@ -6,6 +6,97 @@ All notable changes to lcode are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.63.0] - 2026-11-11
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **A reply that thinks at length without acting is stopped.** Sometimes the model weighs one option
|
|
14
|
+
after another for minutes without trying any: in `polyglot-rust-c` it wrote 45,000 to 53,000 tokens,
|
|
15
|
+
most of them thinking, and ran 1 or 2 commands in 15 minutes. Now, when a reply has thought for 7,000 tokens without
|
|
16
|
+
writing anything or calling a tool, lcode stops it and asks for the next step with thinking off. It
|
|
17
|
+
hands the model the last part of its thinking, so it can act on where its reasoning got to. On the
|
|
18
|
+
dev slice, about 1 reply in 100 thought that long: they came from 42 of the 110 attempts that failed
|
|
19
|
+
and 2 of the 102 that passed. Set the budget with `lcode config set think_budget`, `0` for no limit
|
|
20
|
+
([#241](https://github.com/nasser1941/lcode/issues/241)).
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **`lcode -p` exits with `1` when the request fails, also without `--output`.** It showed the error (a
|
|
25
|
+
model error, Ollama stopping in the middle of a reply, running out of memory) and exited with `0`, so in
|
|
26
|
+
`lcode -p "…" && next-step` the next step ran after a failed request. It now exits with the codes
|
|
27
|
+
`--output json` uses: `1` for an error, `3` stopped at `--max-steps`, `4` stopped because the model kept
|
|
28
|
+
repeating itself, `130` interrupted. What it prints is the same, and the interactive session still carries
|
|
29
|
+
on after an error.
|
|
30
|
+
- **The line after a load counts the part of the model in system RAM.** With Ollama 0.40, `qwen3.6-35b`
|
|
31
|
+
at 32K on a 12 GB GPU showed as `10.5 GB, 98% on the GPU and the rest in system RAM`, because Ollama
|
|
32
|
+
leaves out the ~12 GB of experts that stay mapped from the model's file. For the models in the catalog,
|
|
33
|
+
lcode now counts the whole model at its estimate, the one `lcode setup` and `lcode doctor` show:
|
|
34
|
+
`~23 GB, 42% on the GPU and the rest in system RAM`. With Ollama's numbers, the warning that another
|
|
35
|
+
program is using GPU memory couldn't fire. Now it does, and it says how much of the model fits on the GPU.
|
|
36
|
+
- **`lcode doctor` shows the loaded model.** It looked for `lcode-qwen3.6-35b` while Ollama lists it as
|
|
37
|
+
`lcode-qwen3.6-35b:latest`, so the `Loaded` line never appeared for the models `lcode setup` creates.
|
|
38
|
+
It now says how the model fits, in the same words as the line after a load.
|
|
39
|
+
- **`lcode bench` counts the part of the model in system RAM, too.** For `qwen3.6-35b` at 32K on a
|
|
40
|
+
12 GB GPU, it said `10.4 GB, 98% on the GPU` after loading, and the same in its summary. It now says
|
|
41
|
+
`~23 GB, 42% on the GPU and the rest in system RAM`, as the line after a load does. `--json` results
|
|
42
|
+
keep Ollama's count in `memory_gb` and `gpu_percent`, so they still compare with older results, and
|
|
43
|
+
add lcode's estimate in `estimated_memory_gib` and `estimated_gpu_percent`.
|
|
44
|
+
- **A passing run of one test file counted as the whole checks.** When the model ran the project's
|
|
45
|
+
check command with a path or a test name after it (`.venv/bin/python -m pytest -q tests/test_calc.py`),
|
|
46
|
+
lcode took the checks as passed and didn't run them, and `/status` and `lcode -p --output json` said
|
|
47
|
+
they passed, even on a project whose full run stops before its first test. Now a run like that, or
|
|
48
|
+
one with an option that picks tests (`-k`, `--ignore`, `npm test -- --grep`), doesn't count, and lcode
|
|
49
|
+
runs the checks itself. Options alone, like `-x` or `--tb=short`, still count. In 426 attempts on six
|
|
50
|
+
dev-slice nights this changes 2: one now runs xarray's suite (4.4 minutes, failing on tests that failed
|
|
51
|
+
before), the other a run that stops before its first test in under a second.
|
|
52
|
+
- **A model server that stops in the middle of a reply no longer ends lcode in a traceback.** When the
|
|
53
|
+
connection broke while a reply streamed, as it did when `lcode update` replaced Ollama's container during
|
|
54
|
+
a reply, `lcode` and `lcode -p` stopped with a Python traceback, which also ended an interactive
|
|
55
|
+
session. Now lcode says that Ollama stopped in the middle of a reply and what to do, the session carries
|
|
56
|
+
on, the trace records the failure, and `lcode -p --output json` reports `status` `error`. LM Studio,
|
|
57
|
+
llama-server, vLLM and MLX servers get the same. A reply stopped on purpose breaks its connection too,
|
|
58
|
+
and that stays a stop: a cancel from an editor (ACP) came back as an internal error,
|
|
59
|
+
`ChunkedEncodingError`, and a subagent stopped with Ctrl+C was reported as failed.
|
|
60
|
+
|
|
61
|
+
## [0.62.0] - 2026-11-06
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **A test run that stops before its first test no longer counts as a failure of the model's change.**
|
|
66
|
+
pytest stopping on an error while collecting, or unittest ending in a traceback instead of `Ran N
|
|
67
|
+
tests`, says nothing about the change, yet the model was told that the project's checks fail and to fix
|
|
68
|
+
what its changes broke. On the dev slice at 32K that was 19 of the 34 automatic checks (Django's
|
|
69
|
+
`tests/` can't be discovered by unittest; two other projects stop on modules and data that aren't there).
|
|
70
|
+
The model spent 26 minutes after those notes, ran `git stash` in 5 attempts to see for itself, and in 2
|
|
71
|
+
attempts kept editing: one downloaded a 244 MB database and changed a test file the request had excluded.
|
|
72
|
+
Now lcode tells you what stopped the run, and the model's answer stands. An error that names a file the
|
|
73
|
+
request changed still goes to the model, shell commands included, and so do tests that ran and failed.
|
|
74
|
+
`checks` in `lcode -p --output json`, the task sheet and `/status` now say these checks didn't run, also
|
|
75
|
+
for a project with no tests or no test runner. The notes weren't all loss: in that same attempt, 1 of 47
|
|
76
|
+
like it over four nights, the extra work also fixed a test the model had called pre-existing.
|
|
77
|
+
- **Checks that don't finish in 10 minutes are no longer called a failure.** The model is told that they
|
|
78
|
+
don't say whether its change works, instead of to fix what it broke.
|
|
79
|
+
- **A SPARQL query it never ran** now counts like code it never ran (#242): on the dev slice, 2 of 3
|
|
80
|
+
`sparql-university` attempts on 0.61.0 wrote `solution.sparql` and said they were done without running it.
|
|
81
|
+
lcode sends the model back once, and the note names `rdflib`. SQL files stay out, because one can be a
|
|
82
|
+
migration, and asking to run that could change a real database.
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- **The automatic checks run in the project's root.** They ran wherever the model's last `cd` left its
|
|
87
|
+
shell, though their command is written for the root: from `tests/`, `python -m unittest discover -s tests`
|
|
88
|
+
doesn't start and `.venv/bin/python` isn't there. 3 of the 34 checks on the dev slice ran from `tests/`. A
|
|
89
|
+
command from your own `checks` setting runs in the folder you started lcode in.
|
|
90
|
+
- **A failing test run piped into `tail` counted as passing.** When the model ran the project's checks
|
|
91
|
+
itself as `pytest -q | tail`, lcode read `tail`'s exit code of 0, took the checks as passed and didn't
|
|
92
|
+
run them, and `lcode -p --output json` reported them as passed. A run whose exit code isn't the check's
|
|
93
|
+
now counts only if its output shows a test summary with nothing failing. Otherwise lcode runs the
|
|
94
|
+
checks itself.
|
|
95
|
+
- **`lcode bench --compare`** took a task with one attempt as certain, so its noise came out too small,
|
|
96
|
+
and it said nothing when a run had far fewer attempts: a real run lost 18 of its 72 attempts and
|
|
97
|
+
compared as usual. A single attempt's pass rate now comes from both runs, and `--compare` warns when
|
|
98
|
+
the two runs didn't have the same number of attempts.
|
|
99
|
+
|
|
9
100
|
## [0.61.0] - 2026-11-05
|
|
10
101
|
|
|
11
102
|
### Added
|
|
@@ -1328,7 +1419,9 @@ First public release.
|
|
|
1328
1419
|
- `AGENTS.md` project instructions and `/init` to generate them.
|
|
1329
1420
|
- One-line installer for Linux and macOS.
|
|
1330
1421
|
|
|
1331
|
-
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.
|
|
1422
|
+
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.63.0...HEAD
|
|
1423
|
+
[0.63.0]: https://github.com/nasser1941/lcode/compare/v0.62.0...v0.63.0
|
|
1424
|
+
[0.62.0]: https://github.com/nasser1941/lcode/compare/v0.61.0...v0.62.0
|
|
1332
1425
|
[0.61.0]: https://github.com/nasser1941/lcode/compare/v0.60.0...v0.61.0
|
|
1333
1426
|
[0.60.0]: https://github.com/nasser1941/lcode/compare/v0.59.0...v0.60.0
|
|
1334
1427
|
[0.59.0]: https://github.com/nasser1941/lcode/compare/v0.58.0...v0.59.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: lcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.63.0
|
|
4
4
|
Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
|
|
5
5
|
Project-URL: Homepage, https://nasser1941.github.io/lcode/
|
|
6
6
|
Project-URL: Documentation, https://nasser1941.github.io/lcode/
|
|
@@ -25,6 +25,8 @@ lcode -p "Explain the retry logic" --output stream-json --max-steps 20
|
|
|
25
25
|
lcode's usual output goes to stderr, so stdout holds only the JSON. The exit code says how it
|
|
26
26
|
went: `0` success, `1` an error, `3` stopped at `--max-steps`, `4` stopped because the model
|
|
27
27
|
[kept repeating itself](how-it-works.md#when-the-model-repeats-itself), `130` interrupted.
|
|
28
|
+
Without `--output`, `lcode -p` exits with the same codes, so in `lcode -p "…" && next-step`
|
|
29
|
+
the next step runs only after a request that succeeded.
|
|
28
30
|
|
|
29
31
|
### The result
|
|
30
32
|
|
|
@@ -56,7 +58,7 @@ went: `0` success, `1` an error, `3` stopped at `--max-steps`, `4` stopped becau
|
|
|
56
58
|
| `files_changed` | Files the request added (`A`), modified (`M`) or deleted (`D`), shell commands included |
|
|
57
59
|
| `usage` | Model requests and tokens; `prompt_tokens` includes tokens served from the prompt cache |
|
|
58
60
|
| `review` | What the [review](usage.md#a-review-before-the-answer) sent back to the model (`[]` when it found nothing; `null` when no review ran) |
|
|
59
|
-
| `checks` | The [checks](usage.md#checks-before-done) that ran after the change: `command`, `exit_code` (`null` when they weren't allowed to run) and `by` (`lcode`, or `model` when the model ran them itself) |
|
|
61
|
+
| `checks` | The [checks](usage.md#checks-before-done) that ran after the change: `command`, `exit_code` (`null` when they say nothing about the change: they weren't allowed to run, no test ran, or they didn't finish) and `by` (`lcode`, or `model` when the model ran them itself) |
|
|
60
62
|
| `error` | What went wrong, when `status` is `error` |
|
|
61
63
|
| `session_id` | Continue the conversation later with `lcode --resume <id>` |
|
|
62
64
|
|
|
@@ -25,7 +25,7 @@ its memory use, so those columns stay empty.
|
|
|
25
25
|
lcode bench · NVIDIA GeForce RTX 4080 Laptop GPU (12 GB VRAM), 31 GB RAM · Ollama 0.40.13
|
|
26
26
|
|
|
27
27
|
lcode-qwen3.6-35b · 32K context · reasoning on · 8 tasks · 3 attempts each
|
|
28
|
-
Loaded in 18s ·
|
|
28
|
+
Loaded in 18s · ~23 GB, 42% on the GPU and the rest in system RAM · reads prompts at 905 tok/s
|
|
29
29
|
Attempt 1 of 3
|
|
30
30
|
✓ fix-bug Fix a bug so the tests pass 22s the tests pass
|
|
31
31
|
✓ find-code Answer with file:line 8s next_wait at backoff.py:13
|
|
@@ -182,7 +182,7 @@ quick tasks once, as `lcode bench` did before 0.57.
|
|
|
182
182
|
| **Generation** | Output tokens per second, across all the model's responses |
|
|
183
183
|
| **Prompt reading** | Prompt tokens per second: how fast the model reads files and tool output. Measured per model with fresh 4,000-token prompts (the faster of two readings, since the first one after loading includes warm-up), because during the tasks Ollama serves most of each request from its prompt cache |
|
|
184
184
|
| **Tool-call errors** | Tool calls that failed (wrong arguments, editing without reading first, unmatched edits) or that the model wrote as invalid JSON |
|
|
185
|
-
| **Memory** | The model's memory
|
|
185
|
+
| **Memory** | The model's memory and how much of it is on the GPU, counted as in the [line after a load](usage.md#whats-happening-under-the-hood). Ollama leaves out what stays mapped from the model's file in system RAM, so for a model in `lcode models` that's partly off the GPU, it's lcode's estimate of the whole model (`~23 GB`). Otherwise it's what Ollama says |
|
|
186
186
|
|
|
187
187
|
Results depend on the context window, so `lcode bench` uses **32K** by default on every machine,
|
|
188
188
|
which makes results comparable. When comparing models, each one is unloaded before the next starts
|
|
@@ -217,7 +217,7 @@ RTX 4080 Laptop GPU (12 GB) with 31 GB of RAM, Ollama 0.40.13, 32K context, reas
|
|
|
217
217
|
| Generation | 64.0 tok/s |
|
|
218
218
|
| Prompt reading | 851 tok/s |
|
|
219
219
|
| Tool-call errors | 4 |
|
|
220
|
-
| Memory |
|
|
220
|
+
| Memory | ~23 GB, 42% on GPU |
|
|
221
221
|
|
|
222
222
|
What it missed:
|
|
223
223
|
- one `spec-fix` attempt fixed the reported case but not all the docstring's rules;
|
|
@@ -226,6 +226,9 @@ What it missed:
|
|
|
226
226
|
- every `runtime-bug` attempt settled for a band-aid: the window still grew, or still couldn't be
|
|
227
227
|
made smaller.
|
|
228
228
|
|
|
229
|
+
The table shows memory as lcode counts it now. lcode 0.58.0 printed Ollama's count,
|
|
230
|
+
`10.5 GB, 98% on GPU`, which leaves out the ~12 GB of experts in system RAM.
|
|
231
|
+
|
|
229
232
|
Two `wide-feature` attempts were first counted as failed. Their `budget list` printed `No budgets
|
|
230
233
|
set.` without budgets, and one listed the budgeted categories first. The task asks for neither
|
|
231
234
|
behavior, so the check now accepts both (0.59.0), and the table counts them as passed.
|
|
@@ -302,6 +305,8 @@ existing fields keep their meaning until `schema` changes.
|
|
|
302
305
|
"prompt_tps": 904.6,
|
|
303
306
|
"memory_gb": 10.4,
|
|
304
307
|
"gpu_percent": 98,
|
|
308
|
+
"estimated_memory_gib": 22.7,
|
|
309
|
+
"estimated_gpu_percent": 42,
|
|
305
310
|
"attempts": 3,
|
|
306
311
|
"passed": 24,
|
|
307
312
|
"total": 24,
|
|
@@ -328,7 +333,8 @@ existing fields keep their meaning until `schema` changes.
|
|
|
328
333
|
| `ollama`, `server` | The Ollama version, or `null` with [another model server](servers.md); `server` names the server either way |
|
|
329
334
|
| `runs[].model` | The name you gave (catalog key or Ollama tag); `ollama_model` is the model that ran |
|
|
330
335
|
| `runs[].context`, `num_batch`, `think` | The settings used. lcode lowers the batch size or context if the GPU runs out of memory, and reports what it ended up using |
|
|
331
|
-
| `runs[].memory_gb`, `gpu_percent` |
|
|
336
|
+
| `runs[].memory_gb`, `gpu_percent` | The model's memory in GB and the share of it on the GPU, as Ollama's `/api/ps` counts them; `null` if unavailable. Ollama 0.40 leaves out what stays mapped from the model's file in system RAM: `qwen3.6-35b` at 32K on a 12 GB GPU shows as 10.4 GB, 98% of it on the GPU |
|
|
337
|
+
| `runs[].estimated_memory_gib`, `estimated_gpu_percent` | When Ollama's count leaves out part of a model in `lcode models`: lcode's estimate of the whole model in GiB, and the share of it on the GPU, as the summary shows them (`~23 GB, 42% on GPU`). `null` when Ollama counts the whole model (all of it on the GPU, or a model outside the catalog) and in older results |
|
|
332
338
|
| `runs[].generation_tps` | Output tokens per second across the tasks; `null` if Ollama reported no timings |
|
|
333
339
|
| `runs[].prompt_tps` | Prompt tokens per second for a fresh 4,000-token prompt (the faster of two readings); `null` if it couldn't be measured |
|
|
334
340
|
| `runs[].usage` | Totals over the tasks as Ollama reports them. `prompt_tokens` includes tokens served from the prompt cache |
|
|
@@ -59,6 +59,7 @@ lcode config path # print the file location
|
|
|
59
59
|
| `escalate_url` | — | Its server, when it isn't the provider's usual one: another Ollama, or any OpenAI-compatible API |
|
|
60
60
|
| `escalate_price` | — | Its price in dollars per million tokens, input/output (e.g. `3/15`), for the cost shown before each use |
|
|
61
61
|
| `repeat_limit` | `3` | Identical tool calls with identical results before lcode [steps in](how-it-works.md#when-the-model-repeats-itself); `0` turns it off, along with the checks for [unreachable sites](how-it-works.md#when-a-site-cant-be-reached) and [thinking in circles](how-it-works.md#when-a-reply-goes-nowhere) |
|
|
62
|
+
| `think_budget` | `7000` | Tokens a reply may [think](how-it-works.md#when-a-reply-goes-nowhere) before it writes anything or calls a tool. Past that, lcode stops the reply and asks for the next step with thinking off; `0` means no limit |
|
|
62
63
|
| `secret_check` | `true` | Before `git commit` and `git push`, look for passwords, keys and tokens they'd add ([details](usage.md#secrets-in-commits)) |
|
|
63
64
|
| `checkpoints` | `true` | Save a checkpoint before the model changes files, so [`/undo`](usage.md#undo-and-checkpoints) can restore them |
|
|
64
65
|
| `trace` | `true` | Record each request's model calls, tool calls, times and tokens on this machine, for [`lcode trace`](traces.md) (kept 30 days) |
|
|
@@ -94,6 +94,17 @@ four in one request, lcode stops it (status `loop`), offering the
|
|
|
94
94
|
[stronger model](usage.md#a-stronger-model-when-stuck) first when one is set. An answer the context
|
|
95
95
|
cut off midway is kept, with a warning to `/compact` or use a larger `/context`.
|
|
96
96
|
|
|
97
|
+
A reply can also think for a long time without repeating itself: weighing one option after another,
|
|
98
|
+
never trying any. When a reply has thought for 7,000 tokens (`think_budget`) and hasn't yet written
|
|
99
|
+
anything or called a tool, lcode stops it the same way. The model gets back the last part of its
|
|
100
|
+
thinking, so it can act on where its reasoning got to, and the next reply runs with thinking off.
|
|
101
|
+
Once the model acts, thinking is back on. On the dev slice of the
|
|
102
|
+
[public benchmarks](public-benchmarks.md), about 1 reply in 100 thought that long. They came from 42
|
|
103
|
+
of the 110 attempts that failed and 2 of the 102 that passed. Such a reply doesn't count towards the
|
|
104
|
+
four per request, so a long task with several hard steps carries on, but a reply that goes nowhere
|
|
105
|
+
right after one stops the request as before. Change the budget with
|
|
106
|
+
`lcode config set think_budget 12000`, or turn it off with `0`.
|
|
107
|
+
|
|
97
108
|
## Subagents
|
|
98
109
|
|
|
99
110
|
The `agent` tool starts a [subagent](agents.md): another agent loop with its own conversation, the
|
|
@@ -181,6 +181,9 @@ lcode update --check # only show which versions are out
|
|
|
181
181
|
network and restart policy. The old one is kept until the new one answers with the new
|
|
182
182
|
version, and is put back if it doesn't.
|
|
183
183
|
- Your models stay: they're in the container's volume.
|
|
184
|
+
- A reply that an lcode session is getting while the container is replaced stops halfway. That
|
|
185
|
+
session [says so](troubleshooting.md#ollama-stopped-in-the-middle-of-a-reply) and carries on:
|
|
186
|
+
send the request again after the update.
|
|
184
187
|
- **Ollama installed without Docker** gets the command that updates it: on Linux,
|
|
185
188
|
`curl -fsSL https://ollama.com/install.sh | sh`; on macOS, `brew upgrade ollama` or the app
|
|
186
189
|
itself.
|
|
@@ -258,7 +258,8 @@ RAM needed ≈ memory − GPU memory + ~10 GB for Ollama's server and prompt cac
|
|
|
258
258
|
|
|
259
259
|
- **The part of the model that doesn't fit on the GPU.** A Mixture-of-Experts model's experts stay
|
|
260
260
|
mapped from the model's file, so they have to stay in Linux's page cache. `ollama ps` leaves them out:
|
|
261
|
-
it shows `qwen3.6-35b` at 32K as 10.5 GB, with ~12 GB more in RAM.
|
|
261
|
+
it shows `qwen3.6-35b` at 32K as 10.5 GB, with ~12 GB more in RAM. lcode counts them: after a load,
|
|
262
|
+
in `lcode doctor` and in `lcode bench`, it says `~23 GB, 42% on the GPU and the rest in system RAM`.
|
|
262
263
|
- **Ollama's prompt cache**, which grows to 8 GB in a long session, next to 1–2 GB of the server's own.
|
|
263
264
|
|
|
264
265
|
On a 12 GB GPU, `qwen3.6-35b` needs ~21 GB of RAM at 32K, ~23 GB at 128K and ~26 GB at 256K. On Linux,
|
|
@@ -17,9 +17,13 @@ whether it passed.
|
|
|
17
17
|
## What you need
|
|
18
18
|
|
|
19
19
|
- **Docker**, running.
|
|
20
|
-
- **uv**: lcode runs Harbor with `uvx`, so there's nothing else to install.
|
|
20
|
+
- **uv**: lcode runs Harbor with `uvx`, so there's nothing else to install. Harbor runs from uv's
|
|
21
|
+
cache, so don't clear it during a run (`uv cache clean`): the attempts still to come can't start.
|
|
21
22
|
- **Disk space** for the tasks' images: about 20 GB for the dev slice. Each SWE-bench task has an
|
|
22
|
-
image of its own, 1–3 GB.
|
|
23
|
+
image of its own, 1–3 GB. Keep about 25 GB free beyond that while it runs: an attempt at
|
|
24
|
+
`torch-tensor-parallelism` takes about 21 GB until it ends, because the model and then the task's
|
|
25
|
+
tests each install torch with its GPU libraries. On a smaller disk, run the other tasks with
|
|
26
|
+
`--tasks` (`lcode bench --harbor dev --list` shows them).
|
|
23
27
|
- **A model server the containers can reach.** lcode in a container finds your machine by itself:
|
|
24
28
|
as `host.docker.internal` with Docker Desktop (macOS, Windows), or as the container's gateway on
|
|
25
29
|
Linux. Ollama has to listen on more than `127.0.0.1` for that:
|
|
@@ -123,9 +127,11 @@ limits, so part of a difference can come from the machine rather than from lcode
|
|
|
123
127
|
|
|
124
128
|
The noise is how far pass@1 moves between runs of the same setup, estimated from how much each
|
|
125
129
|
task's attempts disagree: a task that always passes or always fails adds nothing, one that passes
|
|
126
|
-
half the time the most.
|
|
127
|
-
|
|
128
|
-
with
|
|
130
|
+
half the time the most. One attempt can't disagree with itself, so that task's pass rate comes from
|
|
131
|
+
both runs. A change counts when it's more than twice the standard error of the difference. On the dev
|
|
132
|
+
slice, with three attempts per task, that's about 9 points. `--compare` warns when the two runs didn't
|
|
133
|
+
have the same number of attempts (a container that didn't start, say), and exits with 1 when the second
|
|
134
|
+
result dropped beyond the noise, so a script can stop on it.
|
|
129
135
|
|
|
130
136
|
**The release rule:** a release that changes lcode's prompts, tools or context handling ships only
|
|
131
137
|
if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
|
|
@@ -23,6 +23,16 @@ Ollama isn't running (or isn't installed).
|
|
|
23
23
|
as well (`docker volume prune -a`), so were the models: download them again with `lcode setup`.
|
|
24
24
|
- Remote server: `lcode config set ollama_host http://host:11434`.
|
|
25
25
|
|
|
26
|
+
### `Ollama stopped in the middle of a reply`
|
|
27
|
+
|
|
28
|
+
The connection to Ollama broke while the model was answering: Ollama stopped or restarted (a crash, or an
|
|
29
|
+
update that replaces its container, as `lcode update` does), or the network to a remote Ollama dropped.
|
|
30
|
+
The session carries on and keeps the conversation, without the reply that was cut off. Once Ollama is
|
|
31
|
+
running, send the request again. If it doesn't answer, `lcode doctor` checks it and says how to start it.
|
|
32
|
+
|
|
33
|
+
With `lcode -p --output json`, the result has `status` `error` with this message, and lcode exits with
|
|
34
|
+
`1`. LM Studio, llama-server, vLLM and MLX servers get the same message, with their own name.
|
|
35
|
+
|
|
26
36
|
### Docker: `all predefined address pools have been fully subnetted`
|
|
27
37
|
|
|
28
38
|
Docker Compose can't create a network for the Ollama container. A VPN that routes all traffic (for example
|
|
@@ -84,8 +94,10 @@ need `lcode mcp login <name>`. More in [MCP servers: Troubleshooting](mcp.md#tro
|
|
|
84
94
|
starts, and `keep_alive` keeps it loaded between requests.
|
|
85
95
|
- Reading many large files takes a while the first time (~280 tokens/s on a 12 GB GPU, ~500 with
|
|
86
96
|
`lcode config set num_batch 1024` if it fits); follow-up turns reuse the cache.
|
|
87
|
-
- `
|
|
88
|
-
|
|
97
|
+
- `lcode doctor` shows how much of the loaded model is on the GPU, for example
|
|
98
|
+
`Loaded ~23 GB, 42% on the GPU and the rest in system RAM · 32K context`. `ollama ps` leaves out the
|
|
99
|
+
part of a Mixture-of-Experts model that's in system RAM, so it can say 98%. Dense models are much
|
|
100
|
+
slower when split; prefer the MoE models in `lcode models` on smaller GPUs.
|
|
89
101
|
- `--no-think` skips reasoning for simple requests.
|
|
90
102
|
|
|
91
103
|
### It starts fast, then gets about three times slower
|
|
@@ -224,9 +224,22 @@ runs the project's checks itself before the answer is final:
|
|
|
224
224
|
- **When they fail,** the model gets the output and keeps working, twice at most. After that its answer
|
|
225
225
|
says what still fails instead of claiming success. A failure that the change didn't cause is
|
|
226
226
|
reported, not chased, and the checks run again only if the model changes something more.
|
|
227
|
-
- **When
|
|
228
|
-
|
|
227
|
+
- **When no test ran,** lcode says so and doesn't send it to the model: no tests were collected, the
|
|
228
|
+
test runner isn't installed, or the run stopped before its first test (pytest on an error while
|
|
229
|
+
collecting, unittest with a traceback instead of `Ran N tests`). A project can be like that before
|
|
230
|
+
anything changes, and then the run says nothing about the change. If the error names a file the
|
|
231
|
+
request changed, shell commands included, it's the model's to fix, and it gets the output like any
|
|
232
|
+
other failure.
|
|
233
|
+
- **When they don't finish** in 10 minutes, lcode stops them and tells the model that they don't say
|
|
234
|
+
whether its change works. A suite that's simply this slow needs a faster command (below).
|
|
229
235
|
- **When the model already ran them** after its last change and they passed, they aren't run again.
|
|
236
|
+
A run piped into another program (`pytest -q | tail`) exits with that program's code, so it counts
|
|
237
|
+
only if its output shows a test summary with nothing failing. A run of part of them doesn't count:
|
|
238
|
+
one with a path or a test name after the check's command (`pytest -q tests/test_calc.py`), or an
|
|
239
|
+
option that picks tests (`-k`, `--ignore`, `npm test -- --grep`). Options alone, like `-x` or
|
|
240
|
+
`--tb=short`, still count.
|
|
241
|
+
- **Where they run:** in the project's root, wherever the model's shell went last. A command from your
|
|
242
|
+
own `checks` setting runs in the folder you started lcode in.
|
|
230
243
|
- **Permission:** they run like any other command, so in `ask` mode the first run asks (++a++ allows
|
|
231
244
|
them for the session).
|
|
232
245
|
- **Programs** using `lcode -p --output json` see the runs in the result's `checks`.
|
|
@@ -263,9 +276,10 @@ or reading it doesn't count as running it. `checks = "off"` turns this off too.
|
|
|
263
276
|
|
|
264
277
|
**Code it never ran.** A model that writes a new module and finds no Python, or checks only its
|
|
265
278
|
syntax, tends to call it done, and the first run shows the error. When a request wrote a new code
|
|
266
|
-
file (Python, JavaScript, TypeScript, Rust, Go, C, Java and other languages that run
|
|
267
|
-
since its last change ran it, lcode sends it back once: run it (import a module
|
|
268
|
-
wrote; start a server in the background and try it) and fix
|
|
279
|
+
file (Python, JavaScript, TypeScript, Rust, Go, C, Java and other languages that run, or a SPARQL
|
|
280
|
+
query) and no command since its last change ran it, lcode sends it back once: run it (import a module
|
|
281
|
+
and call what it wrote; run a query on its data; start a server in the background and try it) and fix
|
|
282
|
+
what fails, or say plainly that it's
|
|
269
283
|
untested and why. A command counts when it names the file or its module, or runs tests, and its
|
|
270
284
|
program was there: a syntax, lint or type check, `python3: command not found` or a command that
|
|
271
285
|
only reads doesn't count. When `uv` is installed, the note adds that `uv run --with PACKAGE python FILE` runs
|
|
@@ -398,7 +412,7 @@ stays loaded:
|
|
|
398
412
|
|
|
399
413
|
| When | What it says |
|
|
400
414
|
|---|---|
|
|
401
|
-
| The model was loaded | `◆ Loaded qwen3.6-35b in 15s:
|
|
415
|
+
| The model was loaded | `◆ Loaded qwen3.6-35b in 15s: ~23 GB, 42% on the GPU and the rest in system RAM.`, and a warning when less of it is on the GPU than usual, because another program or model is using GPU memory |
|
|
402
416
|
| A dense model doesn't fit on the GPU (at startup and on `/model`) | `⚠ qwen3.8-27b is a dense model: all 27B parameters work on every token. It's capable, but slow here. Only about 61% of it fits in the 12 GB of GPU memory…`, with what to do instead |
|
|
403
417
|
| The model that looks at images needs the memory | `Loading the vision model … to look at bug.png; qwen3.6-35b makes room and reloads afterwards`, then `◆ qwen3.6-35b was unloaded to make room…`, and the next step says `Reloading qwen3.6-35b into memory (it made room for the vision model …)` |
|
|
404
418
|
| A tool needs the GPU to itself (an MCP server with `free_gpu`) | `◆ Unloaded qwen3.6-35b so the server can use the GPU; it reloads afterwards.` |
|
|
@@ -410,6 +424,12 @@ While the model loads in the background at startup, the status bar says
|
|
|
410
424
|
part of them in system RAM. Dense ones slow down a lot, to a few tokens a second, which is why they
|
|
411
425
|
get the warning.
|
|
412
426
|
|
|
427
|
+
The `~` marks lcode's estimate of the model's memory, the same one `lcode setup` and `lcode doctor`
|
|
428
|
+
show. Ollama leaves out what stays mapped from the model's file in system RAM: `ollama ps` shows
|
|
429
|
+
qwen3.6-35b at 32K on a 12 GB GPU as 10.5 GB, 98% of it on the GPU, while ~12 GB of its experts are
|
|
430
|
+
in RAM. So when part of a model in `lcode models` is off the GPU, lcode counts all of it. For other
|
|
431
|
+
models it repeats what Ollama says. `lcode doctor` shows the same line for the model in memory.
|
|
432
|
+
|
|
413
433
|
## Steer while it works
|
|
414
434
|
|
|
415
435
|
A request can take minutes with a local model. You don't have to stop it to change course: type
|
|
@@ -811,4 +831,7 @@ lcode -p "Review the uncommitted changes (git diff) for bugs"
|
|
|
811
831
|
lcode -p "Run the tests and fix any failures" --auto-edit
|
|
812
832
|
```
|
|
813
833
|
|
|
834
|
+
The exit code says how the request went: `0` when it succeeded, `1` for an error, and the other
|
|
835
|
+
codes in [Automation](automation.md#structured-output).
|
|
836
|
+
|
|
814
837
|
Combine with `--yolo` only in disposable environments.
|
|
@@ -44,27 +44,47 @@ if TYPE_CHECKING:
|
|
|
44
44
|
|
|
45
45
|
MAX_STALLS = 2 # replies in a row that go round in circles or say nothing, before lcode stops the request
|
|
46
46
|
MAX_STALLS_PER_REQUEST = 4 # such replies in one request, even with work in between
|
|
47
|
+
THOUGHT_TAIL = 1500 # characters of a stopped reply's thinking that the model gets back, so it needn't start over
|
|
47
48
|
STALLED = {
|
|
48
49
|
"circles": "the reply went round in circles, so lcode stopped it",
|
|
50
|
+
"overthought": "the reply thought at length without acting, so lcode stopped it",
|
|
49
51
|
"cut_off": "the reply filled the context before it said anything",
|
|
50
52
|
"": "the reply was empty",
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
|
|
54
|
-
def stall_note(trouble: str, thinking_off: bool = False) -> str:
|
|
55
|
-
"""What the model is told after a reply that went round in circles or ended without a word.
|
|
56
|
+
def stall_note(trouble: str, thinking_off: bool = False, thought: str = "") -> str:
|
|
57
|
+
"""What the model is told after a reply that went round in circles, thought too long or ended without a word.
|
|
58
|
+
|
|
59
|
+
`thought` is the stopped reply's thinking: for one that thought too long, its end goes back to the model, so
|
|
60
|
+
the next reply can act on where the reasoning got to instead of starting it over (#241)."""
|
|
56
61
|
first = {
|
|
57
62
|
"circles": "Your last reply went round in circles (the same thoughts over and over), so lcode stopped it.",
|
|
63
|
+
"overthought": "Your last reply thought at length without writing anything or making a tool call, so lcode "
|
|
64
|
+
"stopped it.",
|
|
58
65
|
"cut_off": "Your last reply filled the rest of the context before you said anything.",
|
|
59
66
|
"": "Your last reply was empty.",
|
|
60
67
|
}[trouble]
|
|
61
68
|
off = ": thinking is off for this reply" if thinking_off else ""
|
|
62
|
-
|
|
69
|
+
note = (
|
|
63
70
|
f"[lcode] {first} Don't deliberate at length now{off}. Either make your next tool call, or, if you're stuck, "
|
|
64
71
|
"tell the user in a few lines what you did, what fails, and what they could do. If you were about to check "
|
|
65
72
|
"something by running it, run it now instead of reasoning about it: for a window, take a screenshot (with "
|
|
66
73
|
"actions for clicks or keys)."
|
|
67
74
|
)
|
|
75
|
+
if trouble == "overthought" and thought.strip():
|
|
76
|
+
note += f"\n\nWhere your thinking had got to (its last part):\n\n{thought_tail(thought)}"
|
|
77
|
+
return note
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def thought_tail(thought: str) -> str:
|
|
81
|
+
"""The end of a stopped reply's thinking, from a line or sentence start: about THOUGHT_TAIL characters."""
|
|
82
|
+
if len(thought) <= THOUGHT_TAIL:
|
|
83
|
+
return thought.strip()
|
|
84
|
+
tail = thought[-THOUGHT_TAIL:]
|
|
85
|
+
ends = [tail.find(end) + len(end) for end in ("\n", ". ", "? ", "! ", "… ") if end in tail]
|
|
86
|
+
starts = [i for i in ends if i < len(tail) // 2] or [tail.find(" ") + 1] # else at least a whole word
|
|
87
|
+
return "…" + tail[min(starts) :].strip()
|
|
68
88
|
|
|
69
89
|
|
|
70
90
|
EVENT_OUTPUT = 4000 # characters of a tool's output in an event
|
|
@@ -343,7 +363,9 @@ class Agent(PromptParts, Sessions, Checks, ContextWindow, ModelCalls):
|
|
|
343
363
|
continue
|
|
344
364
|
if not calls and (self.reply_trouble == "circles" or not (reply.get("content") or "").strip()):
|
|
345
365
|
stalls += 1
|
|
346
|
-
|
|
366
|
+
# A reply that only thought too long counts as one in a row, so one that goes nowhere after it ends
|
|
367
|
+
# the request, but not towards the limit per request: in a long task, hard steps think long.
|
|
368
|
+
stalled += self.reply_trouble != "overthought"
|
|
347
369
|
dropped = self.messages.pop() # no answer, and circles would only fill the context
|
|
348
370
|
kept = self.keep_dropped(dropped)
|
|
349
371
|
if stalls < MAX_STALLS and stalled < MAX_STALLS_PER_REQUEST:
|
|
@@ -351,10 +373,14 @@ class Agent(PromptParts, Sessions, Checks, ContextWindow, ModelCalls):
|
|
|
351
373
|
# the same deliberation over (all 6 polyglot-rust-c attempts on the dev slice, #241).
|
|
352
374
|
pause = self.settings.think and self.can_skip_thinking()
|
|
353
375
|
off = ", with thinking off" if pause else ""
|
|
354
|
-
self.
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
376
|
+
what = STALLED[self.reply_trouble]
|
|
377
|
+
if self.reply_trouble == "overthought":
|
|
378
|
+
what = (
|
|
379
|
+
f"the reply thought for over {format_tokens(self.settings.think_budget)} tokens without "
|
|
380
|
+
"acting (think_budget), so lcode stopped it"
|
|
381
|
+
)
|
|
382
|
+
self.console.print(Text(f" ⎿ {what}: asking for a short answer{off}{kept}", style="yellow"))
|
|
383
|
+
note = stall_note(self.reply_trouble, thinking_off=pause, thought=dropped.get("thinking") or "")
|
|
358
384
|
self.messages.append({"role": "user", "content": note})
|
|
359
385
|
continue
|
|
360
386
|
times = "twice in a row" if stalls >= MAX_STALLS else f"{stalled} times in this request"
|
|
@@ -86,6 +86,7 @@ class Settings:
|
|
|
86
86
|
secret_check: bool = True # scan what git commit and git push would add (lcode.secretscan)
|
|
87
87
|
compact_at: int = 0 # tokens: make room at this size even when the window is larger (0: only at 85%)
|
|
88
88
|
repeat_limit: int = 3 # identical calls with identical results before the model is told (lcode.repeats)
|
|
89
|
+
think_budget: int = 7000 # tokens a reply may think before it writes or calls a tool (0: no limit)
|
|
89
90
|
checks: str = "off" # the project's checks after a change (lcode.checks): auto, off or a command
|
|
90
91
|
review: str = "off" # check a change against the request before the answer (lcode.review): auto or off
|
|
91
92
|
escalate_model: str | None = None # a stronger model to ask when stuck (lcode.escalate): provider/model
|
|
@@ -191,7 +192,7 @@ class AgentBase:
|
|
|
191
192
|
self.turn_status = "" # how the last request ended: success, max_steps, loop, blocked
|
|
192
193
|
self.repeats = Repeats(settings.repeat_limit) # notices when the model repeats itself
|
|
193
194
|
self.sites = Sites(NOTE_AT if settings.repeat_limit else 0) # notices a site this machine can't reach
|
|
194
|
-
self.reply_trouble = "" # what went wrong with the last reply: "circles", "cut_off" or ""
|
|
195
|
+
self.reply_trouble = "" # what went wrong with the last reply: "circles", "overthought", "cut_off" or ""
|
|
195
196
|
self.response = None # the streaming response, so another thread can abort it
|
|
196
197
|
self.ctx_used = 0
|
|
197
198
|
self._repo: tuple[Path, repoid.Repo | None] | None = None # the workspace's repository, for saved sessions
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from collections.abc import Iterable
|
|
6
|
+
from pathlib import Path
|
|
6
7
|
from typing import TYPE_CHECKING, cast
|
|
7
8
|
|
|
8
9
|
from lcode import (
|
|
@@ -115,17 +116,30 @@ class Checks(AgentBase):
|
|
|
115
116
|
def model_ran_checks(self, command: str, result: str) -> bool:
|
|
116
117
|
"""Whether a command the model ran was the project's checks, and they passed."""
|
|
117
118
|
check = self.project_check()
|
|
118
|
-
if check is None or not checks.covers(check, command) or checks.
|
|
119
|
+
if check is None or not checks.covers(check, command) or not checks.run_passed(check, command, result):
|
|
119
120
|
return False
|
|
120
121
|
self.check_results.append({"command": check.command, "exit_code": 0, "by": "model"})
|
|
121
122
|
return True
|
|
122
123
|
|
|
124
|
+
def check_folder(self, check: checks.Check) -> Path:
|
|
125
|
+
"""Where the checks run: the project's root, wherever the model's last `cd` left its shell. A command from the
|
|
126
|
+
user's own setting runs where they started lcode."""
|
|
127
|
+
return self.workspace if check.source == checks.YOUR_SETTING else project_root_or_cwd(self.cwd)
|
|
128
|
+
|
|
129
|
+
def files_changed(self) -> list[str]:
|
|
130
|
+
"""The files this request changed, with the model's file tools or with its shell commands."""
|
|
131
|
+
return [*self.tools.before, *self.checkpoints.changed_so_far()]
|
|
132
|
+
|
|
123
133
|
def run_check(self, check: checks.Check, round_: int) -> str | None:
|
|
124
134
|
"""Run the checks after a change. Returns what to tell the model when they fail, else None."""
|
|
125
135
|
self.say(f"Checking the work: {check.command} (from {check.source})")
|
|
126
136
|
result = self.replay.check_result(check.command) if self.replay is not None else None
|
|
127
137
|
if result is None:
|
|
128
|
-
|
|
138
|
+
here, self.cwd = self.cwd, self.check_folder(check)
|
|
139
|
+
try:
|
|
140
|
+
result = self.tools.run("bash", {"command": check.command, "timeout": checks.TIMEOUT})
|
|
141
|
+
finally:
|
|
142
|
+
self.cwd = here
|
|
129
143
|
code = checks.exit_code(result)
|
|
130
144
|
if self.trace is not None:
|
|
131
145
|
self.trace.check(check.command, result, code)
|
|
@@ -138,15 +152,34 @@ class Checks(AgentBase):
|
|
|
138
152
|
return None
|
|
139
153
|
if checks.no_tests(check, result):
|
|
140
154
|
self.say(f"The checks found no tests to run ({check.command}).")
|
|
141
|
-
|
|
142
|
-
if checks.missing(check, result):
|
|
155
|
+
elif checks.missing(check, result):
|
|
143
156
|
self.say(
|
|
144
157
|
f"The checks couldn't run ({check.command}): {result.splitlines()[0][:160]}. Install what they need, "
|
|
145
158
|
'or set the command: lcode config set checks "…" (or checks off).',
|
|
146
159
|
warning=True,
|
|
147
160
|
)
|
|
148
|
-
|
|
149
|
-
|
|
161
|
+
elif checks.no_test_ran(check, result) and not checks.names_any(result, self.files_changed()):
|
|
162
|
+
self.say(
|
|
163
|
+
f"The checks stopped before running a test ({check.command}): {checks.stop_reason(result)} It doesn't "
|
|
164
|
+
"name a file this request changed, so the model isn't asked to fix it. To get checks that run, fix "
|
|
165
|
+
'that or set the command: lcode config set checks "…" (or checks off).',
|
|
166
|
+
warning=True,
|
|
167
|
+
)
|
|
168
|
+
else:
|
|
169
|
+
return self.failed_check(check, result, code, round_)
|
|
170
|
+
self.check_results[-1]["exit_code"] = None # no test ran: whoever reads this later shouldn't read a failure
|
|
171
|
+
return None
|
|
172
|
+
|
|
173
|
+
def failed_check(self, check: checks.Check, result: str, code: int, round_: int) -> str:
|
|
174
|
+
"""Say that the checks failed, or didn't finish; what to tell the model."""
|
|
175
|
+
if checks.timed_out(result):
|
|
176
|
+
self.check_results[-1]["exit_code"] = None
|
|
177
|
+
self.say(
|
|
178
|
+
f"The checks didn't finish in {checks.TIMEOUT} seconds and were stopped ({check.command}). To use a "
|
|
179
|
+
'faster command: lcode config set checks "…" (or checks off).',
|
|
180
|
+
warning=True,
|
|
181
|
+
)
|
|
182
|
+
elif round_ >= checks.MAX_ROUNDS:
|
|
150
183
|
then = "" if self.can_escalate() else ": the model will say what's left"
|
|
151
184
|
self.say(f"Checks still fail ({check.command}, exit code {code}){then}.", warning=True)
|
|
152
185
|
else:
|
|
@@ -41,6 +41,8 @@ GPU_MEMORY_ERRORS = (
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
SAFE_NUM_BATCH = 512 # Ollama's default prompt batch
|
|
44
|
+
# Characters a thinking token takes: qwen3.6's long thinking on the dev slice, as Ollama counted it (median 3.3).
|
|
45
|
+
THINK_CHARS_PER_TOKEN = 3.3
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
class Progress:
|
|
@@ -229,7 +231,11 @@ class ModelCalls(AgentBase):
|
|
|
229
231
|
"""Stream one model response, rendering thinking/content live. Returns the assistant message.
|
|
230
232
|
|
|
231
233
|
`think=False` asks for this reply without thinking, even when thinking is on: after a reply that went
|
|
232
|
-
round in circles, so the model acts instead of starting the same deliberation over.
|
|
234
|
+
round in circles, so the model acts instead of starting the same deliberation over.
|
|
235
|
+
|
|
236
|
+
A reply that thinks past `think_budget` tokens before it writes anything or calls a tool is stopped
|
|
237
|
+
(`reply_trouble` "overthought"): on the dev slice, 2 of 102 attempts that passed had one, against 42 of 110
|
|
238
|
+
that failed (#241)."""
|
|
233
239
|
content, thinking, tool_calls, final = "", "", [], {}
|
|
234
240
|
md = MarkdownStreamer(self.console)
|
|
235
241
|
progress = Progress(steering=self.steering)
|
|
@@ -251,6 +257,7 @@ class ModelCalls(AgentBase):
|
|
|
251
257
|
|
|
252
258
|
start_spinner()
|
|
253
259
|
circles = Circles()
|
|
260
|
+
budget = self.settings.think_budget * THINK_CHARS_PER_TOKEN
|
|
254
261
|
self.reply_trouble = ""
|
|
255
262
|
stream = self.chat(self.messages, self.tool_schemas(), self.settings.think and think)
|
|
256
263
|
try:
|
|
@@ -273,6 +280,10 @@ class ModelCalls(AgentBase):
|
|
|
273
280
|
if self.settings.repeat_limit and circles.feed(msg["thinking"]):
|
|
274
281
|
self.reply_trouble = "circles"
|
|
275
282
|
break # closing the stream below stops the model
|
|
283
|
+
acted = content.strip() or (msg.get("content") or "").strip() or tool_calls or msg.get("tool_calls")
|
|
284
|
+
if budget and len(thinking) > budget and not acted:
|
|
285
|
+
self.reply_trouble = "overthought"
|
|
286
|
+
break
|
|
276
287
|
if msg.get("content"):
|
|
277
288
|
if printed_thinking:
|
|
278
289
|
self.console.print("\n")
|