What happened?
des-log-phase --project-dir <relative-path> resolves the relative path against the caller's current working directory rather than the git/worktree root or the log's originally-initialized location. In a monorepo where an agent cds into a subdirectory (e.g. apps/website) partway through a DELIVER run, later des-log-phase calls silently create a second, divergent execution-log.json in that subdirectory instead of appending to the canonical log — with no warning that a new log was started instead of an existing one being found.
Steps to reproduce
des-init-log at a worktree root, initializing execution-log.json at (for example) docs/feature/<slug>/deliver/.
- Log several phases with
des-log-phase while the caller's cwd is still the worktree root.
cd into a subdirectory (e.g. apps/website) as part of normal step work.
- Continue calling
des-log-phase --project-dir . (or an otherwise-relative --project-dir) from the new cwd.
- Run
des-verify-integrity — it reads only the canonical directory and reports the later phases as missing, even though they were logged.
Expected behaviour
Either: (a) a relative/omitted --project-dir resolves against the worktree/git root (git rev-parse --show-toplevel, which in a linked worktree returns that worktree's own root, independent of cwd) rather than the caller's cwd; or (b) des-log-phase fails loud when pointed at a directory with no initialized log, instead of silently starting a fresh one; or (c) the log location is derived from the init-recorded location plus a feature-id, making --project-dir an override rather than the primary resolution path.
Actual behaviour
This ride, the entire 9-step execution log for a DELIVER run landed at the worktree root instead of the intended docs/feature/<slug>/deliver/ location, because a relative --project-dir was passed after the agent had cd'd into apps/website. The split was discovered only at des-verify-integrity time, which reported missing steps and forced a recovery/backfill pass. Reading the tool confirms the log format is a flat events append array with no integrity chain tying entries to a specific init — so a second log silently starts with no cross-reference to the first.
Environment
- Tool:
des-log-phase / des-init-log / des-verify-integrity (DES execution-log CLI)
- Frequency: always, whenever
--project-dir is relative and cwd has changed since init
- Regression? Not a regression — appears to be present since the CLI's initial
--project-dir support
Logs / evidence
Confirmed by reading the des-log-phase implementation: a relative/omitted --project-dir is resolved via the process cwd at call time, with no worktree-root or init-location anchoring, and no existence check against a prior init before writing.
Related
surfaced during ride #49 (brand/visual system) on tobiasbrennecke-com, 2026-07-11
What happened?
des-log-phase --project-dir <relative-path>resolves the relative path against the caller's current working directory rather than the git/worktree root or the log's originally-initialized location. In a monorepo where an agentcds into a subdirectory (e.g.apps/website) partway through a DELIVER run, laterdes-log-phasecalls silently create a second, divergentexecution-log.jsonin that subdirectory instead of appending to the canonical log — with no warning that a new log was started instead of an existing one being found.Steps to reproduce
des-init-logat a worktree root, initializingexecution-log.jsonat (for example)docs/feature/<slug>/deliver/.des-log-phasewhile the caller's cwd is still the worktree root.cdinto a subdirectory (e.g.apps/website) as part of normal step work.des-log-phase --project-dir .(or an otherwise-relative--project-dir) from the new cwd.des-verify-integrity— it reads only the canonical directory and reports the later phases as missing, even though they were logged.Expected behaviour
Either: (a) a relative/omitted
--project-dirresolves against the worktree/git root (git rev-parse --show-toplevel, which in a linked worktree returns that worktree's own root, independent of cwd) rather than the caller's cwd; or (b)des-log-phasefails loud when pointed at a directory with no initialized log, instead of silently starting a fresh one; or (c) the log location is derived from the init-recorded location plus a feature-id, making--project-diran override rather than the primary resolution path.Actual behaviour
This ride, the entire 9-step execution log for a DELIVER run landed at the worktree root instead of the intended
docs/feature/<slug>/deliver/location, because a relative--project-dirwas passed after the agent hadcd'd intoapps/website. The split was discovered only atdes-verify-integritytime, which reported missing steps and forced a recovery/backfill pass. Reading the tool confirms the log format is a flateventsappend array with no integrity chain tying entries to a specific init — so a second log silently starts with no cross-reference to the first.Environment
des-log-phase/des-init-log/des-verify-integrity(DES execution-log CLI)--project-diris relative and cwd has changed since init--project-dirsupportLogs / evidence
Confirmed by reading the
des-log-phaseimplementation: a relative/omitted--project-diris resolved via the process cwd at call time, with no worktree-root or init-location anchoring, and no existence check against a prior init before writing.Related
--project-dirand works correctly with the override" — confirming this issue's specific defect (relative-path resolution against cwd) is not what DES SubagentStop hook ignores nWave path override in AGENTS.md (forces dual-write) #53 covered or fixedsurfaced during ride #49 (brand/visual system) on tobiasbrennecke-com, 2026-07-11