The word agent needs precision

In Claude Code, agent describes a class of ways to organize work, not one fixed mode. Before delegating, clarify where context lives, how the result returns, and whether file or Git isolation is needed.

Precise terminology prevents mismatched expectations: a short read-only research subagent is not an interactive session or a parallel team with its own branch.

TermWhen it fitsWhat to check
SubagentNarrow specialist work in limited contextResult and permitted tools
Separate sessionIndependent history and manual handoffHow findings and evidence return
Background agentAsynchronous scan or reportFinal status and failures
Worktree-backed sessionParallel changes with branch and file isolationDiff, branch, and merge path
Agent teamGenuinely coordinated parallel workRoles and result coordination

Choose the form of work

  1. State one result: research, test, implementation, or review.
  2. Decide whether continuous interaction is needed.
  3. Decide whether the agent may change files.
  4. Check whether a branch or worktree is required.
  5. Define report format and stop condition before starting.

Agent role artifact

Conceptual agents/reviewer.md
# Reviewer

Purpose: inspect a prepared diff for risks and gaps.
Input: diff, related files, and test results.
Allowed: read and approved checks.
Forbidden: edit code or expand scope.
Result: findings with file:line, evidence, and confidence.
Stop: return the report after the defined area is checked.

Mental model before launch

  • A subagent returns a result, not all intermediate search.
  • A separate session does not transfer its history automatically.
  • Background means asynchronous, not permanently interactive.
  • A worktree isolates files but does not decide whether to merge.
  • An agent team adds coordination cost and must be justified.

Canonical lesson source · JavaRush

Open JavaRush material