# Add terminal thread init command \(\#59374\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fd5d42dd55fcc185c27920e88aab21c077be5738)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: fd5d42dd55fcc185c27920e88aab21c077be5738

Requested commit: fd5d42dd55fcc185c27920e88aab21c077be5738

Commit: fd5d42dd55fcc185c27920e88aab21c077be5738

Tree: 13e29171c9d791740ca81854c584dc68bca8d0e8

Author: MartinYe1234

Committer: GitHub

## Message

```
Add terminal thread init command (#59374)

## Summary

- Adds an `agent.terminal_init_command` setting for Terminal Threads.
- Runs the configured command automatically when creating a new Terminal
Thread, while skipping restored terminal threads.
- Documents the setting and exposes it in the AI settings page.

Closes https://github.com/zed-industries/zed/issues/58697

Closes AI-337

Release Notes:

- Added a setting to automatically run a command when opening a new
terminal thread in the agent panel.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
```

## Parents

- [3e8aae49b56cad6b810cc22a288f14b86971ae8c](https://git.cafe/gitcafe/zed/commit/3e8aae49b56cad6b810cc22a288f14b86971ae8c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/fd5d42dd55fcc185c27920e88aab21c077be5738?format=markdown)
