# Fix terminal stability bugs: remove autoFocus from effect deps, stabilize memo, remove dead export · flambo/t3code

[View on GitCafe](https://git.cafe/flambo/t3code/commit/e31fcbdf26b4eeb4a9288a7842bb3956af8465bb)

Repository: [flambo/t3code](https://git.cafe/flambo/t3code)

Visibility: public

Requested revision: e31fcbdf26b4eeb4a9288a7842bb3956af8465bb

Requested commit: e31fcbdf26b4eeb4a9288a7842bb3956af8465bb

Commit: e31fcbdf26b4eeb4a9288a7842bb3956af8465bb

Tree: d67c879a2ce203d563614febc43c940538459a37

Author: Cursor Agent

Committer: Cursor Agent

## Message

```
Fix terminal stability bugs: remove autoFocus from effect deps, stabilize memo, remove dead export

- Remove autoFocus from the main terminal setup effect dependency array to
  prevent full terminal teardown/recreation when switching tabs in split view.
  Focus is already handled by a dedicated effect.
- Change threadTerminalRuntimeEnv memo dependency from activeProject to
  activeProject?.cwd so unrelated project state changes (e.g. saving scripts)
  don't trigger terminal re-initialization.
- Unexport injectEnvIntoShellCommand which is never imported by production
  code (env injection is handled server-side), and remove its tests.

Applied via @cursor push command
```

## Parents

- [b033c60d41c7c9612e420ed80f807da4ff81ea7c](https://git.cafe/flambo/t3code/commit/b033c60d41c7c9612e420ed80f807da4ff81ea7c?format=markdown)

[Source at this commit](https://git.cafe/flambo/t3code/tree/e31fcbdf26b4eeb4a9288a7842bb3956af8465bb?format=markdown)
