• Tech Dev NotesTech Dev Notes
Apps
  • App lookup
  • App compare
Market movement
  • App charts
  • App rankings
Visual proof
  • App screens
  • App listing screenshots
  • App icons
Build intelligence
  • App tech stacks
  • Tool releases
  • Developers
More
  • X feature flags
  • Grokipedia
  • Blog
  • Follow on X
Skip to content
All content/ filesChangelog

cursor-docs/latest/content · Jun 26, 20:20 UTC

pages/cli/shell-mode.txt

TXT·2.2 KB·38 lines

content/

  • pages

    • api.txt
    • approval-agents.txt
    • bugbot.txt
    • cloud-agent.txt
    • customize-cursor.txt
    • enterprise.txt
    • evals.txt
    • extension-api.txt
    • hooks.txt
    • mcp.txt
    • models-and-pricing.txt
    • plugins.txt
    • rules.txt
  • pages/account

    • regions.txt
    • update-access.txt
  • pages/account/enterprise

    • billing-groups.txt
    • cyber-safeguards.txt
    • service-accounts.txt
  • pages/account/organizations

    • organization-admin-api.txt
  • pages/account/pricing

    • request-based-legacy.txt
  • pages/account/teams

    • admin-api.txt
    • ai-code-tracking-api.txt
    • analytics-api.txt
    • analytics.txt
    • dashboard.txt
    • members.txt
    • pricing.txt
    • scim.txt
    • setup.txt
    • sso.txt
  • pages/agent

    • agent-review.txt
    • agents-window.txt
    • debug-mode.txt
    • design-mode.txt
    • overview.txt
    • plan-mode.txt
    • prompting.txt
    • security.txt
  • pages/agent/security

    • run-modes.txt
  • pages/agent/tools

    • browser.txt
    • canvas.txt
    • search.txt
    • terminal.txt
  • pages/cli

    • acp.txt
    • changelog.txt
    • github-actions.txt
    • headless.txt
    • installation.txt
    • mcp.txt
    • overview.txt
    • shell-mode.txt
    • using.txt
  • pages/cli/reference

    • authentication.txt
    • configuration.txt
    • output-format.txt
    • parameters.txt
    • permissions.txt
    • slash-commands.txt
    • terminal-setup.txt
  • pages/cloud-agent

    • automations.txt
    • best-practices.txt
    • capabilities.txt
    • choose-runtime.txt
    • my-machines.txt
    • private-workers.txt
    • security-network.txt
    • self-hosted-cloud-run.txt
    • self-hosted-k8s.txt
    • self-hosted-pool.txt
    • settings.txt
    • setup.txt
  • pages/cloud-agent/api

    • endpoints.txt
    • webhooks.txt
  • pages/configuration

    • worktrees.txt
  • pages/configuration/migrations

    • vscode.txt
  • pages/cursor-review

    • merge-queue.txt
    • overview.txt
    • pr-inbox.txt
    • pr-page.txt
  • pages/cursor-review/cli

    • authentication.txt
    • parameters.txt
    • stacking.txt
  • pages/customizing

    • aws-bedrock.txt
  • pages/enterprise

    • baa.txt
    • compliance-and-monitoring.txt
    • deployment-patterns.txt
    • endpoint-security.txt
    • identity-and-access-management.txt
    • llm-safety-and-controls.txt
    • model-and-integration-management.txt
    • network-configuration.txt
    • organization-groups.txt
    • organizations.txt
    • pooled-usage.txt
    • privacy-and-data-governance.txt
    • private-connectivity.txt
    • security-hardening.txt
  • pages/get-started

    • quickstart.txt
  • pages/integrations

    • azure-devops.txt
    • bitbucket.txt
    • cursor-blame.txt
    • github.txt
    • gitlab.txt
    • jetbrains.txt
    • jira.txt
    • linear.txt
    • microsoft-teams.txt
    • notion.txt
    • slack.txt
    • xcode.txt
  • pages/mcp

    • install-links.txt
  • pages/models

    • claude-4-5-haiku.txt
    • claude-4-5-sonnet.txt
    • claude-4-6-sonnet.txt
    • claude-4-sonnet-1m.txt
    • claude-4-sonnet.txt
    • claude-fable-5.txt
    • claude-opus-4-5.txt
    • claude-opus-4-6-fast.txt
    • claude-opus-4-6.txt
    • claude-opus-4-7-fast.txt
    • claude-opus-4-7.txt
    • claude-opus-4-8.txt
    • cursor-composer-1-5.txt
    • cursor-composer-1.txt
    • cursor-composer-2-5.txt
    • cursor-composer-2.txt
    • gemini-2-5-flash.txt
    • gemini-3-1-pro.txt
    • gemini-3-5-flash.txt
    • gemini-3-flash.txt
    • gemini-3-pro-image-preview.txt
    • gemini-3-pro.txt
    • glm-5-2.txt
    • gpt-5-1-codex-max.txt
    • gpt-5-1-codex-mini.txt
    • gpt-5-1-codex.txt
    • gpt-5-2-codex.txt
    • gpt-5-2.txt
    • gpt-5-3-codex.txt
    • gpt-5-4-mini.txt
    • gpt-5-4-nano.txt
    • gpt-5-4.txt
    • gpt-5-5.txt
    • gpt-5-codex.txt
    • gpt-5-fast.txt
    • gpt-5-mini.txt
    • gpt-5.txt
    • grok-4-20.txt
    • grok-4-3.txt
    • grok-build-0-1.txt
    • kimi-k2-5.txt
  • pages/reference

    • deeplinks.txt
    • ignore-file.txt
    • keyboard-shortcuts.txt
    • permissions.txt
    • plugins.txt
    • sandbox.txt
    • third-party-hooks.txt
  • pages/sdk

    • python.txt
route: /docs/cli/shell-mode
title: Shell Mode
description: Use Cursor CLI in Shell Mode for continuous interaction with Agent. Leverage context persistence and command history for complex development tasks.

Shell Mode
Shell Mode runs shell commands directly from the CLI without leaving your conversation. Use it for quick, non-interactive commands with safety checks and output displayed in the conversation.
Command execution
Commands run in your login shell () with the CLI's working directory and environment. Chain commands to run in other directories:
cd subdir && npm test
Output
Large outputs are truncated automatically and long-running processes timeout to maintain performance.
Limitations
Commands timeout after 30 seconds
Long-running processes, servers, and interactive prompts are not supported
Use short, non-interactive commands for best results
Permissions
Commands are checked against your permissions and team settings before execution. See Permissions for detailed configuration.
Admin policies may block certain commands, and commands with redirection cannot be allowlisted inline.
Usage guidelines
Shell Mode works well for status checks, quick builds, file operations, and environment inspection.
Avoid long-running servers, interactive applications, and commands requiring input.
Each command runs independently - use cd <dir> && ... to run commands in other directories.
Troubleshooting
If a command hangs, cancel with Ctrl+C and add non-interactive flags
When prompted for permissions, approve once or add to allowlist with Tab
For truncated output, use Ctrl+O to expand
To run in different directories, use cd <dir> && ... since changes don't persist
Shell Mode supports zsh and bash from your variable
FAQ
Does `cd` persist across runs?
No. Each command runs independently. Use cd <dir> && ... to run commands in different directories.
Can I change the timeout?
No. Commands are limited to 30 seconds and this is not configurable.
Where are permissions configured?
Permissions are managed by CLI and team configuration. Use the decision banner to add commands to allowlists.
How do I exit Shell Mode?
Press EscapeEsc when the input is empty, Backspace/Delete on empty input, or Ctrl+C to clear and exit.
Previouspages/cli/reference/terminal-setup.txtNextpages/cli/using.txt

© 2026 Tech Dev Notes

RSSAboutAPIPrivacyTermsSitemap@techdevnotes