Skip to content

fix: always bash-c wrap commands when wrapper is configured#431

Open
borng wants to merge 14 commits intoasheshgoplani:mainfrom
borng:fix/wrapper-bash-c-wrap-v2
Open

fix: always bash-c wrap commands when wrapper is configured#431
borng wants to merge 14 commits intoasheshgoplani:mainfrom
borng:fix/wrapper-bash-c-wrap-v2

Conversation

@borng
Copy link
Copy Markdown

@borng borng commented Mar 25, 2026

Summary

  • Always pre-wrap commands in bash -c when a wrapper is configured in config.toml
  • Adds back hasEffectiveWrapper helper and unconditional wrapping in prepareCommand
  • Fixes wrapper breakage when AGENTDECK_INSTANCE_ID=xxx has no accompanying shell operators

Context

The wrapper field in config.toml wraps agent commands via execvp(), which cannot interpret shell syntax. Without pre-wrapping in bash -c, inline env var prefixes get passed as literal argv to the wrapper instead of being interpreted by the shell.

Test plan

  • make fmt - no changes
  • go build ./... - passes
  • Launch a session with a wrapper configured - verify env vars set correctly
  • Resume a session with a wrapper - verify --resume works
  • Launch without a wrapper - verify no behavior change

asheshgoplani and others added 14 commits March 18, 2026 18:28
…hgoplani#366)

Check existing terminal-features before appending to avoid duplicates
that balloon the list to 260+ entries over multiple session starts.

Committed by Ashesh Goplani
When the name field is left empty, a random adjective-noun name (e.g.,
"golden-eagle") is shown as a dimmed placeholder and used on submit.
The worktree branch placeholder also reflects the generated name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Branch shows as dimmed placeholder (not filled input) when using
  generated name; only fills when user types a custom name
- Align Validate() and GetValuesWithWorktree() branch derivation logic
- Add tests for generated name fallback, branch placeholder behavior,
  and worktree branch derivation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nal-features-spam

Fix asheshgoplani#366: prevent terminal-features spam by checking before appending
Feat: auto-generate session names as placeholders when name field is empty
…-happy

Feat: add happy wrapper support for Claude and Codex (opt-in via use_happy config)
…ranch

Feat: worktree branch reuse (local+remote) and fzf branch picker via Ctrl+F
…key input

The extended-keys option was set server-wide (`set -sq`), which caused
tmux to activate xterm modifyOtherKeys mode on the outer terminal
(iTerm2, etc.). This persisted even after the tmux option was turned off,
causing Ctrl+R and other modified keys to be sent as escape sequences
that Bubble Tea cannot parse — breaking the recent sessions picker and
other Ctrl-key shortcuts in the dashboard.

Two fixes:
- tmux.go: changed `set -sq extended-keys on` to per-session
  `set-option -t <session> -q extended-keys on` at both call sites
- keyboard_compat.go: also disable xterm modifyOtherKeys (ESC[>4;0m)
  on TUI startup alongside the existing Kitty protocol disable, as a
  defense-in-depth measure

Fixes regression introduced in b427418 (asheshgoplani#342).
When a wrapper is set in config.toml (e.g. wrapper = "direnv exec ."),
wrappers use execvp() which cannot interpret shell syntax. Inline env
var prefixes like AGENTDECK_INSTANCE_ID=xxx get passed as literal argv
to the wrapper instead of being interpreted by the shell.

Fix: always pre-wrap in bash -c when any wrapper is configured, before
passing the command to applyWrapper.

Created by gregb and his home-grown crew of builders 🦜 🤖
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.

5 participants