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) in the foreground of a tmux pane, 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. Background or stopped agents do not activate wrapping.

prefix.txt is a compiler-verified excerpt of the SOP (compile_ai_policy.py verify rejects any sentence that is not verbatim SOP text). It is also injected automatically, but never at session start, where the full SOP is fresh:

ConsumerInjection path
claude, codex, cursor-agent, copilotper-prompt hook perturn_recall.py re-injects after 200k tokens of context growth (Claude transcript / Codex rollout usage) or a compaction
cursor-agent, copilot without usage datasame hook, prompt-interval fallback (AGENT_REINFORCE_PROMPTS, default 10)
pi, ompai-kb-recall.ts re-injects after 20 points of context fill growth or a compaction
custom subagentsrender the sibling leaf-boundary.txt (SOP ยง3.7 leaf-worker boundary) as the first body/developer-instructions block

Tuning: AGENT_REINFORCE=off disables re-injection; AGENT_REINFORCE_DELTA_TOKENS changes the growth threshold. State lives in <session-key>.reinforce.json next to the topic spec.

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