Skip to content

v0.1.38 — Agent Loop Hardening + Compaction Overhaul

Choose a tag to compare

@lyc-aon lyc-aon released this 17 Apr 07:52

What changed

Driven by real small-model testing with Qwen 3.6-35B-A3B on local compute.

Interrupt handling

  • Ctrl+C double-press — first press interrupts the running stream/tools/compaction, second press within 800ms exits cleanly. No more instant-kill.

Browser tool

  • js_eval actionpage.evaluate() for running arbitrary JavaScript against the live page. Read DOM state, call functions, inspect variables directly.
  • Screenshot loop prevention — read-only actions no longer reset the stagnant-state counter. Screenshot streak detector nudges after 3+ consecutive screenshots. Action-repeat tracker nudges after 3+ identical calls.

File tools

  • edit_file works after partial reads — no longer requires a full read_file first. Partial reads accepted; old_string match against disk content is the safety check.

Compaction overhaul

Four changes that collectively double the usable context runway between compaction cycles:

  • Tool outputs in kept rounds cleared during compaction (keeps 4 most recent, replaces older ones with placeholders)
  • Microcompact keeps 4 most recent tool results (was 8)
  • System prompt measurement uses the full assembled prompt instead of the short profile prompt
  • Default keep_recent_rounds lowered from 6 to 2 for tool-heavy profiles

Vision

  • Thinking-model fix — falls back to reasoning_content when content is empty (fixes Qwen 3.x analysis). Default max_tokens raised to 16384.

Testing infrastructure

  • New scripts/sandbox_runner.py + scripts/sandbox_scenarios.py — 4-tier E2E testing framework for small-model behavior observation.

Verification

  • ruff check src tests — all clean
  • pytest -q — 1362 passed