Skip to content

fix: devstack finds the stack file from any folder of the repository - #471

Merged
7schmiede merged 1 commit into
mainfrom
fix/stack-file-upwards
Nov 6, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/stack-file-upwards

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

Run from a subdirectory of a stack (an app folder, where an agent cds to run tests), devstack status, logs and lane list answered no daemon is running for this stack although the stack ran: without -f the CLI only looked at ./devstack.toml. The message pointed at the wrong cause, and the obvious reaction (devstack up) does not help.

  • Without -f, devstack looks for devstack.toml in the current folder, then in each folder above it up to the repository root (the first folder holding .git: a folder in the main tree, a file in a worktree). Found in the current folder, the path stays relative, as before.
  • Where nothing is found, the commands that need a stack file say no devstack.toml in <folder> or above it up to the repository root (run it from the stack or pass -f); an explicit -f that does not exist is named as such. init, doctor, mcp, down, tunnel and the machine-wide commands keep their behaviour.
  • The MCP server, started outside a stack, says so instead of "call up first".
  • docs/stack-file.md and the devstack skill say that any folder of the repository will do.

Review card

# Category Point Beats Reversing costs
1 contract Without -f, devstack looks for devstack.toml in the current folder, then in each parent up to and including the repository root (the first folder with .git). only the current folder (before); searching up to the drive root like git low: calls from subfolders fail again
2 contract An explicit -f is taken as given, relative to the current folder, without a search; devstack init keeps writing into the current folder. searching for -f too low
3 contract Where no file is found, a command says where it looked instead of "no daemon is running". the message unchanged low

Approved by the owner in the conversation on 2026-11-06: points 1, 2 and 3.

Decided on my own: the search stops at the repository root, so a repository nested inside another never takes the outer one's stack; an explicit -f that does not exist gets its own message; tunnel (its --setup is machine-wide) and down (it clears containers of a stack whose file is gone) do not require a stack file.

Verified

Windows 11, with this worktree's lane running (installed 0.41.0 daemon), from ui/src/components:

  • 0.41.0 CLI: Error: no daemon is running for this stack
  • this build: status lists the lane's dashboard healthy, lane list and logs dashboard answer
  • from a folder outside any repository: no devstack.toml in …\ds467\a\b or above it up to the repository root (run it from the stack or pass -f)
  • -f nope.toml status: the stack file nope.toml does not exist

cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test -p devstack -p devstack-skills green.

Closes #467

🤖 Generated with Claude Code

Without -f, every command looks for devstack.toml in the current folder,
then in each folder above it up to the repository root (the first folder
holding .git). Run from an app's folder, status, logs and lane list
answered "no daemon is running" although the stack ran. Where nothing is
found, a command says where it looked; a missing -f file is named.

Closes #467

Bug-Class: a default path resolved against the caller's working directory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 3f1570e into main Nov 6, 2026
@7schmiede
7schmiede deleted the fix/stack-file-upwards branch November 6, 2026 12:38
@7schmiede 7schmiede mentioned this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run from a subdirectory: "no daemon is running" although the stack runs (search devstack.toml upwards)

1 participant