Skip to content
Boots Code Docs

SOP: Operating Claude Code in the Terminal as a Senior Engineer

To define how a senior engineer configures, operates, and monitors Claude Code in the terminal to maximize throughput across codebases, infrastructure, and external systems — using automation primitives, permission controls, and integration tooling correctly and safely.

Superpowers5min read

This SOP applies to senior engineers running Claude Code in terminal environments with access to CI/CD pipelines, MCP server integrations, and cloud-hosted scheduling infrastructure. It covers session setup, task execution, subagent management, integration configuration, security controls, and visibility tooling.


Role Responsibility
Senior Engineer (Operator) Selects permission modes, configures CLAUDE.md, initiates tasks, monitors agents, and escalates blocked actions
CI/CD Pipeline Owner Integrates non-interactive Claude Code runs into pipelines via the -p flag
Security Reviewer Reviews and approves CLAUDE.md rules, hook scripts, and permission mode selections before production use

  • Claude Code is installed and accessible from the terminal
  • CLAUDE.md exists at the repository root and is version-controlled
  • Required MCP servers are configured and authenticated (Postgres, Figma, Jira, Linear, Sentry, or others as needed)
  • The engineer understands the four permission modes: acceptEdits, plan, auto, and dontAsk
  • Cloud infrastructure access is confirmed if using /schedule or /ultrareview
  • Any custom hook scripts and plugins are reviewed and placed in bin/ before session start

  1. Open or create CLAUDE.md at the repository root.
  2. Define the system prompt, rules, constraints, and relevant context for this codebase.
  3. Commit CLAUDE.md to version control before starting any agent session.
  4. If working across multiple directories, note that /cd switches directories mid-session without rebuilding the cache — plan directory scope accordingly.

  1. Assess the trust level of the current task using the following criteria:

    Trust Level Mode to Use Behaviour
    Low / Review only plan Proposes actions without executing
    Medium / Standard work acceptEdits Applies changes automatically
    Automated / Scheduled auto Safety classifier gates each action
    Maximum autonomy dontAsk Executes without interruption
  2. Apply the selected mode before issuing any task instruction.

  1. Evaluate the complexity of the task.
  2. For hard reasoning or refactoring tasks, set effort with:
    /effort xhigh <task description>
  3. For routine or quick tasks, omit the effort flag or use fast mode to conserve plan limits.

  1. Connect required MCP servers for the task (e.g., Postgres, Jira, Sentry).
  2. If result payloads are large, configure the MCP server result size up to the 500K character limit per tool call.
  3. Place any custom commands, agents, or skill executables in bin/ so they auto-load to PATH via the plugin system.
  4. Define hooks for any permission, notification, or tool-use events that require custom script interception before execution proceeds.

  1. For interactive terminal tasks, type the instruction directly into the session.
  2. For non-interactive pipeline execution, run:
    Terminal window
    claude -p "<task instruction>" --output json
  3. For parallelizable workstreams, allow or instruct Claude to spawn subagents. Confirm that subagent depth does not exceed five levels.
  4. For polling conditions, use:
    /loop <condition and interval>
  5. For recurring cloud-hosted tasks, schedule with:
    /schedule <task> every <cadence>

  1. Check the status of all running agents at any time with:
    Terminal window
    claude agents
  2. Review which sessions are running, which are blocked, and which have completed.
  3. Resolve any blocked actions by reviewing the safety classifier output and either adjusting the permission mode or manually approving the action.

  1. Run automated correctness and bug detection on changed code with:
    /code-review
  2. For deeper analysis across a branch, run:
    /schedule Run /ultrareview on main branch every Monday at 09:00 UTC
    or trigger /ultrareview manually for immediate cloud-based bug-hunting.
  3. Audit plan consumption broken down by skill, subagent, plugin, and MCP server with:
    /usage

  1. For long sessions, disable terminal flicker by setting:
    Terminal window
    export CLAUDE_CODE_NO_FLICKER=1
  2. Use /cd to switch working directories mid-session rather than restarting the session.
  3. Run /powerup to review interactive lessons on any new features before using them in production.

  • CLAUDE.md is present, up to date, and committed to version control
  • Permission mode is explicitly selected and appropriate for the task’s trust level
  • Effort level is set correctly for the task complexity
  • Required MCP servers are connected and authenticated
  • Hook scripts are reviewed and tested before the session begins
  • Custom executables are placed in bin/ and auto-loaded
  • Non-interactive pipeline runs use the -p flag with structured output
  • Subagent depth is confirmed at five levels or fewer
  • claude agents has been checked and no sessions are unexpectedly blocked
  • /code-review or /ultrareview has been run on changed code before merging
  • /usage has been reviewed to ensure plan limits are not approaching exhaustion
  • CLAUDE_CODE_NO_FLICKER=1 is set for long or rendering-heavy sessions

Situation Action
Safety classifier blocks an action in auto mode Review the blocked action in claude agents, determine if the block is correct, and either adjust the hook script or manually approve after Security Reviewer sign-off
Subagent depth reaches five levels Stop spawning additional child subagents; restructure the task into sequential workstreams or elevate to the parent session
MCP server returns truncated results Increase the result size configuration up to the 500K character limit; if still insufficient, split the query
/schedule or /ultrareview fails to trigger Confirm cloud infrastructure access and authentication; escalate to the CI/CD Pipeline Owner if cloud connectivity is unavailable
CLAUDE.md rules conflict with a task requirement Do not override CLAUDE.md at runtime; update the file, commit the change, and restart the session — escalate to Security Reviewer if the rule change affects security constraints
Plan limits are near exhaustion (visible via /usage) Reduce subagent parallelism, switch to fast mode for low-complexity tasks, and notify the team before limits are hit