The release where Mercury Code stops dying and starts telling the truth. The completion pipeline was rebuilt around a completion contract: every task ends in a verdict — a verified completion with evidence, or an honest pause that names its blocker and resumes. Tasks can no longer fake success, die silently, or loop forever.
Highlights
Completion contract
- Every task end is classified (
text-stop/steps-exhausted/interrupted/truncated/aborted) — budget exhaustion is a pause, never a fake "Task complete" - Evidence-gated completion: implementation tasks must run a build/test/typecheck before the completion banner is allowed
- Honest banners: "Response delivered · no file changes" (git-verified), first-person pause messages, per-file change summary at completion
AUTO mode — no more manual plan/execute switching
- Mercury Code's new default: read first, plan silently, implement immediately in one flow
- Small/medium changes build without asking; large or consequential changes present a concise plan with a single confirmation (recommended option default-selected), then build without re-asking
The escalation harness — the agent makes things happen
When a model narrates instead of building, the agent escalates mechanically — none of it depends on the model's goodwill:
- Grounding — the agent executes a deterministic directory listing itself (no LLM) and injects it as verified state
- Forced action — via
prepareStep, the first step of a guard round runs withtoolChoice: 'required'and mutating tools only — narration is mechanically impossible on that step - Provider rotation — guard rounds walk the fallback chain; a narration-locked model isn't the only worker
- Wake-up call — after a full failed cycle, the bound doubles (10 mechanical rounds total) with a blunt directive: "Your next response MUST begin with a mutating tool call. ZERO prose."
Reliability — compact-on-pressure + no imposed size limit
- Memory pressure now compacts the conversation in place and continues (OpenCode's
SessionCompactionpractice) instead of aborting long builds - No Mercury-imposed output size limit — the model's native limit governs (32,768 ceiling); providers that reject a high
max_tokensget an adaptive halving
Security hardening
- SSRF guard:
fetch_urlandinstall_skillvalidate scheme + private ranges (DNS-resolved) on every redirect hop; 512 KB caps - Credential files (
web-config.json,web-sessions.json) written0600and repaired on load - Random initial web password — no more hardcoded default from a public repo
- Secret redaction — API keys masked in logs and command-output echoes
- Shell blocklist — swapped-flag
rm -frvariants added to the never-execute tier
Live TUI
- Plan checklist — the
update_plantool maintains pending / ▶ active / ☑ done steps in the transcript ask_userchoice picker — now renders inside Mercury Code (previously invisible → hang) and owns the keyboard; Esc cancels safely- Thinking preview — model reasoning streams as a quoted preview instead of 52 seconds of dead air
- Wheel scrolling — full-screen transcripts scroll with the trackpad via a filtered stdin proxy
Fixed
- Yoga WASM "memory access out of bounds" crashes — ink patched (freed-node hygiene +
<Static>identity dedup), shipped via patch-package - Duplicate-message render loop (~30 s cadence)
- Scroll repair after long-session trims (
/mc scroll-setwas parsed as a NaN delta) - Prose questions no longer fight the narration guard; non-git dirs no longer false-claim "no file changes"
- Mercury Cloud recovery error now says "run
mercury cloud connect" instead of an opaque 401 loop - Chat-mode thinking indicator surfaces live provider/phase activity
Upgrade
npm install -g @cosmicstack/mercury-agent@1.2.3No config changes required. New optional env vars: MERCURY_STALL_SOFT_MS, MERCURY_STALL_HARD_MS, MERCURY_ALLOW_PRIVATE_FETCH. patch-package ships as a runtime dependency — the bundled ink patch applies automatically on install.
Full changelog: https://github.com/cosmicstack-labs/mercury-agent/blob/main/CHANGELOG.md