# Cursor terminal documentation missing non-interactive agent shell configuration guidance

**URL:** <https://forum.cursor.com/t/cursor-terminal-documentation-missing-non-interactive-agent-shell-configuration-guidance/151935>\
**Category:** Feedback\
**Tags:** terminal, docs\
**Created:** [February 15, 2026, 1:40pm UTC](https://forum.cursor.com/t/cursor-terminal-documentation-missing-non-interactive-agent-shell-configuration-guidance/151935 "2026-02-15T13:40:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [March 13, 2026, 9:35am UTC](https://forum.cursor.com/t/cursor-terminal-documentation-missing-non-interactive-agent-shell-configuration-guidance/151935/6 "2026-03-13T09:35:01Z")

</div>

Hey there,

Thanks for the detailed feedback.

The agent terminal has two phases:

- **Initialization phase:** captures a shell state snapshot (and does source `~/.zshrc`).

- **Command execution phase:** runs **non-interactively** (so only `~/.zshenv` is loaded).

That’s why the current docs guidance for disabling heavy prompts via `$CURSOR_AGENT` in `~/.zshrc` works — the init phase reads it. But for tools like `fnm`, `nvm`, or `direnv` that need to be available during **command execution** , `~/.zshenv` is the right place:

```shell
# ~/.zshenv
if [[-n "$CURSOR_AGENT"]]; then
  eval "$(fnm env)"
fi

```

This ensures the tool is available regardless of whether the shell is interactive or not.

We’ve passed the documentation feedback to the team. You may also find this community guide helpful for additional context: **[Guide: Fix Cursor Agent Terminal Hangs Caused by .zshrc](https://forum.cursor.com/t/guide-fix-cursor-agent-terminal-hangs-caused-by-zshrc/107260)**[.](https://forum.cursor.com/t/guide-fix-cursor-agent-terminal-hangs-caused-by-zshrc/107260)

Best,  
Mohit

---

_[View the full topic](https://forum.cursor.com/t/cursor-terminal-documentation-missing-non-interactive-agent-shell-configuration-guidance/151935)._
