Releases: existential-birds/daydream
Release list
v0.23.1
Fixed
-
backends/claude: Upgrade
claude-agent-sdkto 0.2.116 for shielded subprocess teardown (#266)Pins the Claude SDK to 0.2.116, whose cancellation path shields the CLI subprocess teardown. Earlier versions tore the subprocess down unshielded, so a budget/fan-out cancellation mid-stream corrupted anyio's cancel-scope stack ("Attempted to exit a cancel scope that isn't the current task's current cancel scope").
-
backends/pi: Respect configured model defaults (#265)
The Pi backend now resolves its own configured default model before falling back to
DEFAULT_PI_MODEL, so per-phase and config-file model settings are honored instead of being overridden by the built-in default.
v0.23.0
[0.23.0] - 2026-07-10
Added
-
runner:
--flow <name>selects a registered flow for dispatch (#263)A fork can register a brand-new flow via
registry.set_flow(...)indaydream_extand now run it end-to-end with--flow <name>(orRunConfig(flow_name=...)). Built-in names (deep/shallow/review) route to their existing dedicated helpers so behavior is unchanged;pr-feedbackis not selectable this way (usedaydream feedback); unknown names fail with the standard Extension Error panel. Custom flows open their recorder through the shared factory, so--dump-artifacts/archival apply automatically. -
archive:
--dump-artifactsflag to export full run bundle for CI upload (#258)Emits a tarball containing the trajectory, manifest, review artifacts, and handoff (if any) for a completed run. Designed for CI environments where the workspace is ephemeral and the artifact needs to be uploaded as a GitHub Actions artifact or attached to a check run.
-
atif: Re-vendor ATIF v1.7 from harbor and emit v1.7 (#253)
Updates the vendored ATIF schema to v1.7, bringing the trajectory format in line with the latest harbor specification. All new trajectories are stamped with
atif_version: "1.7"; the recorder's v1.6-to-v1.7 delta is limited to the addedmetricsblock onTurnEndEventand asession_idfield on the root. -
phases: Per-file-group budgeting to fix phase (#251)
The fix phase now allocates per-file-group wall-clock and tool-call budgets instead of a single global budget, preventing a single slow file group from consuming the entire fix allocation. Budgets scale with the number of findings in each group and fall back to a safe default when unspecified.
-
bench: Repeated-trial benchmarking with variance reporting (#250)
daydream benchnow supports--trials Nto run the benchmark N times against the same PR set and report mean plus standard deviation for precision, recall, and F1. Surfaces variance so a single noisy run doesn't mask regressions or false improvements. -
review: Precision-mode arbiter suppression for evidenced-but-minor findings (#232)
The arbiter now drops findings that are evidence-backed but below a severity/confidence threshold, reducing noise from technically-correct-but-trivial comments. Suppressed findings are logged to a sidecar audit file. Activated via
--precisionor automatically when the diff exceeds 500 lines. -
training: Stable per-finding join key for accept/reject labels (#246)
Findings now carry a stable
fingerprint(hash of file, line range, and finding text) so accept/reject labels can be joined back to the finding across archive, harvest, and projection stages. Eliminates the positional matching that broke when findings were reordered or deduplicated. -
bench: Materiality gate —
--min-confidence/--min-severity(#245)Benchmark scoring now filters submitted comments by configurable confidence and severity thresholds, so low-signal findings don't inflate recall. Defaults preserve the previous scoring behavior; values are validated at parse time.
-
bench: Preserve confidence/severity as structured fields on submitted comments (#244)
Submitted benchmark comments now carry
confidenceandseverityas first-class structured fields rather than embedded in the comment body text. Enables the materiality gate and per-tier scoring breakdowns without parsing prose. -
benchmark: Direct Anthropic judge route (#243)
The benchmark scorer can now use an Anthropic model directly as the judge via
--judge-model, bypassing the OpenRouter routing layer. Eliminates a class of routing failures and reduces judge-call latency by ~40%.
Fixed
-
backends: Fold Claude cache tokens into
prompt_tokenstotal (#262)Claude SDK reports cache read/write tokens separately from
input_tokens. The backend now folds them into theprompt_tokenstotal onCostEventandMetricsEvent, so cost synthesis and trajectory metrics reflect the true prompt-token count. Previously, cache tokens were silently excluded, understating cost by 30-60% on cached runs. -
review: Embed verification-protocol gates inline instead of a skill-file read in the structural and generic-fallback reviewers (#260)
These two reviewers run with cwd set to the reviewed repo, so the previous
read review-verification-protocol/SKILL.mdinstruction resolved against that repo, failed ("skill doesn't exist as a file"), and silently dropped the anchor/evidence/severity gates. The gates (0–3) are now stated inline inVERIFICATION_PROTOCOL_INSTRUCTION, mirroring the inline gate-0 embedding already used bybuild_verification_prompt. Both reviewers are language-agnostic, so the protocol's language-specific valid-pattern tables were of little use to them; the gate discipline is what mattered and is now self-contained. -
corpus: Archive
findings.jsonso per-finding join reaches corpusThe archive step now copies
findings.json(the merged-items artifact) into the archive directory alongside the trajectory, so the corpus harvester's per-finding join can reach it without re-running the merge phase. Previously, a missingfindings.jsoncaused the harvester to silently skip label attribution for all findings in the run. -
bench: Validate
--min-confidence/--min-severityvaluesThe materiality gate now rejects invalid confidence/severity values at parse time with an actionable error, instead of silently disabling the gate when a typo or unsupported value was passed.
-
archive: Drop the destructive bootstrap purge of legacy 'Z' valid_at rows
The archive SQLite index no longer purges legacy bitemporal rows with 'Z' suffix valid_at timestamps on connect. The purge was a migration-era safety net that destroyed legitimate historical data when run against an already-migrated database. Canonicalization now happens at the write boundary instead.
-
corpus: Canonicalize bitemporal timestamps at the write and as_of boundaries
Bitemporal timestamps in the corpus projection are now canonicalized to ISO 8601 UTC at both the write boundary (when the row is inserted) and the as_of boundary (when the projection query runs), eliminating timezone drift that caused join misses between harvest and projection stages.
v0.22.0
[0.22.0] - 2026-07-02
Added
-
extensions: Versioned extension seam with
daydream_extdiscovery, flow engine, anddaydream ext validateCLI (#241)Daydream now has a first-class, versioned extension API. An installed
daydream_extpackage is auto-discovered with a version gate and exposed through aRegistryon aContextVar. The registry routes skill slots (stack, structural, pr-feedback, phase-bound), named prompts (with wholesale override), and stack rules through a single seam, replacing scattered hardcoded lookups. All four flows (deep, shallow, review, pr-feedback) now run through arun_flow()engine with enabled gating,Stop/BreakLoopcontrol, and loop groups. Newdaydream ext validateCLI resolve-checks the entire extension registry. -
deep:
--findings-outdrives the deep pipeline and stops before post/fix (#239)The single-file review-bot workflow now points at the default deep pipeline so the bot consumes the validated, arbiter-merged review. When
--findings-outis set, the orchestrator writes the artifact from merged-items.json and returns before the PR-post block and apply-fixes gate. Also removes the vestigial--plan/ENVISION advisory pass and fixes--reviewto stop after findings instead of writing a stray plan file. -
review: Structural evidence gate drops speculative/no-evidence findings before merge (#236)
Adds a first-class
evidencefield to all finding schemas. A structural gate in the merge path drops any finding without a grounded citation (path:line) before it reaches merged-items.json, review-output.md, the fix stage, PR posting, or the benchmark. Dropped items are logged to adropped-speculative.jsonaudit sidecar. Applies to both the cross-stack merge and the tiny-diff single-stack bypass. The confidence enum collapses to HIGH/MEDIUM (LOW/no-evidence removed). -
prompts: Eliminate speculative and breadth-padding generation in review prompts (#238)
Removes language that invites evidence-free guesses and scope creep: drops the LOW/no-evidence confidence tier, replaces "Prefer LOW over MEDIUM" with a grounding directive, removes the "Would you have done this differently?" breadth invitation from alternative review, and requires concrete recommendations per issue rather than just the problem.
-
review: Wire review-verification-protocol into structural and generic-fallback reviewers (#235)
The structural and generic-fallback review prompts now load the review-verification-protocol skill (anchor/evidence/severity gates). The verification prompt adds a gate-0 anti-confabulation echo requirement. Product default is unchanged: verdicts stay advisory, zero findings dropped.
-
templates: Optional single-file review-bot workflow (drops
actions: write) (#237)Adds
daydream/templates/workflows/single/daydream.ymlas an optional manual-copy alternative to the three-file split. It chains gate, analyze, and post asneeds:-ordered jobs in one workflow run, replacing the cross-workflowworkflow_dispatchthat requiredactions: write. The privilege split is preserved at the job level: gate holds the App key but no code, analyze holds PR code but no App key, post holds the App key but no PR code. Every action is pinned to a full commit SHA. -
training: Eval-on-by-default and recommended-change patch capture (#234)
Eval is now on by default (
--evalbecomes--no-evalopt-out);analyze_sessionruns on every archive unless explicitly skipped, populating all four eval metrics (grounding_rate, total_findings, coverage_ratio, cost_per_finding_usd). A separaterecommended.patch(daydream's proposed diff) is captured distinct from the PR-under-reviewdiff.patch, with backward-compat fallback for legacy archives. Untracked files created during the fix phase are included in the capture.
v0.21.0
[0.21.0] - 2026-06-30
Added
-
backends: Add pi coding-agent backend with ATIF trajectory parity (#195)
Daydream now supports z.ai GLM models through a new
PiBackendthat spawns thepiCLI as a subprocess and parses its JSONL event stream into unifiedAgentEventtypes. Implements the same subprocess+JSONL pattern proven byCodexBackend, with full ATIF v1.6 trajectory parity including tool-use events, cost reporting, and structured-output emulation. Per-phase model defaults for z.ai models are configured inconfig.py. -
bench: Review-bot comparison harness (daydream vs coderabbit/greptile) (#208)
Adds
bench/review-bot-compare/with a replay-driven harness that runs daydream and SaaS review bots (CodeRabbit, Greptile) against the same held-out PRs, harvests their findings, and judges them on a level playing field. Produces per-PR precision/recall metrics so review quality can be compared head-to-head. -
bench: Offline benchmark report — daydream vs the SaaS field (#224)
Generates a self-contained HTML benchmark report from comparison-harness results, with per-reviewer scorecards and per-PR breakdowns. Renders entirely offline from cached data — no live API calls needed to produce the report.
-
bench: Select any reviewer backend (incl. GLM via OpenRouter) with evidence-grade submission parity (#223)
The benchmark harness now lets you run any backend as the reviewer — including GLM via OpenRouter — with submission parity guarantees so results are comparable across providers regardless of their native output format.
-
deep: Parallelize the deep fix loop (#178)
Same-file findings are now fixed in parallel via
anyio.CapacityLimiter(4)fan-out instead of sequentially, significantly cutting wall-clock time for fix phases with multiple independent findings. -
deep: Ground review intent in the PR description (#182)
The deep orchestrator's intent phase now reads the PR description so review focus aligns with what the author set out to do, rather than reviewing the diff in a vacuum.
-
trajectory: Record phase timing events (#205)
Each phase now emits structured timing events into the ATIF trajectory, enabling per-phase wall-clock analysis from the trajectory file without inferring gaps.
-
trajectory: Register subtrajectory entries for parallel fix-phase forks (#220)
Parallel fix-phase fan-outs now register their sibling trajectories in the parent, so the root trajectory records all forks explicitly rather than leaving them as orphaned files.
-
phases: Batch same-file findings into single run_agent() call (#216)
When multiple findings target the same file, they are now passed to a single agent invocation instead of one per finding, reducing redundant context loading and redundant tool calls.
-
backends/pi: Retry transient stream-drop errors and mark aborted trajectories partial (#219)
-
backends/pi: Tighten fix-phase prompts with concise_fix_prompts flag (#217)
Changed
-
agent: Cap runaway run_agent turns with wall-clock and tool-call budgets (#185)
Every
run_agent()call is now bounded by configurable wall-clock and tool-call limits, preventing a single stuck agent from burning through an entire review budget. Limits are tiered by phase. -
deep: Short-circuit tiny-diff fan-out and inline diff hunks in per-stack prompts (#199)
Small diffs skip the multi-stack fan-out entirely and inline the raw diff hunks into per-stack review prompts, eliminating unnecessary subagent spawns for trivial PRs.
-
deep: Make verify conditional, demote intent to Sonnet, gate alternatives by diff size (#197)
The verification pass now runs conditionally (skipped when no findings need it), the intent phase moves from Opus to Sonnet, and the alternatives phase is gated by diff size — reducing cost and latency on typical PRs without sacrificing quality on complex ones.
-
backends/codex: Event-layer cost synthesis for provider parity (#196)
-
backends/codex: Surface reasoning_output_tokens for cost attribution (#193)
-
ui: Split
ui.pyinto aui/package (#183)The 3,500-line
ui.pymonolith is now a proper package with separate modules for console, panels, messages, tools, agent text, theme, colorize, and summary rendering.
Fixed
-
prompts: Ground review/exploration agents to cwd in linked worktrees (#222)
-
agent: Fix
detect_test_successfalse-negative on deselected/skipped pytest output (#204)The test-success detector now handles pytest output containing deselected/skipped counts — previously a clean pass with
N deselectedwas classified as a failure, aborting the fix loop. -
backends/claude: Eliminate cancel-scope RuntimeError on generator cleanup (#206)
-
backends/pi: Retry transient 429 and OOM failures (#215)
-
backends/pi: Invoke deep review skills natively (#213)
-
training: Drop redundant
--sincefilter fromlog_shas_since, raise timeout, surface errors (#218) -
backends/codex: Deterministic tool-id pairing and observable parse failures (#187)
-
backends/codex: Real-CLI golden contract test, trajectory parity, and cost-synthesis pinning (#188, #189, #190, #191)
v0.20.0
Added
-
github_app: Run under operator GitHub App identity with scoped token injection (#159)
Daydream can now act as a self-hosted review bot using the operator's own GitHub App. Reviews are authored under the App's identity with a short-lived, repo-scoped installation token injected at runtime, so the maintainer never exposes a personal access token.
-
bot: Actions trigger surface — @-mention / auto-on-PR review via privilege split (#160)
Adds GitHub Actions trigger wiring so a review runs either when the bot is @-mentioned on a PR or automatically on PR open/update. A privilege split keeps the untrusted PR-triggered job read-only while a separate trusted job posts results.
-
bot_setup: One-command self-hosted review-bot setup and distribution (#161)
Bundles the workflow templates and a guided setup flow so an operator can stand up a white-label PR review bot in their own repository with a single command.
-
pricing: User-overridable model price table (#165)
Per-model token prices can now be overridden via config so cost metrics stay accurate as provider pricing changes, without waiting for a daydream release.
Changed
-
cli: Verb-first redesign with config-file phase control (#141)
Breaking. The CLI is now verb-first (
daydream review,daydream corpus …), with a default review shim sodaydream /pathstill works. Per-phase--model/--backendflags are removed in favor of[tool.daydream]/[tool.daydream.phases.<phase>]config inpyproject.tomlor.daydream.toml(precedence: CLI global--model/--backend> config file > built-in default). The data pipeline verbs are namespaced undercorpus(daydream corpus harvest/build/label),--max-iterationsfolds into--loop [N], advanced flags hide behind--help-all, and non-interactive mode auto-detects from a non-TTY/CI environment. -
deep: Sonnet-first per-stack review with a scoped Opus arbiter (#175)
Per-stack reviews now run on Sonnet by default with a scoped Opus arbiter pass, cutting review cost and latency while preserving finding quality.
Fixed
-
git_ops: Retry transient git timeouts and distinguish them from genuine errors (#142)
-
training: Correct run-level label attribution — footer-not-bot and archive-time PR linkage (#149)
-
ui: Render Task-family tools with resolved labels in both render paths (#150)
-
codex: Real-path harness infrastructure and Codex backend fixes (#158)
-
training: Harden harvest PR-signal labeling; de-cruft and parallelize the test suite (#174)
Security
- deps: Bump
cryptography,python-multipart, andstarlettein the uv group (#162)
v0.19.0
Added
-
benchmark: Add held-out PR replay benchmark harness via
daydream bench(#137)Replays a corpus of held-out, already-merged PRs through the review pipeline and scores each run's findings against the human reviewers' acted-upon comments, producing precision/recall metrics for the review agent. Lets daydream measure regressions in review quality across changes to skills, prompts, and backends.
-
cli: Add harness-safe non-interactive mode across all daydream flows (#132)
--non-interactivemakes every flow (deep loop, shallow loop, comment, review, PR feedback) take safe defaults instead of prompting, so daydream can run unattended inside CI or an orchestration harness without blocking on a TTY gate. -
archive: Add human-override label precedence, idempotent harvest, and rate-limit handling (#119)
Harvest now treats human-applied labels as authoritative over inferred ones, re-running a harvest no longer duplicates entries, and GitHub rate-limit responses are backed off and retried instead of aborting the run.
-
training: Add a posterior reject-penalty axis to the reward signal (#115)
The reward model now penalizes findings that were posted but later rejected by a human reviewer, sharpening the signal that distinguishes useful review comments from noise.
-
pr-comment: Add per-phase wall-clock latency to metrics (#109)
Fixed
-
phases: Ground the failure handoff in evidence with an enforced read-only summarizer (#136)
When a run hands off after a failure, the summary is now produced by a read-only agent constrained to cite actual evidence, preventing the handoff from inventing diagnoses or mutating state.
-
cli: Detect repo slug and PR number from the target checkout, not the current working directory (#135)
-
workspace: Accept a commit-ish
--baseand guard against dash injection (#134) -
archive: Derive
wall_clock_secondson every run and unify ISO timestamp parsing (#133) -
git_ops: Diff against the remote default branch instead of the local one (#113)
-
exploration: Prevent stuck subagents and unmatched tool results (#112)
-
runner: Dispatch on
botinstead ofpr_numberto prevent false feedback routing (#111)
Security
- deps: Bump
starlettefrom 0.52.1 to 1.0.1 in the uv group (#138)
v0.18.0
[0.18.0] - 2026-05-26
Added
-
training: Corpus pipeline architecture — harvest, reward, bitemporal projection (#104)
Introduces the
daydream/training/package with three pipeline stages:harvestcollects ATIF trajectory runs from the archive into labeled training corpora,rewardscores trajectory steps against configurable reward signals (cost efficiency, grounding accuracy, finding acceptance rate), andbitemporalprojects reward labels back onto trajectory steps using both wall-clock and agent-logical timestamps. Designed for offline RL/RLHF fine-tuning loops over daydream's own review traces. -
training: JSONL exporter for ATIF trajectories (#95)
Adds
daydream training exportsubcommand to convert archived ATIF trajectory files into newline-delimited JSON suitable for ML training pipelines. Each trajectory step becomes one JSONL record with flattened token counts, cost, tool I/O, and phase labels. -
deep: Language-agnostic structural review meta-stack (#101)
Adds a structural review pass that runs independently of per-language Beagle skills, analyzing cross-cutting concerns (API contract consistency, error propagation patterns, dependency direction violations) using tree-sitter parse trees. Activates automatically in deep mode when multiple stacks are detected.
-
archive: Capture
source_pathin manifest and add harvest clone cache (#106)The archive manifest now records the absolute
source_pathof the reviewed repository, enabling corpus harvest to trace runs back to their origin repo. Adds a clone cache under~/.daydream/harvest/clones/so repeated harvests against the same repo skip redundant clones.
Changed
- docs: Rewrite README for research/ML audience (#107)
Fixed
-
tests: Isolate
DAYDREAM_ARCHIVE_DIRto stop polluting~/.daydream/archive(#100)Tests that exercise archive functionality now use a temporary directory instead of the user's real archive, preventing test runs from creating stale entries in the production archive index.
-
explore: Remove
.coderabbit.yamlfrom pattern-scanner prompts (#96)
Security
- deps: Bump
idnain the uv group (#97)
v0.17.0
Breaking
- cli: Remove the single
--modelflag in favor of per-phase model overrides (#82). Replace--model <name>with the per-phase flag(s) you actually want —--review-model,--parse-model,--fix-model,--test-model, or--exploration-model. Passing--modelnow exits early with a curated error pointing at the new flags (both--model Xand--model=Xshapes are caught before argparse runs). Each phase resolves its model in this order: explicit per-phase flag → per-backend phase default → backend default, so phases without an override knob (WONDER, ENVISION, MERGE, INTENT, PR_FEEDBACK) still get phase-appropriate models out of the box. Per-backend defaults are documented in the README's Per-phase model defaults section.
Added
-
deep: Add a read-only
phase_verify_recommendationspass between cross-stack merge and the fix gate (#84). The verifier audits each merged finding's recommendation (not just the finding) against trait/interface contracts and sibling implementations, emits structuredconsistent/contradicts/uncertainverdicts plusunverified_assumptionsto.daydream/deep/recommendation-verdicts.json, and feeds those verdicts back intophase_fixso the fix agent has full verifier context when applying changes. Closes the gap where prior passes only validated whether findings were real — never whether the recommended fix itself was correct. Runs unconditionally in stage 5 so--start-at fixresumes still produce verdicts. UI prints a one-line summary:Recommendation verification: N findings · M flagged (X contradicts, Y uncertain). -
cli: Add per-phase model override flags
--review-model,--parse-model,--fix-model,--test-model(#82). Pairs with the existing--exploration-modelso callers can tune cost vs. quality per phase — PARSE on haiku, FIX/TEST/EXPLORATION on sonnet, REVIEW/WONDER/ENVISION/MERGE/INTENT/PR_FEEDBACK on opus — without a single-knob compromise. -
config: Add
PHASE_DEFAULT_MODELStable mapping backend → phase → model id (#82)._resolve_backend(config, phase)consults this table when no explicit per-phase flag is set, and the deep orchestrator resolves per-phase backends for intent / wonder / review / parse / merge / verify / fix / test. UI now prints a dimModel: <name>line after every phase hero so the effective per-phase model is visible at a glance.
v0.16.0
Added
-
scripts: Add
scripts/review-historic-pr <PR>helper for benchmarking daydream against already-merged PRs (#79)Pins the review to the exact code state the PR introduced (PR head against the merge-base on the original target branch) so output is apples-to-apples with whatever was reviewed at PR time (greptile, coderabbit, etc.). Honors
DAYDREAM_ARGS,KEEP_BRANCHES, and optionalZIP/ZIP_OUTenv vars for bundling.review-output.mdplus the ATIF trajectory directory. Requiresgh,git,jq, anddaydreamon$PATH.
Changed
-
trajectory: Read the daydream version from
daydream.__version__instead ofimportlib.metadata.version("daydream")when stampingagent.versioninto ATIF trajectories (#81)Brings the trajectory recorder in line with every other version-stamping surface (PR comment renderer, PR review wizard,
Daydream-Version:git trailer). Eliminates the silent"0.0.0"fallback that fired onPackageNotFoundError— a broken or partial install will now surface the failure loudly. Also eliminates editable-install lag:importlib.metadatareads from the installed package record (which only refreshes onuv sync), so trajectories used to stamp the previous version after a__version__bump until the next sync. Reading the module attribute is always current.
v0.15.0
Breaking
-
trajectory: Change default trajectory path from
<target>/.daydream/trajectory-<ts>-<id>.jsonto<target>/.daydream/runs/<session_id>/trajectory.json(#70). Scripts that glob fortrajectory-*.jsondirectly under.daydream/must update toruns/*/trajectory.json. The--trajectory <path>flag continues to work for custom locations. -
cli: Remove deprecated CLI flags (#75). The aliases introduced in #44 alongside the new consolidated surface are gone:
Removed Replacement --ttt,--trust-the-technology--comment--review-only--review--deep(removed; deep is the default — pass --shallowto opt out)--pr <n>(top-level), top-level--botdaydream feedback <n> --bot <name>subcommand--python,--typescript,--elixir,--go,--rust,--ios-s <skill>(or auto-detect from changed files)Removes the
_warn_deprecatedhelper and its 5 deprecation warnings fromdaydream/cli.py. Drops the now-deadRunConfig.review_only,trust_the_technology,deep, andforced_skillfields and their downstream branches inrunner.pyandui.py. Archive manifest still emitsreview_only/deepkeys (derived fromoutput_mode/shallow) so the index schema is unchanged.
Added
-
workspace: Unify git operations and add worktree isolation (#57)
Every scattered
subprocess.run(["git", ...])andghcallsite is replaced by a single typeddaydream/git_ops.pywrapper, and a newdaydream/workspace.pyintroduces aWorkContext+open_workspaceabstraction so runs can execute against an ephemeral git worktree (or in-place). The headline UX bug from #44 — running daydream from an org/container directory produced four parallelfatal: not a git repositoryerrors and the agent confabulated explanations — is now a typedNotAWorktreeErrorraised at the boundary with actionable guidance. The companion silent-failure case (git diff main...HEADwhile sitting onmainquietly producing an empty diff) now raisesWrongBranchErrorwith three recovery paths (check out a feature branch, pass--branch, or pass--worktree). Adds--worktree,--branch,--base, and repeatable--copy <path>CLI flags;RunConfiggains 7 fields includingoutput_mode. A pure-integer TARGET is now rejected withdid you mean: daydream feedback <pr#>?. -
cli: Add
daydream summarize <path>subcommand to render the run-info markdown (rollup + per-phase breakdown table + version footer) for a trajectory file or run directory (#70)Pure read + render + print — no GitHub posting. The same call also unifies live and archive trajectory layouts: both now use
<root>/runs/<session_id>/trajectory.jsonplus<root>/runs/<session_id>/trajectories/<descriptor>.jsonsiblings. The- **Mode:** <label>rollup line is removed fromrender_run_info_blockand the live PR comment everywhere; the renderer now owns the<sub>Generated by daydream vX.Y.Z</sub>footer (previously added by the PR-comment shell). -
cli: Skip the ENVISION (plan generation) phase by default in
--commentmode and add a--planopt-in flag (#71)Eliminates unnecessary token spend and interactive prompts when only posting PR review comments. Pass
--planto opt back in: auto-selects all issues, generates a structured implementation plan, and embeds per-issue change instructions (file, action, description, references) in the consolidated agent prompt on the PR comment.phase_generate_plannow returnstuple[Path | None, dict | None]to surface the raw plan data for downstream consumers. -
phases: Add a setup-investigator and a failure-summarizer/handoff for smarter test failure recovery (#77)
Option 1 in
phase_test_and_heal's recovery menu now runs a read-only setup-investigator subagent (inspectsMakefile,pyproject.toml/package.json, CI config,CLAUDE.md,README) before retrying — if it suggests a different test command, the user confirms before the retry switches. Option 4 ("exit and hand off") now spawns a failure-summarizer subagent that writeshandoff.mdto the archived run directory referencing artifacts by absolute path (no embedded diffs), and explicitly instructs the downstream agent to refuse inline hacks. Adds a soft clipboard wrapper (daydream/clipboard.py) usingpbcopy/xclip/xsel/clip.exe— no new top-level deps. Newly created untracked files now surface in the handoff prompt viagit_ops.changed_files(). Sub-trajectories are recorded viaTrajectoryRecorder.fork(). -
phases: Tag every daydream commit with
Daydream-Run: <run_id>andDaydream-Version: <version>git trailers (#73)Both
phase_commit_pushandphase_commit_iterationinject the trailers into the commit agent prompt and verify them post-commit, amending if the agent omitted them. A newgit_ops.amend_trailers()helper usesgit interpret-trailersto append missing trailers, andgit_ops.daydream_commits()queries the log for commits carrying theDaydream-Runtrailer. -
pr-comment: Enrich the PR summary comment with run metrics, daydream version, and Codex cached tokens (#66)
Replaces the single "Mode" line with a structured rollup (model, cost, tokens, cache hit %, steps, tool calls) plus a collapsed per-phase breakdown table and a daydream version footer. Introduces
daydream/pricing.pywith a staticModelPricedataclass andMODEL_PRICEStable coveringgpt-5.5,gpt-5.5-pro,gpt-5-codex, andgpt-5.3-codex, so Codex-backed runs can synthesize cost when the backend doesn't report it.daydream/pr_comment_renderer.pyis a pure renderer — same trajectory in, same markdown out — that aggregates per-phase metrics across one or more sibling trajectories (deep-mode). Also fixesCodexBackendto extractcached_input_tokensfromturn.completed.usage(previously hardcoded toNone).
Changed
-
agent: Revert default Claude model from
claude-opus-4-7toclaude-opus-4-6(#68)4.7 escalates the SDK's default malware-analysis
<system-reminder>(injected on everyReadtool result) into hard refusals on benign user code, citing the reminder verbatim and declining requested edits — a regression vs. 4.6 / 4.5, which treat it as a soft nudge. Trajectory data across three recent deep runs showed 15 reminder-tied refusals out of 135 reads (~11%) and ~2,537 wasted output tokens on "this is benign code, proceeding…" preambles. Reverting to 4.6 until the underlying behavior is addressed. -
agent: Make
modela requiredstrend-to-end (#68); default lives only indaydream.config.DEFAULT_CLAUDE_MODEL/DEFAULT_CODEX_MODEL, resolved exactly once increate_backend. Removed five duplicated literal fallbacks (ClaudeBackend.__init__,CodexBackend.__init__,AgentState.model,runner.set_model(... or "..."), banner display) so a future model bump is one constant change, not a five-file shotgun edit.set_model/get_modeldeleted (AgentState.modelwas unused). -
pr-comment: Slim the per-phase breakdown columns in the PR summary comment table (#69)
Fixed
-
phases: Guard
_do_committrailer amendment against amending non-daydream commits when the pre-commit SHA could not be read (#73). Whenhead_sha()raisedGitErrorbefore the agent ran,sha_beforewasNone, so thesha_after == sha_beforecheck always passed through, potentially amending a pre-existing user commit with daydream trailers. Now also checks forsha_before is Noneand skips trailer verification in that case. -
archive: Migrate the SQLite schema on connect by adding missing
review_backend/fix_backend/test_backendcolumns viaALTER TABLE(#71), fixing "Run archive failed (non-fatal)" on DBs created before these columns existed.
Security
- deps: Bump
python-multipartfrom 0.0.26 to 0.0.27 (#74) — adds multipart header limits and safer parse-offset constructors upstream.