Skip to content

Releases: shaifulshabuj/devloop

DevLoop v5.1.8 — Bash 3.2 empty-array fix

17 May 13:23

Choose a tag to compare

Bug Fix: Bash 3.2 empty-array runtime error

Problem

On macOS (which ships bash 3.2 as the system shell), iterating over an empty array with "${arr[@]}" and set -u active triggers an "unbound variable" error at runtime. This caused the "line 9712: syntax error near unexpected token `)'" error seen after v5.1.7.

The affected array (fix_history_parts) is empty when devloop resume runs its re-architect escalation path before any fix rounds have been recorded in the current session.

Fix

Replaced all 4 fix_history_parts[@] iterations with the bash 3.2-safe pattern:

for h in "${fix_history_parts[@]+"${fix_history_parts[@]}"}" ; do
  ...
done

This expands to nothing on empty arrays without triggering set -u.

Affected commands

  • devloop run — fix escalation respec path
  • devloop resume — fix escalation respec path + deep-fix history path

Update

devloop update

v5.1.7 — Fix resume re-architect escalation

17 May 13:05

Choose a tag to compare

What's Changed

Bug Fix

devloop resume now correctly escalates to re-architect after max fix retries are exhausted.

Previously, when a session was resumed that had already hit the max retry limit (3), cmd_resume's reviewer+fix loop would run one more fix round and then exit with "Max fix retries reached" — without triggering the re-architect phase (_run_respec_phase) that devloop run uses.

Root cause: The NEEDS_WORK branch in cmd_resume was missing the full escalation block present in cmd_run.

Changes:

  • cmd_resume NEEDS_WORK branch now mirrors cmd_run exactly: calls _run_respec_phase when DEVLOOP_FIX_STRATEGY=escalate (default)
  • Added --no-respec flag to devloop resume for parity with devloop run --no-respec
  • Added human-checkpoint inbox write before the last fix round before respec

Upgrade

devloop update

v5.1.6 — Review hardening: huge diffs & provider errors

17 May 12:03

Choose a tag to compare

What's New

cmd_review now handles oversized diffs and provider errors gracefully

Triggered by a real failure: An Electron project with an untracked out/ directory produced a 734 KB diff. Claude replied Prompt is too long, the engine couldn't parse a verdict, and eventually aborted with Unknown verdict repeated — stopping.

Three new guards

1. Pathspec exclusion — build/dep dirs dropped from diff by default:

Default excludes: out dist build .next .turbo coverage node_modules *.min.js *.bundle.js *.map

Override with DEVLOOP_REVIEW_EXCLUDE="<space-separated pathspecs>"
Restore legacy behaviour: DEVLOOP_REVIEW_EXCLUDE=none

2. Byte-size cap — diff truncated at 150 KB by default:

  • Controlled by DEVLOOP_REVIEW_MAX_BYTES (default 150000)
  • Set to 0 to disable
  • Truncated diffs get a clear marker so the reviewer knows

3. Provider-error detector — detects failure replies before the retry loop:

  • Recognises: Prompt is too long, rate_limit, context length exceeded, overloaded_error, Request timed out, etc.
  • Exits with code 4 (provider-error status) + actionable hints
  • No longer falls through to the generic Unknown verdict retry loop

How to update

devloop update

v5.1.5 — Fix arithmetic crash in reviewer/fix loop

17 May 10:37

Choose a tag to compare

What's Fixed

((: 0\n0: syntax error in expression crash

Symptom: /usr/local/bin/devloop: line 8704: ((: 0 0: syntax error in expression (error token is "0")

Root cause: set -o pipefail + || echo 0 fallback pattern produces double output:

# BROKEN: with pipefail, when grep finds no matches:
#  1. grep exits 1 → pipefail propagates
#  2. wc -l still outputs "0"
#  3. || echo 0 ALSO fires → output is "0\n0"
count="$(grep ... | grep "fix-" | wc -l | tr -d ' ' || echo 0)"
# then: (( count == 0 ))  →  crash on embedded newline

Fix: Use grep -c || truegrep -c always outputs a clean integer (0 or N), and || true adds no output:

count="$(grep ... | grep -c "fix-" || true)"
count="${count:-0}"

How to update

devloop update

v5.1.4 — Fix stale Live View status after resume

17 May 01:31

Choose a tag to compare

What's Fixed

Live View shows correct status after devloop resume

Bug: After a session timed out (timed-out-at-plan or timed-out-at-diff), running devloop resume would restart the pipeline — but the Live View panel kept showing the old status (e.g. timed-out-at-plan) even while the pipeline was actively running again.

Root cause: _session_finish writes the terminal status to /status. cmd_resume never reset this file before relaunching the pipeline.

Fix: cmd_resume now immediately:

  1. Writes running to status
  2. Removes finished_at

...before relaunching the pipeline, so the Live View immediately reflects the resumed state.

How to update

devloop update

v5.1.3 — Fix truncated download guard in devloop update

17 May 01:07

Choose a tag to compare

What's Fixed

devloop update now validates downloads before installing

Root cause of the unexpected EOF while looking for matching '"' errors after devloop update: the previous sanity check only verified the word devloop appeared in the file. A truncated download (partial network transfer) passes this check but results in a broken installation.

Fix: Three-stage validation before installing:

  1. File size > 50 KB — rejects partial/truncated downloads
  2. VERSION= line present — confirms it's a devloop script
  3. bash -n syntax check — catches any corrupted or truncated file before it overwrites your working installation

How to update

devloop update

Or manually:

curl -fsSL https://raw.githubusercontent.com/shaifulshabuj/devloop/main/devloop.sh -o /usr/local/bin/devloop && chmod +x /usr/local/bin/devloop

v5.1.2 — bash version check in doctor

17 May 01:01

Choose a tag to compare

Fixed

  • devloop doctor now checks your bash version and warns when running on macOS system bash (3.2.x):
⚠  bash 3.2.57(1)-release — macOS system bash (3.2) works but upgrade recommended
   → brew install bash   then add /opt/homebrew/bin to PATH

macOS ships bash 3.2 for licensing reasons. devloop works on bash 3.2 but bash 4+ is recommended.

v5.1.1 — Pipeline stuck-state recovery fixes

17 May 00:54

Choose a tag to compare

Fixed — pipeline stuck-state recovery

This patch release resolves the pipeline stuck-state bugs reported in issues #2, #3, and #4.

Approval gate timeout recovery

  • _approval_gate now returns exit code 3 (stalled) vs 1 (active rejection)
  • New timed-out-at-plan / timed-out-at-diff session statuses — shown in devloop resume --list
  • Timeout leaves a recovery hint: devloop resume <id> instead of a dead bash-3.2$ prompt

devloop resume gate re-presentation

  • timed-out-at-diff / rejected-at-diff → re-shows only the diff gate (worker doesn't re-run)
  • timed-out-at-plan / rejected-at-plan → re-shows plan gate for a fresh approval
  • rejected-at-plan and rejected-at-diff are now resumable (previously treated as terminal)
  • --approve-diff flag force-approves the diff gate when resuming a timed-out session

devloop continue alias

  • devloop continue <id> now correctly aliases devloop resume <id>
  • Was previously misrouted to the natural-language router, spawning a duplicate architect phase and Live View

Incomplete spec auto-retry

  • cmd_architect retries spec generation up to 2 times if ## Copilot Instructions Block is missing
  • devloop run auto-re-architects once if the first attempt exits non-zero
  • _extract_plan_summary appends a ⚠ WARNING at plan-gate time when block is missing
  • cmd_work error now shows exact recovery commands: devloop architect "<feature>" + devloop work <id>

Full changelog: CHANGELOG.md

v5.1.0 — TUI dashboard, chat REPL, approval gates

16 May 13:35

Choose a tag to compare

Added — biggest UX shift since v5.0

DevLoop now has a real interactive surface alongside the bash one-shots.

Companion TUI (cmd/devloop-tui/)

  • devloop (no args) → live Bubble Tea dashboard with session picker + pipeline detail, refreshed via fsnotify on the event stream
  • devloop chat → slash-command REPL: /plan, /run, /diff, /rollback, /status, /inbox, /mode ask|code|auto
  • devloop status → live single-session view
  • Single static Go binary. Opt-in: make tui-install to ~/.devloop/bin/. Bash falls back gracefully when the binary is absent.

Approval gates between pipeline stages

  • devloop run pauses after architect (plan review) and after worker (diff review)
  • Decide via TUI, gum, /dev/tty, or pre-write approvals/<gate>.json for CI — same contract
  • Skip everything with --auto / -y or DEVLOOP_AUTO=1
  • Reject-with-edit at the diff gate opens $EDITOR on the spec and re-runs the worker

devloop resume [TASK-ID]

  • Picks up an interrupted pipeline from the last completed phase by replaying events.ndjson
  • --list shows resumable sessions, --dry-run prints the planned action

Structured event stream

  • .devloop/events.ndjson is now the single source of truth for tooling
  • Per-session mirror at .devloop/sessions/<TASK>/events.ndjson
  • Full schema in docs/events.md
  • Silence with DEVLOOP_EVENTS_DISABLED=1

Quality-of-life

  • devloop configure — gum-driven wizard (provider, models, permission mode, failover, auto-view). --non-interactive / --yes for headless reruns. Config schema unchanged.
  • devloop permissions — editor for .devloop/permissions.yaml (allow/deny patterns extending the built-in permission hook)
  • Always-visible status header during devloop run / devloop resume: [arch ✓] [work ⠙] [review ·] [fix ·] TASK-… feature. Re-renders at each stage boundary. No-op when stdout isn't a TTY or DEVLOOP_STATUS_HEADER=off.

Architecture

The bash engine stays the engine. The TUI is a sibling Go binary that reads the event stream — it never parses bash output. Everything degrades: no Go binary → bash works; no gumread prompt; no TTY → no-op headers. CI / scripted pipelines keep working unchanged.

Upgrade

devloop update              # pulls v5.1.0
make tui-install            # optional, builds the TUI

Full changelog

See CHANGELOG.md and merged PR #1.

v5.0.4 — Permission hook: less noise, no double dialogs

11 May 00:00

Choose a tag to compare

Fixed — Claude permission prompts

Problem: Running devloop run as Claude architect triggered permission prompts for safe commands like devloop --help, devloop status, and for f in *.md; do head -5 "$f"; done.
Additionally, both the terminal [y/N] prompt AND the macOS dialog could fire simultaneously for the same request.

Fixed:

  • Auto-approve all devloop read commands (status, logs, help, view, check, sessions, recent, version)
  • Auto-approve for-loop file reads (common Claude pattern for reading specs)
  • Auto-approve pipelines where every segment is a known-safe command
  • macOS dialog only shows when terminal prompt was unavailable (no more double dialogs)

Upgrade: devloop update