Skip to content

feat(config): add useSSHIdentityFile user config option#338

Open
michael-webster wants to merge 2 commits into
mainfrom
webster/allow-ssh-key-use
Open

feat(config): add useSSHIdentityFile user config option#338
michael-webster wants to merge 2 commits into
mainfrom
webster/allow-ssh-key-use

Conversation

@michael-webster
Copy link
Copy Markdown
Contributor

Summary

  • Adds useSSHIdentityFile as a user config key, letting users opt in to using the default chunk SSH identity file (via sidecar.DefaultKeyPath()) when opening SSH sessions to sidecars, instead of relying on SSH_AUTH_SOCK
  • Surfaces UseSSHIdentityFile through ResolvedConfig so config show displays it consistently alongside other fields
  • Fixes silent error handling: surfaces DefaultKeyPath() failures as warnings and removes a misleading warning: print that preceded a hard-error return

Test plan

  • chunk config set useSSHIdentityFile true / false — verify accepted values and error on invalid input
  • chunk config show — verify useSSHIdentityFile appears in output
  • chunk validate with useSSHIdentityFile=true and no identity file present — verify warning is printed and SSH falls back to auth sock behavior
  • go test -race ./internal/cmd/... ./internal/config/...

🤖 Generated with Claude Code

webster and others added 2 commits May 15, 2026 12:57
Long-running Claude sessions would get stuck waiting on SSH_AUTH_SOCK
approval prompts for each sidecar connection. Add a user-settable
boolean (chunk config set useSSHIdentityFile true) that prefers the
default chunk identity file (~/.ssh/chunk_ai) over the SSH agent,
avoiding repeated auth prompts in hook context.

Also print a warning when remote validate commands fail silently so the
error is visible rather than just causing an unexplained exit code 2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… errors

- Add UseSSHIdentityFile to ResolvedConfig so config show reuses the
  already-loaded config rather than calling config.Load() a second time
  with a silently swallowed error
- Surface DefaultKeyPath() error as a warning instead of discarding it
  when useSSHIdentityFile is set
- Remove misleading warning: print before remote run errors that are
  already returned as hard failures to the caller

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@michael-webster michael-webster marked this pull request as ready for review May 18, 2026 16:01
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