Discuss sessions with no persistence lost all confirmed work on crash.
Now both milestone and slice discuss prompts instruct agents to
silently save CONTEXT-DRAFT every 2 question rounds via
gsd_summary_save. The final context file overwrites the draft.
Closes#2152
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test regex used unescaped (?:...) groups which were interpreted as
regex syntax instead of matching the literal source text. Escape parens
to match the actual regex pattern in the source code.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test used indexOf which found "gsd_complete_milestone" in the
"Do NOT call" warning (line 34) before the actual step 10 definition
(line 43). Use regex to match numbered step patterns instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix reconciles plan-file tasks into the DB when the planner skips
persistence, so the phase correctly advances to executing instead of
remaining stuck in planning. Update the known-issue test to expect the
fixed behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix changed checkFilePathConsistency to only check task.inputs, not
task.files, since files includes paths the task will create. Update tests
to use inputs instead of files for consistency checks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Structural verification that .bg-shell/ is included in the
BASELINE_PATTERNS array in gitignore.ts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Long messages now word-wrap onto continuation lines aligned with the
message start instead of being truncated with ellipsis. Overlay box
sizes to content height instead of padding to fill the viewport.
migrateHierarchyToDb imported milestones with all-done roadmap slices
as "active" when SUMMARY.md was missing. This let plan-milestone
overwrite already-completed work.
Now checks parsed roadmap slices — if all are done, imports as
"complete" even without SUMMARY.md.
Closes#3390Closes#3379
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The completing-milestone dispatch guard blocked completion when
operational verification was planned but the validation was
intentionally skipped by a budget profile preference. The guard
now detects skip-by-preference markers in the validation content
and allows completion to proceed.
Closes#3399Closes#3344
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All slices got sequence=0 because the three code paths that insert
slices never set the sequence column. This made positional ordering
degenerate to alphabetical-by-ID, causing deadlocks when dependency-
free slices were ordered after blocked ones.
Now passes sequence at:
- plan-milestone: array index from agent-ordered params.slices
- reassess-roadmap: existingCount + index for newly added slices
- md-importer: parse order from roadmap content
Closes#3356
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. complete-milestone: move gsd_requirement_update before
gsd_complete_milestone so agents don't exit before updating
requirement status (#3155)
2. complete-slice: use gsd_requirement_update instead of
gsd_save_decision for requirement status transitions (#3154)
3. uncaughtException handler: log instead of re-throwing to prevent
fatal double-fault that kills the session (#3163)
4. session_before_compact: only cancel during active auto-mode, not
when paused — allows compaction during interactive work (#3165)
Closes#3155Closes#3154Closes#3163Closes#3165
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
logWarning fired on every preferences load when YAML was malformed,
flooding the TUI. Now warns at most once per session with a suppression
notice.
Closes#3376
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. gsd_complete_task now normalizes keyFiles/keyDecisions from strings
(newline-delimited bullet lists) into arrays at the tool boundary,
preventing type mismatch rejections on first call (#3361)
2. Legacy roadmap table parser now detects the dependency column from
the header and only parses deps from that column or cells with
explicit depends/deps keywords — prevents false deps from slice
titles that mention other S-IDs (#3383, #3336)
Closes#3361Closes#3383Closes#3336
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The bg-shell process manifest directory is ephemeral runtime state that
should never be committed, but ensureGitignore() was not including it.
Closes#3389Closes#3388
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three fixes:
1. Strip backtick wrapping in normalizeFilePath — LLM-generated paths
like \`src/foo.ts\` resolve to nonexistent paths, causing false blocks
2. Exclude task.files from existence checks — it includes files the task
will create, so they legitimately don't pre-exist
3. Lower minimum task count from 2 to 1 — single-task slices are valid
per the planning prompt
Closes#3649Closes#3626
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
renderAllProjections called renderPlanProjection which overwrote the
complete PLAN.md (from markdown-renderer.js) with a simplified projection
missing Must-Haves, Verification, Files Likely Touched sections and
corrupting multi-line task descriptions.
Remove the plan projection call from renderAllProjections — the
authoritative renderer in plan-slice/replan-slice tools is the sole
writer. The renderIfMissing recovery path is preserved for when the
file is actually missing.
Closes#3651
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backdrop was painting empty lines with dark gray background (48;5;233),
making the entire screen go black. Now uses dim + gray foreground only.
Message truncation now measures actual prefix width with visibleWidth()
instead of hardcoded 20-char estimate, and uses truncateToWidth() for
proper Unicode handling.
When the planning agent writes S##-PLAN.md with task entries but never
calls the gsd_plan_slice persistence tool, the DB has zero task rows
even though the plan file on disk contains valid tasks. This causes
deriveState to return phase='planning' forever — the auto-mode
dispatcher re-dispatches plan-slice in an infinite loop.
Add a reconciliation step in deriveStateFromDb: when the DB returns zero
tasks but the plan file exists and contains parsed tasks, import them
into the DB so the state machine can advance past planning into
execution. This mirrors the existing #2514 reconciliation pattern for
stale task status.
Fixes#3600
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Differential renderer can't clear old overlay positions when height
changes between filter cycles. Pad to maxVisibleRows so the overlay
stays the same size regardless of filter state.
Use dark gray background + dim foreground for visible backdrop effect
instead of barely-perceptible SGR dim. Size overlay box to content
instead of padding to fill the entire viewport.
- Overlay layout: verify backdrop dims base lines, no dim without flag,
overlay composites on top of dimmed background
- Notification store: verify markAllRead and clearNotifications do not
delete a foreign process's lock file
_withLock() was unconditionally unlinking the lock file in finally,
even when lock acquisition failed. This could delete another process's
lock and allow unlocked concurrent writes. Now tracks ownership and
only cleans up locks we created.