Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 11 Aug 00:55
· 14 commits to main since this release

Fixed

  • Daemon no longer throws TypeError: The database connection is not open on shutdown. An un-awaited runner turn (e.g. the echo runner's async reply stream) could emit a state/message event after close() had closed the SQLite store, hitting store.updateSession on a dead connection. close() now latches a closed flag that makes the per-session emitter drop late events instead of touching the store or dead sockets (#176).

  • mewrite agents: a hosted session that aborted a stalled turn for auto-retry (e.g. "Model stream idle for 120000ms") no longer stays stuck showing error after the retry succeeds. The daemon runner treated the pre-retry agent_end(error) as terminal and latched, so the later successful agent_end(stop) couldn't clear it. On auto_retry_start the runner now undoes the premature terminal state and returns the session to running, so the final state reflects the retry's outcome (#158).

  • Fixed daemon double-spawn race in mewrite serve: two concurrent mewrite serve processes could both pass the pidfile existence check and race to bind the port (TOCTOU). Now the pidfile is acquired atomically with O_EXCL before starting the daemon; if another daemon holds a live pidfile, the second caller exits 0 (not 1) so auto-start workflows treat peer ownership as success. Stale pidfiles (dead process) are reclaimed automatically. Belt-and-suspenders: if two processes somehow pass the pidfile lock but one loses the port bind (EADDRINUSE), it releases its pidfile and exits 0 (#167).

  • System prompt: core safety sections (instruction precedence, durable-memory/data boundaries, executing-with-care) are now always-on. Previously the slim build flag and the customPrompt path both silently dropped every non-overridable safety section, producing an agent with no durable-memory or destructive-action consent gate while still ingesting untrusted project context. They are now injected in every build path via a shared CORE_SAFETY_SECTIONS block.

  • System prompt: the customPrompt path now routes appended text through buildAppendOnlySection (the "earlier system sections win" framing) instead of a raw concatenation.

  • System prompt: injected project-context files (AGENTS.md/CLAUDE.md) now carry a precedence banner clarifying that project instructions cannot override the safety sections and grant durable-capture consent only when they name a destination and scope.

  • Git status snapshot no longer renders a failed or oversized git status as "(clean)"; it now reports the status as unavailable.

Changed

  • New brand logo: a pencil (code shaft) with "Me Write Code / me write less, me do more" to its right, replacing the ASCII wordmark. Shown on interactive startup and on the mewrite agents launch screen (shared renderer). Terminal-safe box-drawing, no image component (#185).
  • mewrite agents is now a single full-screen status-grouped list instead of a sidebar + side-by-side focus pane. On launch the screen is wiped and a pencil logo with "Me Write Code / me write less, me do more" is shown above the list. Agents are grouped under WORKING / ERRORED / COMPLETED headers (attention order), and selecting one opens it full-screen (ctrl+w / enter to focus, back to return) rather than in a split. This is Phase A of the agents view v2 redesign toward a local process-registry model (#185).
  • mewrite agents focus pane now supports two steering controls from interactive mode: shift+tab (app.thinking.cycle) cycles the remote session's thinking level via the daemon set_thinking RPC — the status-line thinking level updates on the echoed usage — and ctrl+o (app.tools.expand) toggles tool activity between the compact one-liner and an expanded card showing the tool's args and result/error. Tool start/end are correlated into a single card by tool-call id. Both reuse the existing configurable keybindings (#175).
  • mewrite agents sidebar navigation now wraps: pressing up on the top agent selects the bottom one (and down on the bottom wraps to the top), so you can jump to the far end of the list in one keypress. Page up/down still clamp at the ends (#152).

Removed

  • Dropped references to a non-existent explore subagent from the system prompt and the task/agent tool descriptions.

Added

  • mewrite agents: while monitoring a running agent you can now steer it (press s to type a redirect) or interrupt it (press x), so you can catch an agent working on the wrong thing before it finishes. Steering messages are delivered over a per-agent inbox file; the agent's own process injects them into its steering queue at the next turn boundary (mid-run) or as a fresh prompt (when idle). Interrupt signals the agent process. Configurable via app.agents.steer / app.agents.interrupt. Agents view v2 Phase C+ (#185).

  • mewrite agents: selecting a WORKING agent now opens a read-only live monitor that tails its transcript, so you can watch a running agent without interrupting it (another process owns its live turn). Idle/completed/errored interactive agents still resume in place. Agents view v2 Phase C (#185).

  • mewrite agents now spawns new agents as independent, detached mewrite processes instead of routing through the daemon (agents view v2, Phase B2). Press n, type a task, and the agent starts working in the current directory and keeps running after you close the view; it shows up in the list via the liveness registry and is resumable. Output is logged under ~/.mewrite/agent/agent-logs/. The daemon is no longer required for the local agents workflow (and is never auto-started); it is used only to surface any daemon-hosted [d] sessions that happen to be running. Removed the daemon auto-start/ensureDaemon path from the agents view (#185).

  • mewrite agents: selecting a live interactive [i] session now resumes it as a real full interactive mewrite session in place (replace-and-return) instead of opening a read-only transcript pane. The list is torn down, mewrite --session <path> runs attached to your terminal with the complete interactive UI (editor, footer, meter, tools, thinking), and quitting returns to the agents list. This is Phase B (resume-on-select) of the agents view v2 redesign; detached resumable spawning and retiring the daemon from the local path follow (#185).

  • mewrite agents focus pane now shows a context-usage meter in its status line: a progress bar ███░░░ 20% 40k (percent of context window + tokens used) plus the thinking level next to the model id, matching the interactive context meter. Fed by the daemon usage notification (see #176), so it live-updates on each turn. Attaching to an idle session that already ran a turn now re-requests a usage snapshot on connect, so its meter is populated immediately instead of blank until the next turn. A session that has never run a turn (usage genuinely unknown) shows just the model id, and post-compaction it renders ? for unknown token counts (#173).

  • Daemon WS protocol now streams richer per-turn events so a focus-pane client can reach parity with interactive mode. Tool events carry toolCallId, args (on start), and result/isError (on end) correlated across start/end; a new usage notification streams context tokens, context window, percent, and thinking level on turn boundaries; state carries a stopReason (stop|max_tokens|error|aborted) on the terminal state; and a new set_thinking RPC steers a running session's thinking level (echoed back as a usage event). All additions are optional fields / new methods, so the bundled web-ui and the attach REPL keep working unchanged. Oversized tool args/results are truncated over the wire (16 KiB cap). HealthCapabilities.richEvents advertises support for feature detection (true for the agent runner) (#176).

  • Added mewrite history: a standalone TUI to browse and resume persisted local JSONL sessions. Select a session and press enter to see the exact mewrite --session <path> command to copy and run. This is separate from the live daemon monitor (mewrite agents) and from mewrite sessions (which lists daemon-hosted sessions via the client). Read-only: no delete or rename, just browse and get the resume command (#159).

  • Enhanced debug logging (MEWRITE_AGENTS_DEBUG) with automatic log rotation (50 MiB cap, keeps one .1 backup), category filtering (log only specific tags like runner,daemon), and support for custom log paths via tag=path syntax. Prevents disk-fill from flapping sockets while remaining zero-cost when disabled (#168).

  • The mewrite agents focus pane is now live and interactive for hosted sessions: it streams the agent's response as markdown and gives you an input box to talk to the agent in place — no more dropping to a separate attach REPL. ctrl+w focuses the pane, type and press enter to send, escape interrupts a running turn or (when the input is empty) returns focus to the sidebar. Interactive [i] terminal sessions remain read-only (#158).

  • mewrite agents is now a two-pane view: a sidebar of agents on the left and a focus pane on the right showing the selected session's transcript (live-tailing). ctrl+w switches focus between the panes; ! jumps the sidebar to the first agent needing attention (errored sessions are flagged with a !). Below 80 columns it falls back to a single pane. Selecting a hosted [d] row still opens the attach REPL for now; a live, in-pane interactive session is the next step. Configurable via app.agents.switchPane and app.agents.attention (#158).

  • mewrite agents can now spawn new agents from the view: press n, type a task, and an agent starts working in the current directory with your default model. The daemon is auto-started transparently on first use (loopback, agent runner) so you never run mewrite serve yourself; spawned agents persist and keep running after you close the view. You can change a session's working directory or model from inside it later. Configurable via the app.agents.new keybinding (#158).

  • mewrite attach now prints the existing transcript on connect (so attaching to a session isn't a blank screen) and frames the live stream by role: you/agent headers on turn transitions, dim tool-activity lines, and clear separation from the input prompt. Previously it dumped raw assistant tokens onto the prompt with no history (#158).

  • mewrite agents can now delete a session: select a hosted [d] row and press d to remove it after a confirmation prompt (defaults to No). Configurable via the app.agents.delete keybinding. Live interactive [i] sessions are not deletable from here (they have no daemon record) (#158).

  • mewrite agents now hides stale idle sessions by default so the list isn't cluttered by old finished agents. Running, errored, and live interactive sessions always show, as do idle sessions active within the last 24h; older idle sessions are hidden with a (+N) hint. Press a to toggle showing all. Configurable via the app.agents.toggleAll keybinding (#158).

  • Added mewrite agents: a standalone interactive view that lists running daemon agents (sessions) with live state, without a terminal multiplexer. Select an agent and press enter to attach; detaching returns to the list. Read-only monitor for now (an in-pane transcript/detail view is a planned fast-follow) (#152).

  • mewrite agents now shows a unified list of both daemon-hosted sessions and live interactive mewrite sessions, each tagged by kind ([d] hosted, [i] interactive). Interactive sessions self-publish a tiny liveness file (id, pid, cwd, state) under ~/.mewrite/agent/live; the list reaps dead or stale entries and needs no daemon. Set MEWRITE_NO_LIVE to opt an interactive session out of publishing (#152).

  • mewrite agents now has a read-only transcript view: select an interactive [i] session and press enter to see its conversation, scroll with arrows, and esc/q to return to the list. Messages render as markdown (user turns get the accent left-bar, matching interactive mode) and the pane live-tails — new turns from a running session scroll into view while you stay pinned to the bottom, unless you scroll up. Interactive transcripts are read from the local session JSONL (no daemon); hosted [d] sessions still hand off to the attach REPL (#157, #161).

  • Added turn-end reason diagnostics so mid-task stalls are diagnosable. Each turn now records why it ended (tool_batch_await, end_turn, max_tokens, error, aborted, or pause) to ~/.mewrite/agent/diagnostics/current/turns.jsonl (gated by the existing local-logging setting, same redaction and retention as other diagnostics). View the last N with mewrite diagnostics turns [--limit N]; the records are also included in mewrite diagnostics export (#154).

Fixed

  • Fixed mewrite agents not returning to the list on q from the transcript view, and leaving the transcript in the terminal scrollback after going back. q now maps to the configurable app.agents.back binding (default escape/q) in both the list and transcript views, and leaving the transcript wipes the screen so the list redraws clean (#157).
  • Fixed the agent yielding its turn mid-task during long multi-step work — narrating progress or asking for reassurance instead of continuing an already-approved plan, which read as the agent "pausing" and required repeated "continue" prompts. The system prompt now instructs the agent to keep working through an approved plan across turns and to only end its turn for a genuinely blocking decision, a destructive/irreversible action needing consent, or task completion (#154).