Skip to content

fix(tui): allow overriding new session directory - #4050

Open
Sayt-0 wants to merge 1 commit into
mainfrom
fix/4046-new-session-working-dir
Open

fix(tui): allow overriding new session directory#4050
Sayt-0 wants to merge 1 commit into
mainfrom
fix/4046-new-session-working-dir

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

  • accept an optional working directory with /new [dir] in the full TUI
  • resolve relative paths from the active session and expand home and environment references
  • preserve the --working-dir default for bare /new, Ctrl+T, and new-tab buttons
  • validate explicit directories before spawning a session
  • document the new override and --working-dir behavior

Closes #4046

Issue expectations

Expectation Implementation
Keep --working-dir as the default for generic new-session actions Bare /new, Ctrl+T, and both + buttons continue to reuse it
Allow a session to use a different directory without restarting /new <dir> explicitly overrides the default for one session
Preserve the picker when no default is configured Bare /new still opens the picker without an explicit --working-dir
Update the CLI documentation Both --working-dir entries and the TUI slash-command reference are updated

Design notes

  • The command override proposed in the issue was selected instead of adding a modifier binding.
  • Drive-relative Windows paths such as C:foo retain Go's standard filepath behavior; ordinary absolute and relative Windows paths are supported.

Validation

  • task test
  • task build
  • task check-plan-cross
  • golangci-lint run with v2.13.1 built using Go 1.27
  • go run ./lint .
  • go mod tidy --diff
  • npx --yes markdownlint-cli2@0.22.1
  • ./scripts/docs-check-canonical.sh

@Sayt-0
Sayt-0 requested a review from a team as a code owner August 24, 2026 13:27
@aheritier aheritier added area/docs Documentation changes area/tui For features/issues/fixes related to the TUI kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation changes area/tui For features/issues/fixes related to the TUI kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Working-directory picker unreachable for new sessions when --working-dir is set

2 participants