tether-sdk 0.2.13__tar.gz → 0.2.14__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.
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/AGENTS.md +5 -5
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/PKG-INFO +10 -7
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/README.md +9 -6
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/history.jsonl +1 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/run.py +5 -3
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/architecture.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/benchmarks.md +6 -6
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/guides/a-pipeline-with-checks.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/guides/fix-a-failing-test.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/guides/use-tether-from-your-agent.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/agent-interface.md +2 -3
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/cli.md +1 -2
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/context-and-store.md +27 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/providers.md +2 -2
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/release-notes.md +16 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/troubleshooting.md +8 -8
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/agent-interface.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/cli-and-headless.md +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/conftest.py +3 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_lifecycle.py +5 -2
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_limits.py +5 -5
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_quirks.py +13 -8
- tether_sdk-0.2.14/e2e/test_restart.py +37 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_declarative.py +20 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_agent_interface.py +5 -6
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_benchmarks_docs.py +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_cli_docs.py +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_harness.py +35 -29
- tether_sdk-0.2.14/tests/test_restart.py +172 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_tether.py +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/__init__.py +1 -1
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/api.py +0 -7
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/context.py +90 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/harness.py +98 -30
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/__init__.py +4 -2
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru/active/.gitkeep +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru/active/north-star.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru/archive/.gitkeep +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru/archive/v0-2-bugs.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru/archive/work-on-v0-2-4.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.claude/gru.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.github/workflows/ci.yml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.github/workflows/delivery.yml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.github/workflows/docs.yml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/.gitignore +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/CONTRIBUTING.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/LICENSE +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/README.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/canary.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/canary_baseline.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/compare.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/grade.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/harness-bench/README.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/harness-bench/tether-adapter.patch +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/base.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/baseline/harness.jsonl +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/baseline/ladder.jsonl +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/charts.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/probe.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/refs.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/report.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/snapshot.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/tasks.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/ladder/validate.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/naive_agent.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/report.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/run.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/hidden/test_hidden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ref/calc/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ref/calc/errors.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ref/calc/evaluator.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ref/calc/parser.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ref/calc/tokenizer.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/calc/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/calc/errors.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/calc/evaluator.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/calc/parser.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/calc/tokenizer.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/tests/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-hard/ws/tests/test_calc.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/hidden/test_hidden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/cli.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/ledger/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/ledger/parser.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/ledger/report.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/sample.csv +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/tests/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-medium/ws/tests/test_report.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-simple/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-simple/hidden/test_hidden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-simple/ws/tests/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-simple/ws/tests/test_textutils.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/code-simple/ws/textutils.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/codereview/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/codereview/ws/inventory.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/content/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/content/ws/.keep +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/hidden/test_hidden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/AGENTS.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/README.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/docs/architecture.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/docs/style.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/mini/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/mini/cli.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/mini/fmt.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/mini/stats.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/mini/textio.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/tests/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/focus/ws/tests/test_stats.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/plan/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/plan/ws/README.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/plan/ws/svc/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/plan/ws/svc/client.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/plan/ws/svc/config.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/qa/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/qa/ws/.keep +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/review/goal.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/bench/tasks/review/ws/paper.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/extending.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/glossary.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/guides/add-your-own-tool.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/index.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/javascripts/mathjax.js +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/img/harness-cost.svg +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/img/harness-pass.svg +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/img/task-grid.svg +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/img/tiers.svg +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/index.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/ladder/results.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/llms.txt +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/harness.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/index.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/multiplexer-and-decorator.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/sandbox-and-skills.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/reference/tools.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/built-in-tools.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/index.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/multi-agent.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/sdk-and-custom-tools.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/security-and-sandbox.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/skills.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/docs/tutorial/workflows-and-telemetry.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/proxy.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_agents.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_defaults.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_faults.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_sandbox.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/e2e/test_surface.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/README.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/checks.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/course.yaml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/ruff.toml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/skills/planner/SKILL.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/skills/searcher/SKILL.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/skills/searcher/tools.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/skills/writer/SKILL.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/examples/course/skills/writer/tools.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/mkdocs.yml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/pyproject.toml +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/scripts/record_golden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/skills/researcher/SKILL.md +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/conftest.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/fixtures/dialects.jsonl +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/coding_edit_failure_modes.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/coding_edit_failure_modes.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/done_nudge.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/done_nudge.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/read_range_pingpong.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/read_range_pingpong.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/research_web.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/research_web.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/shell_wrappers.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/shell_wrappers.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/waiting_input_resume.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/golden/waiting_input_resume.snap.json +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_anthropic.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_base.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_dialects.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_ollama.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_openai.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/providers/test_retry.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_cli.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_context.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_context_config.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_decorator.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_docs_structure.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_edit_tool.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_golden.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_guides_docs.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_integration.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_llms_txt.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_misses.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_multiplexer.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_params.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_pipeline.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_providers_docs.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_quiet_and_fold.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_readme.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_release_hardening.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_repeat_reads.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_retro.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_sandbox.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_security_hardening.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_skills.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_store.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_structured_history.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/test_troubleshooting_docs.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_agent.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_bash.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_done.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_edit.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_mem.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tests/tools/test_web.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/cli.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/decorator.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/mcp.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/multiplexer.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/pipeline.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/anthropic.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/base.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/declarative.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/ollama.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/providers/openai.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/retro.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/sandbox.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/schema.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/skills.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/store.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/__init__.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/agent.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/bash.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/done.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/edit.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/mem.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/tether/tools/web.py +0 -0
- {tether_sdk-0.2.13 → tether_sdk-0.2.14}/uv.lock +0 -0
|
@@ -52,10 +52,10 @@ Reviewers and the Team Leader cite the failing line when they reject a change.
|
|
|
52
52
|
|
|
53
53
|
### Rule 3: Explicit Termination (`act("done", stdin="...")`), Interactive Inquiry (`done --ask`), & Pre-`done` Verification Gates
|
|
54
54
|
- Sessions do **not** terminate simply because the model emitted a text response without a tool call (small 9B models frequently "think out loud" before acting).
|
|
55
|
-
- A task only completes when the agent explicitly calls `act("done", stdin="<final deliverable>")` (or `act("done '<short answer>'")`), pauses for human/parent input via `act("done --ask", stdin="<question>")` (transitioning the session to `WAITING_INPUT` and releasing the worker process until resumed via `send`), or hits `max_steps
|
|
55
|
+
- A task only completes when the agent explicitly calls `act("done", stdin="<final deliverable>")` (or `act("done '<short answer>'")`), pauses for human/parent input via `act("done --ask", stdin="<question>")` (transitioning the session to `WAITING_INPUT` and releasing the worker process until resumed via `send`), or hits `max_steps` (handed back as `WAITING_INPUT`, `send` resumes it with a fresh budget). A bare `done` (no answer, no stdin) completes with the result `Done.` and still runs the `verify` gates; `done --ask` with no question is an error (#169).
|
|
56
56
|
- If the model emits plain text without calling `act`, the harness appends a brief deterministic nudge reminding it to either execute a command or call `done`.
|
|
57
|
-
- After 6 consecutive read-only/verification steps following a change, the harness appends a `[NUDGE]` to that step's observation reminding the model to call `done` if the task is complete, repeated every 8 more quiet steps until the next change (0 static prompt tokens, #74, #132). Once per session, at 75% of `max_steps` (limits of 8 or more), a one-line `[NUDGE]` says how many steps are left (#133). Before any change, 12 read-only steps in a row (then every 8 more) append a one-line `[NUDGE]` to make the edit or call `done` (#127). Seven reads of one file in a row with no change are a `cycle_stall`, and 4 stall warnings without a change
|
|
58
|
-
- When `verify` gate commands are configured (via `Harness(verify=[...])`, CLI `--verify`, or Skill YAML `verify: [...]`), `Harness.execute_session` deterministically executes each command inside the session's `SandboxPolicy` before allowing `done` to transition to `COMPLETED` (consuming 0 static prompt tokens until a gate fails). A gate that errors instead of failing (sandbox violation, exit 124/126/127) ends the session `FAILED` at once as `gate_error` ("gate misconfigured"), without counting toward the consecutive-failure abort. When the stall guard is about to
|
|
57
|
+
- After 6 consecutive read-only/verification steps following a change, the harness appends a `[NUDGE]` to that step's observation reminding the model to call `done` if the task is complete, repeated every 8 more quiet steps until the next change (0 static prompt tokens, #74, #132). Once per session, at 75% of `max_steps` (limits of 8 or more), a one-line `[NUDGE]` says how many steps are left (#133). Before any change, 12 read-only steps in a row (then every 8 more) append a one-line `[NUDGE]` to make the edit or call `done` (#127). Seven reads of one file in a row with no change are a `cycle_stall`, and 4 stall warnings without a change (#92) first get one `[WRAP UP]` turn (a read-only session is asked for its final answer, a session that already changed something is asked to call `done` with what is done and what is left, unless its `verify` gates or green test already finish it). Being stuck any way (the stall guard's warnings still unanswered after the wrap-up, or the same check command failing 3 times with an edit in between) restarts the session: one `restart` turn (event_type `restart`, at most 6000 chars: the files as the model left them, the last failing output, counts of what was tried; failed commands are not replayed) and the history continues from that turn alone. After 2 restarts, being stuck again hands the task back: the session ends `WAITING_INPUT` (exit code 2) with a `[STUCK ...]` summary as its result, so the caller can refine the request and `send` it. 0 static prompt tokens, no extra model call; `tether stop <id>` terminates a detached worker (#89). After the same check command (a test run) has failed 3 times with an edit in between, the harness adds one `restart` turn (event_type `restart`, at most 6000 chars: the files as the model left them, the last failing output, and counts of what was tried) and continues from that turn alone; failed commands are not replayed, at most one restart per session, and everything before it stays in SQLite (0 static prompt tokens, no extra model call).
|
|
58
|
+
- When `verify` gate commands are configured (via `Harness(verify=[...])`, CLI `--verify`, or Skill YAML `verify: [...]`), `Harness.execute_session` deterministically executes each command inside the session's `SandboxPolicy` before allowing `done` to transition to `COMPLETED` (consuming 0 static prompt tokens until a gate fails). A gate that errors instead of failing (sandbox violation, exit 124/126/127) ends the session `FAILED` at once as `gate_error` ("gate misconfigured"), without counting toward the consecutive-failure abort. When the stall guard is about to restart or hand back a session and gates are configured, it runs them first: a change was made and every gate passes, so the session ends `COMPLETED` ("Finished by the harness"), since the deterministic gate is the completion criterion the caller asked for (#163). With no gates, the model's own last passing test run (runner-recognised, nothing changed since, still green when re-run) is the implicit gate, at a stall and at the step cap; a passing run after a change also appends a one-line `[NUDGE]` to call `done` (#177).
|
|
59
59
|
|
|
60
60
|
### Rule 4: Progressive `--help` (JIT Schema Disclosure)
|
|
61
61
|
- The system prompt lists at most **1 line per enabled tool namespace** (`- <name>: <short summary>`, target **≤ 12 tokens per entry**).
|
|
@@ -127,12 +127,12 @@ tether/
|
|
|
127
127
|
- Default DB path: `.tether/tether.db` (configurable via `TETHER_DB` or `Harness(db_path=...)`) with `PRAGMA journal_mode=WAL;`.
|
|
128
128
|
- Tables:
|
|
129
129
|
- `sessions`: `id`, `parent_id`, `status` (`PENDING`, `RUNNING`, `WAITING_INPUT`, `COMPLETED`, `FAILED`), `model`, `skill`, `tools_json`, `sandbox_json`, `goal`, `result`, `step_count`, `max_steps`, `peak_tokens`, `total_prompt_tokens`, `total_completion_tokens`, `pid`, `created_at`, `updated_at`.
|
|
130
|
-
- `turns`: `id`, `session_id`, `step`, `role`, `content`, `tool_cmd`, `tool_stdin`, `obs_id`, `prompt_tokens`, `completion_tokens`, `duration_ms`, `event_type` (`ok` | `nudge` | `loop_stall` | `cycle_stall` | `syntax_error` | `tool_error` | `gate_fail` | `gate_error` | `completed`), `created_at`.
|
|
130
|
+
- `turns`: `id`, `session_id`, `step`, `role`, `content`, `tool_cmd`, `tool_stdin`, `obs_id`, `prompt_tokens`, `completion_tokens`, `duration_ms`, `event_type` (`ok` | `nudge` | `loop_stall` | `cycle_stall` | `syntax_error` | `tool_error` | `gate_fail` | `gate_error` | `completed` | `restart`), `created_at`.
|
|
131
131
|
- `observations`: `id`, `session_id`, `step`, `cmd`, `raw_output`, `summary`, `char_len`.
|
|
132
132
|
- `chunks_fts` *(SQLite FTS5 Virtual Table)*: `session_id`, `source_type` (`result` | `observation` | `pin`), `source_id`, `chunk_index`, `content` — automatically indexes ~150-token paragraph/heading chunks of all observations, pins, and final `done` deliverables for sub-millisecond BM25 RAG (including cross-session project search via `mem search --project <query>`).
|
|
133
133
|
- `pins`: `session_id`, `key`, `value` (supports session-scoped working memory and workspace-wide semantic facts under `GLOBAL_SESSION_ID = "__project__"` via `mem pin --project <key> <val>`).
|
|
134
134
|
- `inbox`: `id`, `session_id`, `message`, `consumed` (`0` or `1`), `created_at`.
|
|
135
|
-
- **Agent-to-Agent Interface (`api.py`, `mcp.py`):** `--json` outputs (schema `v: 1`), exit codes `0` completed / `1` usage / `2` waiting
|
|
135
|
+
- **Agent-to-Agent Interface (`api.py`, `mcp.py`):** `--json` outputs (schema `v: 1`), exit codes `0` completed / `1` usage / `2` waiting (also stuck or out of steps, handed back) / `3` gate / `5` worker error, failure text on stderr, `--result-file`, `--output-schema`, `tether events`. `tether mcp` serves the same JSON over stdio and requires the optional `tether-sdk[mcp]` extra (official `mcp` SDK, imported lazily so core stays dependency-light; Rule 7 allows it as an extra only); its sandbox is always rooted at `--workspace` and callers can only narrow it. Details: `docs/reference/agent-interface.md`.
|
|
136
136
|
- **Telemetry & Failure-Mode Inspector (`tether stats`):**
|
|
137
137
|
- `tether stats [--model <m>] [--skill <s>] [--limit <n>]` aggregates per-model pass rates, cumulative token economy (`total_prompt_tokens + total_completion_tokens`), step latency, and self-healing ACI friction (`nudge`, `loop_stall`, `cycle_stall`, `syntax_error`, `tool_error`, `gate_fail`, `gate_error`), plus a top-offenders breakdown by tool command.
|
|
138
138
|
- **Post-Mortem Distillation (`tether retro <session_id> [--apply] [--model <m>]`):** offline only (never mutates a live prompt). `store.extract_friction_trace` pulls `inbox` corrections and `loop_stall`/`cycle_stall`/`syntax_error`/`tool_error`/`gate_fail`/`gate_error` turns (+ the fixing command); one bounded LLM pass yields ≤2 rules (≤30 tokens each, deduped against existing rules). Prints a unified diff of `SKILL.md`; `--apply` appends under `## Learned Rules` (or pins to project memory when no skill was used).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tether-sdk
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.14
|
|
4
4
|
Summary: General-purpose, headless-first LLM-Native micro-harness for small language models
|
|
5
5
|
Project-URL: Homepage, https://github.com/igormcsouza/tether
|
|
6
6
|
Project-URL: Repository, https://github.com/igormcsouza/tether
|
|
@@ -47,13 +47,13 @@ Tether is built the other way round:
|
|
|
47
47
|
|
|
48
48
|
Tether answers to one number: how many real coding exercises a small local model finishes. On the Polyglot-Python set (Aider's 34 Python exercises, graded by each exercise's own tests), `qwen3.5:9b` through Ollama at the default 8192-token context, 2 trials each (68 runs):
|
|
49
49
|
|
|
50
|
-
| | before v0.2.10 | v0.2.10 |
|
|
51
|
-
|
|
52
|
-
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) |
|
|
53
|
-
| Mean score | 0.718 | 0.763 |
|
|
54
|
-
| Runs killed by the wall cap | 11 | 14 |
|
|
50
|
+
| | before v0.2.10 | v0.2.10 | v0.2.13 |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) | 37 of 68 (54.4%) |
|
|
53
|
+
| Mean score | 0.718 | 0.763 | 0.783 |
|
|
54
|
+
| Runs killed by the wall cap | 11 | 14 | 13 |
|
|
55
55
|
|
|
56
|
-
The target is 80% by v0.3.0, so this is the number every change is ranked by
|
|
56
|
+
The target is 80% by v0.3.0, so this is the number every change is ranked by. v0.2.13 is not distinguishable from v0.2.10 (paired score delta +0.020, 95% interval -0.060 to +0.101). One run is noisy (about 0.1), so read the pass count and the failure breakdown, not one decimal. The second yardstick is the [Coding Ladder](https://igormcsouza.github.io/tether/ladder/): 24 tasks, 6 tiers of difficulty times write, bugfix, plan and review, which shows how far up a model climbs and what stops it. Method, how to reproduce both and fair-comparison rules: [Benchmarks](https://igormcsouza.github.io/tether/benchmarks/).
|
|
57
57
|
|
|
58
58
|
## How it works
|
|
59
59
|
|
|
@@ -140,3 +140,6 @@ docs/ the user site (MkDocs)
|
|
|
140
140
|
2. **Wang, X., Chen, Y., Yuan, L., Zhang, Y., Li, Y., Peng, H., & Ji, H. (2024).** *Executable Code Actions Elicit Better LLM Agents (CodeAct)*. In **Proceedings of the 41st International Conference on Machine Learning (ICML 2024)**. [arXiv:2402.01030](https://arxiv.org/abs/2402.01030)
|
|
141
141
|
3. **Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., & Press, O. (2024).** *SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering*. In **Advances in Neural Information Processing Systems (NeurIPS 2024)**. [arXiv:2405.15793](https://arxiv.org/abs/2405.15793)
|
|
142
142
|
4. **Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., & Gonzalez, J. E. (2023).** *MemGPT: Towards LLMs as Operating Systems*. [arXiv:2310.08560](https://arxiv.org/abs/2310.08560)
|
|
143
|
+
5. **Gumaan, E. (2026).** *Feedback That Backfires: Why Small Language Model Agents Repeat the Call They Just Watched Fail*. Source of the restart rule: after repeated failures, start a context that describes the state instead of replaying the failed attempts. [arXiv:2608.23651](https://arxiv.org/abs/2608.23651)
|
|
144
|
+
6. **Kim, J., et al. (2026).** *Scaling Test-Time Compute for Agentic Coding*. A restart carries a summary of what was tried, not the transcript. [arXiv:2604.16529](https://arxiv.org/abs/2604.16529)
|
|
145
|
+
7. **Yang, Z. (2026).** *Why Retrying Fails: Context Contamination in LLM Agent Pipelines*. Why a retry should not replay the failed context. [arXiv:2605.08563](https://arxiv.org/abs/2605.08563)
|
|
@@ -26,13 +26,13 @@ Tether is built the other way round:
|
|
|
26
26
|
|
|
27
27
|
Tether answers to one number: how many real coding exercises a small local model finishes. On the Polyglot-Python set (Aider's 34 Python exercises, graded by each exercise's own tests), `qwen3.5:9b` through Ollama at the default 8192-token context, 2 trials each (68 runs):
|
|
28
28
|
|
|
29
|
-
| | before v0.2.10 | v0.2.10 |
|
|
30
|
-
|
|
31
|
-
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) |
|
|
32
|
-
| Mean score | 0.718 | 0.763 |
|
|
33
|
-
| Runs killed by the wall cap | 11 | 14 |
|
|
29
|
+
| | before v0.2.10 | v0.2.10 | v0.2.13 |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) | 37 of 68 (54.4%) |
|
|
32
|
+
| Mean score | 0.718 | 0.763 | 0.783 |
|
|
33
|
+
| Runs killed by the wall cap | 11 | 14 | 13 |
|
|
34
34
|
|
|
35
|
-
The target is 80% by v0.3.0, so this is the number every change is ranked by
|
|
35
|
+
The target is 80% by v0.3.0, so this is the number every change is ranked by. v0.2.13 is not distinguishable from v0.2.10 (paired score delta +0.020, 95% interval -0.060 to +0.101). One run is noisy (about 0.1), so read the pass count and the failure breakdown, not one decimal. The second yardstick is the [Coding Ladder](https://igormcsouza.github.io/tether/ladder/): 24 tasks, 6 tiers of difficulty times write, bugfix, plan and review, which shows how far up a model climbs and what stops it. Method, how to reproduce both and fair-comparison rules: [Benchmarks](https://igormcsouza.github.io/tether/benchmarks/).
|
|
36
36
|
|
|
37
37
|
## How it works
|
|
38
38
|
|
|
@@ -119,3 +119,6 @@ docs/ the user site (MkDocs)
|
|
|
119
119
|
2. **Wang, X., Chen, Y., Yuan, L., Zhang, Y., Li, Y., Peng, H., & Ji, H. (2024).** *Executable Code Actions Elicit Better LLM Agents (CodeAct)*. In **Proceedings of the 41st International Conference on Machine Learning (ICML 2024)**. [arXiv:2402.01030](https://arxiv.org/abs/2402.01030)
|
|
120
120
|
3. **Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., & Press, O. (2024).** *SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering*. In **Advances in Neural Information Processing Systems (NeurIPS 2024)**. [arXiv:2405.15793](https://arxiv.org/abs/2405.15793)
|
|
121
121
|
4. **Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., & Gonzalez, J. E. (2023).** *MemGPT: Towards LLMs as Operating Systems*. [arXiv:2310.08560](https://arxiv.org/abs/2310.08560)
|
|
122
|
+
5. **Gumaan, E. (2026).** *Feedback That Backfires: Why Small Language Model Agents Repeat the Call They Just Watched Fail*. Source of the restart rule: after repeated failures, start a context that describes the state instead of replaying the failed attempts. [arXiv:2608.23651](https://arxiv.org/abs/2608.23651)
|
|
123
|
+
6. **Kim, J., et al. (2026).** *Scaling Test-Time Compute for Agentic Coding*. A restart carries a summary of what was tried, not the transcript. [arXiv:2604.16529](https://arxiv.org/abs/2604.16529)
|
|
124
|
+
7. **Yang, Z. (2026).** *Why Retrying Fails: Context Contamination in LLM Agent Pipelines*. Why a retry should not replay the failed context. [arXiv:2605.08563](https://arxiv.org/abs/2605.08563)
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
{"date": "2026-10-27", "version": "main@b25cbbe", "model": "ollama/qwen3.5:9b", "runner": "tether", "tasks": "polyglot-fast-12", "trials": 2, "context": 8192, "note": "same runs as baseline, fast subset", "runs": 24, "passed": 12, "pass_rate": 0.5, "mean_score": 0.711, "fail_max_steps": 8, "fail_wall_cap": 3, "mean_steps": 20.7, "mean_prompt_tokens": 94828, "mean_wall_s": 265}
|
|
3
3
|
{"date": "2026-10-27", "version": "naive_agent", "model": "ollama/qwen3.5:9b", "runner": "naive", "tasks": "polyglot-fast-12", "trials": 2, "context": 8192, "note": "no-harness ceiling reference", "runs": 24, "passed": 3, "pass_rate": 0.125, "mean_score": 0.243, "fail_max_steps": 0, "fail_wall_cap": 0, "mean_steps": 4.7, "mean_prompt_tokens": 8054, "mean_wall_s": 55}
|
|
4
4
|
{"date": "2026-10-28", "version": "v0.2.10", "model": "ollama/qwen3.5:9b", "runner": "tether", "tasks": "polyglot-34", "trials": 2, "context": 8192, "note": "v0.2.10 full run, --poly-verify; flat vs baseline: 14 wall-cap runs still lose to 4-6k-token empty turns", "runs": 68, "passed": 35, "pass_rate": 0.515, "mean_score": 0.763, "fail_max_steps": 18, "fail_wall_cap": 14, "mean_steps": 17.9, "mean_prompt_tokens": 77722, "mean_wall_s": 281}
|
|
5
|
+
{"date": "2026-11-03", "version": "v0.2.13", "model": "ollama/qwen3.5:9b", "runner": "tether", "tasks": "polyglot-34", "trials": 2, "context": 8192, "note": "v0.2.13 full run, --poly-verify, released wheel; flat vs v0.2.10 (paired score delta +0.020, CI -0.060..+0.101, pass flips +7/-5, p=0.77)", "runs": 68, "passed": 37, "pass_rate": 0.544, "mean_score": 0.783, "fail_max_steps": 18, "fail_wall_cap": 13, "mean_steps": 17.9, "mean_prompt_tokens": 77190, "mean_wall_s": 287}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Per (model, kind) the tiers are tried in order. A tier gets up to 4 attempts, stopping at the first
|
|
7
7
|
pass: (0) thinking off, (1) thinking on, (2) thinking on + more steps/later folding, (3) thinking
|
|
8
|
-
off, temperature 0, more steps/later folding. A tier that fails all 4 ends that kind's ladder: the
|
|
8
|
+
off, temperature 0, more steps/later folding. A tier that fails all its attempts (`--attempts`, default 4) ends that kind's ladder: the
|
|
9
9
|
model never sees the next tier. Resumable: finished attempts are read back from results.jsonl.
|
|
10
10
|
"""
|
|
11
11
|
import argparse
|
|
@@ -172,6 +172,8 @@ def main():
|
|
|
172
172
|
ap.add_argument("--tether-bin", default="tether")
|
|
173
173
|
ap.add_argument("--provider", default="ollama", choices=list(PROVIDERS), help="where the model is served")
|
|
174
174
|
ap.add_argument("--harness", default="tether", choices=["tether", "naive", "opencode", "claude"])
|
|
175
|
+
ap.add_argument("--attempts", type=int, default=len(ATTEMPTS), choices=range(1, len(ATTEMPTS) + 1),
|
|
176
|
+
help="attempts per tier before that kind's ladder stops (default all; 2 = stop after two fails)")
|
|
175
177
|
ap.add_argument("--single", action="store_true", help="every task once (attempt 0), no stopping: the harness comparison")
|
|
176
178
|
a = ap.parse_args()
|
|
177
179
|
ctxs = dict(x.split("=") for x in a.ctx.split(",") if x)
|
|
@@ -188,7 +190,7 @@ def main():
|
|
|
188
190
|
if a.tasks and task.id not in a.tasks.split(","):
|
|
189
191
|
continue
|
|
190
192
|
passed = False
|
|
191
|
-
for attempt in range(1 if a.single else
|
|
193
|
+
for attempt in range(1 if a.single else a.attempts):
|
|
192
194
|
prev = [r for r in done if (r.get("harness", "tether"), r["model"], r["task"], r["attempt"]) == (a.harness, model, task.id, attempt)]
|
|
193
195
|
rec = prev[0] if prev else None
|
|
194
196
|
if rec is None:
|
|
@@ -197,7 +199,7 @@ def main():
|
|
|
197
199
|
with log.open("a") as fh:
|
|
198
200
|
fh.write(json.dumps(rec) + "\n")
|
|
199
201
|
print(f"{a.harness:8} {model:18} {task.id:9} a{attempt} think={int(rec['think'])} score={rec['score']:.2f} "
|
|
200
|
-
f"{'PASS' if rec['pass'] else 'fail'} {rec['wall_s']}s steps={rec.get('steps')} {rec['detail']}", flush=True)
|
|
202
|
+
f"{'PASS' if rec['pass'] else 'TIMEOUT' if rec['run_status'] == 'timeout' else 'fail'} {rec['wall_s']}s steps={rec.get('steps')} {rec['detail']}", flush=True)
|
|
201
203
|
if rec["pass"]:
|
|
202
204
|
passed = True
|
|
203
205
|
break
|
|
@@ -77,7 +77,7 @@ Local inference engines (`Ollama`, `llama.cpp`, `vLLM`) and cloud providers (`An
|
|
|
77
77
|
### Deterministic Loop-Stall Breaker & Pre-`done` Verification Gates
|
|
78
78
|
Small 8B/9B models occasionally fall into a probability trap where they emit the exact same command (`web search "..."` or `bash ...`) twice in a row, or prematurely call `done` while tests or linters are failing:
|
|
79
79
|
|
|
80
|
-
- **Loop-Stall Breaker:** `Harness.execute_session` tracks the `(cmd, stdin)` signature of the previous step and intercepts consecutive duplicates before executing the tool, returning a `[LOOP DETECTED]` nudge that forces the model to advance (direct wording from the second consecutive repeat). A read of an unchanged file whose earlier output is still live (`live_read_obs`) is answered once with a one-line `[obs_N unchanged]` pointer instead of re-running. A companion cycle detector (`detect_cycle`) catches a 2-command cycle repeated 3 times or a 3-command cycle repeated twice (6 actions, within the last 8), skips the repeated command, nudges with `[CYCLE DETECTED]` naming the commands, and records `cycle_stall`. Reading one file over varying line ranges 7 times in a row without a change (`edit view`, `sed -n`, `cat`, `grep`) is also a `cycle_stall`, which a repeated-command check cannot see. Four stall warnings without a change
|
|
80
|
+
- **Loop-Stall Breaker:** `Harness.execute_session` tracks the `(cmd, stdin)` signature of the previous step and intercepts consecutive duplicates before executing the tool, returning a `[LOOP DETECTED]` nudge that forces the model to advance (direct wording from the second consecutive repeat). A read of an unchanged file whose earlier output is still live (`live_read_obs`) is answered once with a one-line `[obs_N unchanged]` pointer instead of re-running. A companion cycle detector (`detect_cycle`) catches a 2-command cycle repeated 3 times or a 3-command cycle repeated twice (6 actions, within the last 8), skips the repeated command, nudges with `[CYCLE DETECTED]` naming the commands, and records `cycle_stall`. Reading one file over varying line ranges 7 times in a row without a change (`edit view`, `sed -n`, `cat`, `grep`) is also a `cycle_stall`, which a repeated-command check cannot see. Four stall warnings without a change restart the session from a short description of its state (twice at most, see [context and store](reference/context-and-store.md)) and then hand it back to the caller as `WAITING_INPUT` instead of spending every step; any edit or other non-read command resets the count.
|
|
81
81
|
- **Pre-`done` Verification Gates:** When configured via `Harness(verify=[...])`, CLI `--verify`, or Skill YAML `verify: [...]`, Tether intercepts `done` and runs each verification command inside the session's `SandboxPolicy`. It consumes **0 static prompt tokens** unless a gate exits non-zero—at which point termination is rejected and a compact `[VERIFICATION GATE FAILED]` observation is injected so the model can self-heal. A gate that errors rather than fails (sandbox violation, exit 124/126/127) ends the session `FAILED` immediately as `gate_error` instead of consuming retries.
|
|
82
82
|
|
|
83
83
|
### Connection Pooling & Thread-Local SQLite WAL Reuse
|
|
@@ -16,13 +16,13 @@ The **Polyglot-Python** set: the 34 Python exercises of Aider's [polyglot benchm
|
|
|
16
16
|
|
|
17
17
|
`qwen3.5:9b` through Ollama (`num_ctx` 8192), all 34 exercises, 2 trials per exercise (68 runs):
|
|
18
18
|
|
|
19
|
-
| | before v0.2.10 | v0.2.10 |
|
|
20
|
-
|
|
21
|
-
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) |
|
|
22
|
-
| Mean score | 0.718 | 0.763 |
|
|
23
|
-
| Runs killed by the wall cap | 11 | 14 |
|
|
19
|
+
| | before v0.2.10 | v0.2.10 | v0.2.13 |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| Passes | 35 of 68 (51.5%) | 35 of 68 (51.5%) | 37 of 68 (54.4%) |
|
|
22
|
+
| Mean score | 0.718 | 0.763 | 0.783 |
|
|
23
|
+
| Runs killed by the wall cap | 11 | 14 | 13 |
|
|
24
24
|
|
|
25
|
-
The
|
|
25
|
+
The change from v0.2.10 to v0.2.13 is inside the noise: the paired score delta is +0.020 with a 95% interval of -0.060 to +0.101, and 7 exercises flipped up against 5 down. The runs that still fail either use all 30 steps (18 of 31) or hit the 600 s wall cap (13 of 31), and 11 of the 34 exercises (bowling, connect, forth, hangman, poker, pov, react, scale-generator, sgf-parsing, transpose, wordy) did not pass in either trial. The [Coding Ladder](ladder/index.md) is the second yardstick: it shows where a model stops climbing instead of one pass rate.
|
|
26
26
|
|
|
27
27
|
**Read these numbers with care.** One run of one exercise is noisy (about 0.1 of score), 24 runs are a small sample, and a local server can time out for reasons that have nothing to do with tether. A difference smaller than that noise is not a result. The *failure breakdown* in the report keeps provider outages and timeouts apart from harness outcomes (`max_steps`, `stalled`, `wrong_answer`, `worker_error`) so you can see which one moved.
|
|
28
28
|
|
|
@@ -63,7 +63,7 @@ ses_f6b0921b COMPLETED ... 2/15 Read changes.txt and call done with the l
|
|
|
63
63
|
|
|
64
64
|
## When it goes wrong
|
|
65
65
|
|
|
66
|
-
- **A stage ends `
|
|
66
|
+
- **A stage ends `[STUCK: out of steps]`.** The pipeline waits (`WAITING_INPUT`) with what the stage did. Raise `max_steps` for that stage (or for the whole pipeline); progress that lives in files is what you keep.
|
|
67
67
|
- **A stage's gate keeps failing.** Run the gate command by hand; make the stage goal name the file it must produce.
|
|
68
68
|
- **Invalid manifest.** `Error: invalid pipeline ...` and exit code 1 name the field.
|
|
69
69
|
|
|
@@ -58,7 +58,7 @@ prints, per model, how many sessions passed, the average steps and tokens, and w
|
|
|
58
58
|
|
|
59
59
|
## When it goes wrong
|
|
60
60
|
|
|
61
|
-
- **`
|
|
61
|
+
- **`WAITING_INPUT` with `[STUCK ...]`, exit code 2.** The model repeated itself or kept failing the same test, tether restarted it twice from a short description of the state, and it was still stuck. The result says what was tried. `tether send <id> "<guidance>"` to continue, name the file and the edit in the goal, or use a stronger model.
|
|
62
62
|
- **`FAILED: Verification gate ... misconfigured`.** The gate command itself is broken (command not found, sandbox refused it). Run the gate by hand first.
|
|
63
63
|
- **Not sure the gate is strict enough?** A gate that exits `0` when its input is missing checks nothing. Make it fail when the file or test is absent.
|
|
64
64
|
|
|
@@ -50,7 +50,7 @@ Any agent that can run a shell command can delegate the same way. The exit code
|
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
tether run --json --model ollama/qwen3.5:9b --verify "pytest -q" "fix the failing tests"
|
|
53
|
-
echo $? # 0 done, 1 usage error, 2 needs input, 3 gate failed,
|
|
53
|
+
echo $? # 0 done, 1 usage error, 2 needs input or stuck (handed back), 3 gate failed, 5 error
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Two-way
|
|
@@ -14,7 +14,7 @@ Machine-readable surface for calling Tether from another agent. Setup per harnes
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
- `result` is the deliverable, or the pending question when `WAITING_INPUT`. It is `null` on failure.
|
|
17
|
-
- `failure` is `{"kind": "gate|
|
|
17
|
+
- `failure` is `{"kind": "gate|stopped|worker_error", "gate": "<cmd>|output-schema|null", "message": "…"}`.
|
|
18
18
|
- Keys are stable; new keys may be added.
|
|
19
19
|
|
|
20
20
|
`--json` is available on `run`, `pipeline`, `status`, `list`, `read` (also `--digest`, `--steps`, `--full`), `wait`, `send` and `stats`. With `--headless` it prints `{"v":1,"id":"ses_…"}`.
|
|
@@ -25,9 +25,8 @@ Machine-readable surface for calling Tether from another agent. Setup per harnes
|
|
|
25
25
|
|------|---------|
|
|
26
26
|
| 0 | completed |
|
|
27
27
|
| 1 | usage error (bad flag, unknown session, invalid pipeline) |
|
|
28
|
-
| 2 | waiting for input (`done --ask`) |
|
|
28
|
+
| 2 | waiting for input (`done --ask`), or handed back as `[STUCK ...]` after two restarts that did not help |
|
|
29
29
|
| 3 | verification gate failed or misconfigured (including `--output-schema`) |
|
|
30
|
-
| 4 | max steps reached, or stopped early as `stalled` (repeated loop warnings with no change) |
|
|
31
30
|
| 5 | worker or provider error, or `tether stop` |
|
|
32
31
|
|
|
33
32
|
In plain mode the failure reason goes to **stderr**; stdout only ever holds a deliverable. `wait` returns the highest code among its sessions.
|
|
@@ -10,9 +10,8 @@ The `tether` command is the primary entry point for running, inspecting, and con
|
|
|
10
10
|
|------|---------|
|
|
11
11
|
| `0` | Completed successfully |
|
|
12
12
|
| `1` | Usage error (bad arguments, missing required flags) |
|
|
13
|
-
| `2` | Waiting for input (`WAITING_INPUT`) |
|
|
13
|
+
| `2` | Waiting for input (`WAITING_INPUT`), including a session that is stuck or out of steps and was handed back |
|
|
14
14
|
| `3` | Verification gate failed |
|
|
15
|
-
| `4` | Max steps reached or stalled |
|
|
16
15
|
| `5` | Worker or provider error |
|
|
17
16
|
|
|
18
17
|
## tether run
|
|
@@ -26,3 +26,30 @@ Raw tool outputs stay in the prompt while there is room. Once the history fills
|
|
|
26
26
|
- **Re-viewing files loops, then invents data.** The model runs `edit view`, the output folds (two turns later once the context is more than half full), it views again, and eventually writes from memory.
|
|
27
27
|
- **What worked: one compact joined view, used right before the write, that ends with the exact next call.** The `course-source <module>` tool returns a module's plan and chosen videos in one output and finishes with `NOW WRITE THIS MODULE: act("edit write part-N.md", ...)`, so the data is still in the prompt when the write happens.
|
|
28
28
|
- **Write long outputs in small pieces.** One big write dropped a whole section. The writer skill writes one `part-N.md` per module with `edit write`, then a `course-build` tool concatenates them into `course.md`.
|
|
29
|
+
|
|
30
|
+
## Restart after repeated failures, then hand back
|
|
31
|
+
|
|
32
|
+
For a model that is stuck, the history itself is the problem: the failed commands and their output pull it toward the same step again. Stuck means either of two things: the same check command has failed 3 times with an edit between each run, or the stall guard ended its warnings (repeated command, a cycle of commands, or one file re-read over shifting ranges) and the one `[WRAP UP]` turn did not help. Either way the harness adds one `restart` turn and continues from that turn alone. The message holds the files as they are now (up to 3, capped), the last failing output (trimmed) and short counts of what was tried. Failed commands are not replayed, so the model sees a state to fix rather than a transcript to copy. A session restarts at most twice. If it is stuck again after the second restart, the harness stops spending steps and hands the task back: the session ends `WAITING_INPUT` (exit code `2`) with the same summary, headed `[STUCK ...]`, as its result. The caller, a person or a parent agent, can refine the request and `send` it back. Everything before the restart turn stays in SQLite, and the restart costs no static prompt tokens and no extra model call.
|
|
33
|
+
|
|
34
|
+
Sources: Gumaan, *Feedback That Backfires* ([arXiv:2608.23651](https://arxiv.org/abs/2608.23651)), Kim et al., *Scaling Test-Time Compute for Agentic Coding* ([arXiv:2604.16529](https://arxiv.org/abs/2604.16529)) and Yang, *Why Retrying Fails* ([arXiv:2605.08563](https://arxiv.org/abs/2605.08563)).
|
|
35
|
+
|
|
36
|
+
Example of the message (trimmed):
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
[RESTART at step 14. Earlier steps are not shown; the files are as you left them.]
|
|
40
|
+
|
|
41
|
+
Your files now:
|
|
42
|
+
calc.py:
|
|
43
|
+
def add(a, b):
|
|
44
|
+
return a - b
|
|
45
|
+
|
|
46
|
+
Last result of `pytest -q`:
|
|
47
|
+
FAILED test_calc.py::test_add - assert -1 == 5
|
|
48
|
+
|
|
49
|
+
What was tried so far:
|
|
50
|
+
- calc.py changed 3 times
|
|
51
|
+
- `pytest -q` run 3 times with a failing result each time
|
|
52
|
+
Re-read the failing output above before you change anything.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The hand-back has the same body under the header `[STUCK at step 31 after 2 restarts. Handing back to you.]`, and ends with "The work is not progressing. Refine the request or give guidance, then send it again."
|
|
@@ -48,7 +48,7 @@ my-cli: # kind: command - wrap a program that takes a prompt and
|
|
|
48
48
|
| `anthropic` | `base_url`, `api_key_env`, optional `timeout` |
|
|
49
49
|
| `command` | `argv` (list), `reply` (JSON path), optional `stdin` template, optional `usage`, optional `timeout` (seconds, default 300) |
|
|
50
50
|
|
|
51
|
-
- The built-in prefixes `ollama`, `openai`, `anthropic` and `claude` cannot be shadowed.
|
|
51
|
+
- The built-in prefixes `ollama`, `openai`, `anthropic` and `claude` cannot be shadowed. The prefixes `openrouter`, `vllm`, `groq` and `deepseek` are aliases of `openai` (they use `OPENAI_API_KEY` and `OPENAI_BASE_URL`) until you declare an entry with that name; then your entry is used.
|
|
52
52
|
- An invalid file raises `ValueError: providers.yaml: ...` naming the offending entry.
|
|
53
53
|
|
|
54
54
|
## Verify it works
|
|
@@ -92,7 +92,7 @@ Every entry, of any kind, may set optional positive integers: `context_tokens` (
|
|
|
92
92
|
|
|
93
93
|
### Timeout and retry
|
|
94
94
|
|
|
95
|
-
Every entry may set `timeout` (positive seconds). It applies to the HTTP kinds (`openai`, `ollama`, `anthropic`; defaults 120 / 300 / 180 s) and to `command` (default 300 s). The HTTP providers retry automatically, at most 2 times with 1 s then 2 s backoff, on timeouts, network errors and HTTP 429/500/502/503/504. A 401/403 is never retried: it raises `ProviderError` naming the provider and the credential variable (`openai: HTTP 401: `MY_GATEWAY_KEY` is missing or rejected; set it to a valid key`; the value is never printed), and a declared `api_key_env` that is unset or empty fails the session before any request with the same message. Other 4xx responses are never retried. An HTTP 500 whose body names a rejected tool call (Ollama: `invalid tool call arguments`, a cut-off tool-call JSON) is not retried either, since the same request fails the same way; `ollama`, `openai` and `anthropic` turn it into a one-line hint to the model (a no-action reply), so the session continues instead of failing. The match is the text `tool call` in a 500 body, for any server. When retries run out the call raises `ProviderError`, so the session fails with a readable `Worker error: ProviderError: openai model `gpt-4o` unavailable after 3 attempts (timeout 120s, last error: ReadTimeout)`. When they run out the harness waits 10 s (set `TETHER_OUTAGE_BACKOFF`) and tries the whole call
|
|
95
|
+
Every entry may set `timeout` (positive seconds). It applies to the HTTP kinds (`openai`, `ollama`, `anthropic`; defaults 120 / 300 / 180 s) and to `command` (default 300 s). The HTTP providers retry automatically, at most 2 times with 1 s then 2 s backoff, on timeouts, network errors and HTTP 429/500/502/503/504. A 401/403 is never retried: it raises `ProviderError` naming the provider and the credential variable (`openai: HTTP 401: `MY_GATEWAY_KEY` is missing or rejected; set it to a valid key`; the value is never printed), and a declared `api_key_env` that is unset or empty fails the session before any request with the same message. Other 4xx responses are never retried. An HTTP 500 whose body names a rejected tool call (Ollama: `invalid tool call arguments`, a cut-off tool-call JSON) is not retried either, since the same request fails the same way; `ollama`, `openai` and `anthropic` turn it into a one-line hint to the model (a no-action reply), so the session continues instead of failing. The match is the text `tool call` in a 500 body, for any server. When retries run out the call raises `ProviderError`, so the session fails with a readable `Worker error: ProviderError: openai model `gpt-4o` unavailable after 3 attempts (timeout 120s, last error: ReadTimeout)`. When they run out the harness waits 10 s (set `TETHER_OUTAGE_BACKOFF`) and tries the whole call once more; a second failure in a row ends the session, so a dead endpoint costs at most two provider calls, not minutes per step. The retry is invisible to the prompt (0 tokens, no prefix change).
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
### Request parameters (`params`)
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## v0.2.14 (2026-11-04)
|
|
6
|
+
|
|
7
|
+
A session that is stuck now restarts from a short description of its state and, if that does not help, is handed back to the caller instead of failing. Out of steps is handed back the same way. This changes exit codes: `4` is no longer used (a handed-back session exits `2`), so scripts that check for `4` or for the `Stalled` and `Max steps` failures must check for `2` and a result starting with `[STUCK`.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- A session that is stuck, however it shows (the same test failing 3 times after edits, or repeated commands, cycles and re-reads the wrap-up did not end), now restarts from one short message that describes the state (files as they are, last failing output, counts of what was tried) instead of replaying the failed steps. After two restarts that did not help it is handed back to the caller: status `WAITING_INPUT`, exit code `2`, a `[STUCK ...]` summary as the result, ready for `tether send`. This replaces the `Stalled` failure, and a session that runs out of steps is handed back the same way (`[STUCK: out of steps ...]`), so exit code `4` is no longer used. No prompt, schema or model-call cost.
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- A provider that stays down now ends the session after two failed calls in a row (the call and one turn-level retry), not four. Each call already includes the provider's own 3 attempts, so a hung endpoint used to cost up to 12 timeouts (#147).
|
|
16
|
+
- A `providers.yaml` entry named `openrouter`, `vllm`, `groq` or `deepseek` is now used. Before, those four prefixes always went to the OpenAI adapter and its `OPENAI_BASE_URL` (default `api.openai.com`), so a declared OpenRouter endpoint was silently ignored and every call failed with HTTP 400. Without a declared entry the prefixes behave as before.
|
|
17
|
+
|
|
3
18
|
## v0.2.13 (2026-11-03)
|
|
4
19
|
|
|
5
|
-
The stall guard now gives a session that already wrote its file one more turn to call `done`, and the loop warnings tell the model to write the file instead of answering in chat. Found by running the Coding Ladder on `qwen3.5:9b` at 16k context (17 tasks reached, 14 passed; the two tier-4 stops, write-4 and bugfix-4, are the model's limit, #200).
|
|
20
|
+
The stall guard now gives a session that already wrote its file one more turn to call `done`, and the loop warnings tell the model to write the file instead of answering in chat. Found by running the Coding Ladder on `qwen3.5:9b` at 16k context (17 tasks reached, 14 passed; the two tier-4 stops, write-4 and bugfix-4, are the model's limit, #200). Polyglot-Python (34 exercises, 2 trials, default 8192 context): 37 of 68 passed (54.4%) against 35 of 68 on v0.2.10, mean score 0.783 against 0.763; the difference is inside the noise (paired score delta +0.020, 95% interval -0.060 to +0.101).
|
|
6
21
|
|
|
7
22
|
### Fixes
|
|
8
23
|
|
|
@@ -6,25 +6,25 @@ Entries are grouped by what you see. For problems that are known and not fixed y
|
|
|
6
6
|
|
|
7
7
|
## The session ends badly
|
|
8
8
|
|
|
9
|
-
### `
|
|
9
|
+
### `WAITING_INPUT` with `[STUCK ...]` (exit code 2)
|
|
10
10
|
|
|
11
|
-
**Cause.** The model repeated a command, cycled through the same few, or kept reading one file over shifting line ranges without editing. The
|
|
11
|
+
**Cause.** The model repeated a command, cycled through the same few, or kept reading one file over shifting line ranges without editing. Or the same test kept failing after edits. The harness restarted it from a short description of the state twice and it was still stuck, so it stopped and handed the task back instead of spending every step.
|
|
12
12
|
|
|
13
|
-
Before the guard ends the session it adds one `[WRAP UP]` turn: a session that only read is asked for its final answer, one that already changed something is asked to call `done` with what is done and what is left. If the model answers, the session completes normally; if it repeats the command again, the session ends `
|
|
13
|
+
Before the guard ends the session it adds one `[WRAP UP]` turn: a session that only read is asked for its final answer, one that already changed something is asked to call `done` with what is done and what is left. If the model answers, the session completes normally; if it repeats the command again, the session restarts from a fresh, short description of the state (files as they are, last failing output, counts of what was tried), twice at most, then ends `WAITING_INPUT` with that description as its result.
|
|
14
14
|
|
|
15
15
|
With `--verify` gates configured, a stall after a change whose gates all pass ends `COMPLETED` instead ("Finished by the harness"), because the work is verified.
|
|
16
16
|
|
|
17
|
-
**Fix.**
|
|
17
|
+
**Fix.** Read the `[STUCK]` result: it says what was tried. Refine the goal (name the file and the edit) and `tether send <id> "<guidance>"`, or try a stronger model. Raising `--max-steps` only repeats the loop.
|
|
18
18
|
|
|
19
|
-
### `
|
|
19
|
+
### `WAITING_INPUT` with `[STUCK: out of steps (N) ...]` (exit code 2)
|
|
20
20
|
|
|
21
|
-
**Cause.** The task needs more steps than allowed, or the model never found the way to finish.
|
|
21
|
+
**Cause.** The task needs more steps than allowed, or the model never found the way to finish. The session is handed back instead of failed, so you can continue it.
|
|
22
22
|
|
|
23
|
-
The result is never bare: it lists the last change commands and, with `--verify`, whether the gates pass now
|
|
23
|
+
The result is never bare: it lists the last change commands and, with `--verify`, whether the gates pass now. A run that stopped with passing gates already holds a usable result in the workspace.
|
|
24
24
|
|
|
25
25
|
A session whose last test run passed after its final change ends `COMPLETED` instead ("Finished by the harness"), even without `--verify`.
|
|
26
26
|
|
|
27
|
-
**Fix.** Check `tether read <id> --steps`: if the work is done and the model keeps verifying, tell it to call `done` in the goal. A bare `done` is enough: it ends the session with the result `Done.` once the gates pass. If it needs more room, raise `--max-steps` (for a pipeline, per stage). `tether send <id> "keep going"` resumes
|
|
27
|
+
**Fix.** Check `tether read <id> --steps`: if the work is done and the model keeps verifying, tell it to call `done` in the goal. A bare `done` is enough: it ends the session with the result `Done.` once the gates pass. If it needs more room, raise `--max-steps` (for a pipeline, per stage). `tether send <id> "keep going"` resumes the session with a fresh budget.
|
|
28
28
|
|
|
29
29
|
### `FAILED` with `Verification gate ... misconfigured`
|
|
30
30
|
|
|
@@ -126,7 +126,7 @@ Every MCP tool has a CLI twin with the same JSON, so any harness that can run a
|
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
tether run --json --model ollama/qwen3.5:9b --verify "pytest -q" "fix the failing tests"
|
|
129
|
-
echo $? # 0 ok, 2 needs input, 3 gate failed,
|
|
129
|
+
echo $? # 0 ok, 2 needs input, 3 gate failed, 5 error
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
See the [reference](../reference/agent-interface.md) for the JSON shape, exit codes and all tools.
|
|
@@ -91,7 +91,7 @@ tether run --context-tokens 32000 --fold-after 8 "refactor the parser"
|
|
|
91
91
|
|
|
92
92
|
## Scripting: `--json` and exit codes
|
|
93
93
|
|
|
94
|
-
`run`, `pipeline`, `status`, `list`, `read`, `wait`, `send` and `stats` accept `--json`. Exit codes: `0` completed, `1` usage error, `2` waiting for input
|
|
94
|
+
`run`, `pipeline`, `status`, `list`, `read`, `wait`, `send` and `stats` accept `--json`. Exit codes: `0` completed, `1` usage error, `2` waiting for input (also a session that is stuck or out of steps, handed back), `3` gate failed, `5` worker error or `tether stop`. A failure reason goes to stderr, never stdout. `--result-file <path>` writes the deliverable to a file, `--output-schema <schema.json>` rejects a `done` whose JSON does not match, and `tether events <id> --follow` streams turns as JSONL. Details: [Agent Interface reference](../reference/agent-interface.md).
|
|
95
95
|
|
|
96
96
|
### When a model's replies are not understood
|
|
97
97
|
|
|
@@ -151,6 +151,9 @@ class Tether:
|
|
|
151
151
|
def events(self, sid: str) -> list[str]:
|
|
152
152
|
return [t["event_type"] for t in self.turns(sid) if t["role"] == "assistant"]
|
|
153
153
|
|
|
154
|
+
def restarts(self, sid: str) -> int:
|
|
155
|
+
return sum(t["event_type"] == "restart" for t in self.turns(sid))
|
|
156
|
+
|
|
154
157
|
def tool_outputs(self, sid: str) -> list[str]:
|
|
155
158
|
return [t["content"] for t in self.turns(sid) if t["role"] == "tool"]
|
|
156
159
|
|
|
@@ -22,10 +22,13 @@ def test_done_ask_pauses_with_exit_2_and_send_resumes(tether: Tether, chaos) ->
|
|
|
22
22
|
assert "beta" in str(chaos.requests[0]["messages"]), "the human's reply must reach the model"
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
def
|
|
25
|
+
def test_out_of_steps_is_handed_back_and_resume_never_exceeds_ceiling(
|
|
26
|
+
tether: Tether, chaos
|
|
27
|
+
) -> None:
|
|
26
28
|
chaos.script(*[("bash true",)] * 20) # never calls done
|
|
27
29
|
r = tether.run("never finishes", "--tools", "bash", "--max-steps", "3")
|
|
28
|
-
assert (r["rc"], r["status"], r["steps"], r["max_steps"]) == (
|
|
30
|
+
assert (r["rc"], r["status"], r["steps"], r["max_steps"]) == (2, "WAITING_INPUT", 3, 3)
|
|
31
|
+
assert r["result"].startswith("[STUCK: out of steps (3)")
|
|
29
32
|
r2 = tether.send(r["id"], "go on") # #75: resume extends the ceiling, never overshoots it
|
|
30
33
|
assert r2["steps"] > 3 and r2["steps"] <= r2["max_steps"], r2
|
|
31
34
|
|
|
@@ -45,13 +45,13 @@ def test_hard_context_budget_trims_old_history(tether: Tether, chaos) -> None:
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def test_range_shifting_reads_stop_the_session_early(tether: Tether, chaos) -> None:
|
|
48
|
-
views = [f"edit view big.py --lines {i}:{i + 39}" for i in range(1,
|
|
48
|
+
views = [f"edit view big.py --lines {i}:{i + 39}" for i in range(1, 100)]
|
|
49
49
|
chaos.script(*views)
|
|
50
50
|
(tether.ws / "big.py").write_text("x = 1\n" * 200)
|
|
51
|
-
d = tether.run("explore forever", "--tools", "edit", "--max-steps", "
|
|
52
|
-
assert d["rc"] ==
|
|
53
|
-
assert d["steps"] <
|
|
54
|
-
assert tether.
|
|
51
|
+
d = tether.run("explore forever", "--tools", "edit", "--max-steps", "80")
|
|
52
|
+
assert d["rc"] == 2 and d["status"] == "WAITING_INPUT" # handed back, not run to max_steps
|
|
53
|
+
assert d["steps"] < 80, "the stall guard must end the session before max_steps"
|
|
54
|
+
assert tether.restarts(d["id"]) == 2 and d["result"].startswith("[STUCK")
|
|
55
55
|
assert any("reads of `big.py`" in o for o in tether.tool_outputs(d["id"]))
|
|
56
56
|
|
|
57
57
|
|
|
@@ -96,17 +96,22 @@ def test_stall_after_a_change_with_a_passing_gate_is_completed(tether: Tether, c
|
|
|
96
96
|
assert r["status"] == "COMPLETED" and "Finished by the harness" in r["result"]
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
def
|
|
100
|
-
chaos.script(*(["bash touch fixed.txt"] *
|
|
101
|
-
r = tether.run(
|
|
102
|
-
|
|
99
|
+
def test_stall_with_a_failing_gate_restarts_then_hands_back(tether: Tether, chaos) -> None:
|
|
100
|
+
chaos.script(*(["bash touch fixed.txt"] * 45)) # never stops repeating
|
|
101
|
+
r = tether.run(
|
|
102
|
+
"loop", "--tools", "bash", "--verify", "test -f missing.txt", "--max-steps", "60"
|
|
103
|
+
)
|
|
104
|
+
assert r["status"] == "WAITING_INPUT" and r["rc"] == 2
|
|
105
|
+
assert r["result"].startswith("[STUCK at step") and "after 2 restarts" in r["result"]
|
|
106
|
+
assert tether.restarts(r["id"]) == 2
|
|
103
107
|
|
|
104
108
|
|
|
105
109
|
def test_unfinished_session_reports_changes_and_gate(tether: Tether, chaos) -> None:
|
|
106
|
-
chaos.script(*(
|
|
107
|
-
r = tether.run("loop", "--tools", "bash", "--verify", "test -f missing.txt")
|
|
108
|
-
msg = r["
|
|
109
|
-
assert "
|
|
110
|
+
chaos.script(*(f"bash touch f{i}.txt" for i in range(6))) # #171: never a bare error
|
|
111
|
+
r = tether.run("loop", "--tools", "bash", "--verify", "test -f missing.txt", "--max-steps", "4")
|
|
112
|
+
msg = r["result"]
|
|
113
|
+
assert r["status"] == "WAITING_INPUT"
|
|
114
|
+
assert "Changed: `bash touch f0.txt`" in msg and "Gate `test -f missing.txt` fails" in msg
|
|
110
115
|
|
|
111
116
|
|
|
112
117
|
def test_never_calling_done_after_a_green_test_run_is_completed(tether: Tether, chaos) -> None:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Restart after repeated failing check runs: what tether sends and records (scripted, no model)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
from e2e.conftest import Tether
|
|
8
|
+
|
|
9
|
+
TEST = (
|
|
10
|
+
"import unittest\nimport a\n\n\nclass T(unittest.TestCase):\n"
|
|
11
|
+
" def test_x(self):\n self.assertEqual(a.X, 2)\n"
|
|
12
|
+
)
|
|
13
|
+
RUN = "bash -c 'python3 -m unittest test_t 2>&1'"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_third_failing_check_restarts_with_a_description_not_a_replay(
|
|
17
|
+
tether: Tether, chaos
|
|
18
|
+
) -> None:
|
|
19
|
+
(tether.ws / "test_t.py").write_text(TEST)
|
|
20
|
+
chaos.script(
|
|
21
|
+
("edit write a.py", "X = 1 # MARKER_FIRST\n"), RUN,
|
|
22
|
+
("edit write a.py", "X = 3\n"), RUN,
|
|
23
|
+
("edit write a.py", "X = 4 # LATEST\n"), RUN,
|
|
24
|
+
("edit write a.py", "X = 5\n"), RUN,
|
|
25
|
+
("done", "ok"),
|
|
26
|
+
) # fmt: skip
|
|
27
|
+
d = tether.run("make the test pass", "--tools", "edit,bash", "--max-steps", "20")
|
|
28
|
+
turns = tether.turns(d["id"])
|
|
29
|
+
restarts = [t for t in turns if t["event_type"] == "restart"]
|
|
30
|
+
assert len(restarts) == 1, "one restart per session"
|
|
31
|
+
assert (
|
|
32
|
+
"X = 4 # LATEST" in restarts[0]["content"] and "MARKER_FIRST" not in restarts[0]["content"]
|
|
33
|
+
)
|
|
34
|
+
after = json.dumps(chaos.requests[6]["messages"])
|
|
35
|
+
assert "[RESTART at step" in after and "MARKER_FIRST" not in after
|
|
36
|
+
assert "MARKER_FIRST" in json.dumps(chaos.requests[5]["messages"]), "before it, full history"
|
|
37
|
+
assert "MARKER_FIRST" in "".join(t["tool_stdin"] or "" for t in turns), "store keeps it all"
|
|
@@ -142,6 +142,26 @@ def test_resolve_provider_declared(monkeypatch: pytest.MonkeyPatch, tmp_path: Pa
|
|
|
142
142
|
assert provider.base_url.startswith("http://groq.local/v1")
|
|
143
143
|
|
|
144
144
|
|
|
145
|
+
@pytest.mark.parametrize("prefix", ["openrouter", "vllm", "groq", "deepseek"])
|
|
146
|
+
def test_declared_entry_wins_over_an_openai_alias(
|
|
147
|
+
monkeypatch: pytest.MonkeyPatch, tmp_path: Path, prefix: str
|
|
148
|
+
) -> None:
|
|
149
|
+
"""`openrouter/...` used to ignore the user's providers.yaml entry and call api.openai.com."""
|
|
150
|
+
monkeypatch.delenv("OPENAI_BASE_URL", raising=False)
|
|
151
|
+
_write(monkeypatch, tmp_path, f"{prefix}:\n kind: openai\n base_url: http://own.local/v1\n")
|
|
152
|
+
provider = resolve_provider(f"{prefix}/m")
|
|
153
|
+
assert isinstance(provider, OpenAIProvider) and provider.base_url.startswith("http://own.local")
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def test_alias_without_a_declared_entry_still_uses_openai_settings(
|
|
157
|
+
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
|
|
158
|
+
) -> None:
|
|
159
|
+
monkeypatch.setenv("OPENAI_BASE_URL", "http://env.local/v1")
|
|
160
|
+
_write(monkeypatch, tmp_path, "other:\n kind: openai\n")
|
|
161
|
+
provider = resolve_provider("openrouter/m")
|
|
162
|
+
assert isinstance(provider, OpenAIProvider) and provider.base_url.startswith("http://env.local")
|
|
163
|
+
|
|
164
|
+
|
|
145
165
|
def test_resolve_provider_unknown_still_raises(
|
|
146
166
|
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
|
|
147
167
|
) -> None:
|
|
@@ -61,15 +61,17 @@ async def test_json_and_exit_codes(tmp_path: Path, capsys: pytest.CaptureFixture
|
|
|
61
61
|
code, out, err = await _run(
|
|
62
62
|
capsys, ["run", "--model", loop, "--db", db, "--max-steps", "2", "g"]
|
|
63
63
|
)
|
|
64
|
-
assert code ==
|
|
64
|
+
assert code == 2 and "out of steps" in (out + err) # handed back, not failed
|
|
65
65
|
|
|
66
66
|
code, out, _ = await _run(
|
|
67
67
|
capsys, ["run", "--json", "--model", loop, "--db", db, "--max-steps", "2", "g"]
|
|
68
68
|
)
|
|
69
69
|
d = json.loads(out)
|
|
70
|
-
assert d["
|
|
70
|
+
assert d["status"] == "WAITING_INPUT" and d["failure"] is None
|
|
71
71
|
|
|
72
72
|
boom = _reg("ai-boom", [AssertionError()])
|
|
73
|
+
code, out, err = await _run(capsys, ["run", "--model", boom, "--db", db, "g"])
|
|
74
|
+
assert code == 5 and out == "" and "Worker error" in err # failure text on stderr
|
|
73
75
|
code, out, _ = await _run(capsys, ["run", "--json", "--model", boom, "--db", db, "g"])
|
|
74
76
|
d = json.loads(out)
|
|
75
77
|
assert code == 5 and d["failure"]["message"] == "Worker error: AssertionError" # #41
|
|
@@ -298,7 +300,7 @@ async def test_mcp_run_accepts_params(tmp_path: Path) -> None:
|
|
|
298
300
|
assert SQLiteStore(db).list_sessions()[0].sandbox_config["params"] == {"temperature": 0}
|
|
299
301
|
|
|
300
302
|
|
|
301
|
-
def
|
|
303
|
+
def test_stopped_failure_is_classified() -> None:
|
|
302
304
|
from tether import api
|
|
303
305
|
from tether.store import SessionRecord
|
|
304
306
|
|
|
@@ -309,7 +311,4 @@ def test_stalled_and_stopped_failures_are_classified() -> None:
|
|
|
309
311
|
pid=None, created_at=0.0, updated_at=0.0,
|
|
310
312
|
) # fmt: skip
|
|
311
313
|
|
|
312
|
-
stalled = api.failure_info(rec("Stalled: 4 loop warnings"))
|
|
313
|
-
assert stalled and stalled["kind"] == "stalled"
|
|
314
|
-
assert api.exit_code(rec("Stalled: x")) == api.EXIT_MAX_STEPS
|
|
315
314
|
assert api.exit_code(rec("Stopped by user.")) == api.EXIT_ERROR
|