Skip to content

feat: custom claude launch options per session - #54

Merged
jongracecox merged 2 commits into
mainfrom
worktree/20261002-custom-session-options
Oct 8, 2026
Merged

jongracecox merged 2 commits into
mainfrom
worktree/20261002-custom-session-options

Conversation

@jongracecox

Copy link
Copy Markdown
Owner

Summary

Launch a session with extra claude CLI arguments (e.g. --plugin-dir) without adding a step to every launch.

Changes

  • Shift+Enter / o on any launch (create flow branch, Launch / Resume / Fork in the session menu, Ad hoc) opens a launch options dialog pre-filled with what the launch would otherwise use. Plain Enter launches as before.
  • Options persist per session, so a plain Enter relaunch reuses them — including after a terminate:
    • worktrees: claude_args in .fujimoto/meta.json
    • direct / ad hoc sessions: the sessions.json record, plus ~/.cache/fujimoto/launch_options.json keyed by Claude conversation id (copied there on terminate)
  • Precedence: saved for the session → inherited from a fork's parent → .fujimoto.yaml claude_args → none. Saving options equal to the project default clears the override, so the session keeps following the config.
  • .fujimoto.yaml claude_args: list or shell-style string; added to the --create-config template.
  • Session menu "Launch options" item edits the saved options without launching, showing the current value and its source.
  • The dialog links to the claude CLI flags reference.
  • Arguments are shlex.quoted into the tmux command; resolve/save are instrumented in the debug log (arguments redacted under --debug-redacted).

Notes

Shift+Enter is only a distinct key under the kitty keyboard protocol — legacy terminals send plain Enter, and inside tmux the modifyOtherKeys form is dropped — hence the o fallback.

Testing

Full suite passes (1088 tests), including new tests/test_launch_options.py and TUI tests for the dialog, the menu item, terminate-keeps-options and fork inheritance.

Shift+Enter (or `o` where Shift+Enter isn't distinguishable) on any launch
opens a dialog pre-filled with the session's launch options, for extra
claude arguments such as --plugin-dir. Plain Enter is unchanged.

Options are saved per session and reused on every later launch: in the
worktree's meta.json, on the session record, and in a conversation-keyed
cache so they survive a terminate and resume. A fork inherits its
parent's options, and .fujimoto.yaml gains a project-level `claude_args`
default. The session menu gets a "Launch options" item to edit them
without launching, and the dialog links to the claude CLI flags docs.
@jongracecox
jongracecox merged commit a8228be into main Oct 8, 2026
5 checks passed
@jongracecox
jongracecox deleted the worktree/20261002-custom-session-options branch October 8, 2026 14:47
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.

1 participant