Skip to main content

Cursor agent CLI

A cross-shell alias agent is provided for cursor-agent:

command -v agent
agent --help

Cursor CLI is the primary interactive assistant harness. Its user-level hooks (session context, worklog) make up the hook-memory layer — documented in Agent memory.

Tmux agent prompt wrap

When running an AI coding agent (claude, cursor-agent, pi, or copilot) inside tmux, Alt-Enter is intercepted to prepend a compact verification discipline and leave the prompt editable.

Plain Enter is never touched. Press it when the wrapped prompt is ready to send. Alt-Enter is passed through untouched in non-agent panes or when the toggle is OFF.

The same prefix.txt is also injected automatically:

ConsumerInjection path
cursor-agent, claudecommand hook runs session_context.py at SessionStart
copilotagent-memory SDK onSessionStart runs session_context.py
piai-kb-recall.ts at first before_agent_start
custom subagentsrendered as the first body/developer-instructions block

Alt-Enter remains the manual way to prepend the prefix to a specific prompt as a direct user message.