Skip to content

fix(zsh): skip the cd alias to zoxide in agent shells - #312

Merged
furedea merged 1 commit into
mainfrom
fix/zoxide-agent-cd
Oct 23, 2026
Merged

furedea merged 1 commit into
mainfrom
fix/zoxide-agent-cd

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

概要

zsh/.zshrc の alias cd="j" を,エージェントのシェル(CLAUDECODE か AI_AGENT が設定されている)では定義しないようにする.Claude Code のシェルは zoxide の chpwd フックを写さないため,cd のたびに警告が出て,sandbox 内でデータベースへの書き込みも失敗していた.j と zoxide の初期化は変更しない.

変更前後

変更前 変更後
人のターミナルの cd zoxide(j) 変わらない
エージェントのシェルの cd zoxide.毎回警告が出る 組み込みの cd.警告が出ない

受け入れ条件

  • エージェントのシェルでは cd が zoxide を通らない
  • 人の対話シェルでは cd が今までどおり j のエイリアスである
  • tests/zsh/startup.bats に bats のテストを追加した

Closes #311

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea
furedea merged commit d282688 into main Oct 23, 2026
11 checks passed
@furedea
furedea deleted the fix/zoxide-agent-cd branch October 23, 2026 12:20
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.

エージェントのシェルで cd のたびに zoxide の警告が出る

1 participant