Aller au contenu principal

Advanced Features

Advanced capabilities of Claude Code: Opus 4.7, Agent Teams, Plugins, LSP and more

Opus 4.7: New Capabilities

Claude Opus 4.7 (claude-opus-4-6) brings major improvements for Claude Code.

Adaptive Thinking

Replaces the "extended thinking" toggle with 4 effort levels:

LevelUsageRelative cost
lowSimple tasks, rephrasings$
mediumStandard code, moderate analyses$$
highComplex problems, deep audits$$$
maxCritical tasks, architecture, advanced debugging$$$$

The model automatically adjusts its effort based on the detected complexity. It is also possible to force a level via the API:

const response = await anthropic.messages.create({
model: 'claude-opus-4-6',
max_tokens: 16384,
thinking: {
type: 'enabled',
budget_tokens: 10000, // budget for reasoning
effort: 'high', // low | medium | high
},
messages: [{ role: 'user', content: prompt }],
});

1M token context window (beta)

Opus 4.7 supports up to 1 million tokens as input (beta). Standard pricing applies up to 200k tokens, with premium pricing beyond that.

TierPricing
0 - 200k tokensStandard
200k - 1M tokensPremium (increased rate)

128k tokens of output

The output limit is raised to 128k tokens (compared to 8k-32k previously), allowing the generation of complete files, extensive documentation, or massive refactorings in a single response.

Context Compaction

Automatically summarizes old context to maintain coherence over long sessions. Particularly useful with parallel sessions (git worktrees) and complex multi-file tasks.

Agent Teams (Experimental)

Parallel coordination of agent teams on complex tasks. A lead agent orchestrates teammates who work in parallel with direct communication between them.

Activation required: Experimental feature disabled by default.

Activation

// .claude/settings.json or .claude/settings.local.json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}

Architecture

┌─────────────────────────────────────────────────────────────────┐
│ AGENT TEAM │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ │
│ │ TEAM LEAD │ <── You interact with the lead │
│ │ (coordinates)│ │
│ └──────┬───────┘ │
│ │ │
│ ├──── Shared Task List ────┐ │
│ │ │ │
│ ┌─────┴─────┐ ┌──────────┐ ┌──┴───────┐ │
│ │ Teammate 1 │ │ Teammate 2│ │ Teammate 3│ │
│ │ (security) │ │ (perf) │ │ (a11y) │ │
│ └────────────┘ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

Display modes

ModeDescriptionPrerequisites
auto (default)Split-panes if in tmux, otherwise in-process-
in-processAll agents in the main terminalNone
tmuxEach agent in its own panetmux installed
# Force a mode
claude --teammate-mode tmux

Comparison of parallel approaches

Sub-Agents (Task)Agent TeamsManual sessions (worktrees)
CommunicationReturn to parentDirect messagingNone
CoordinationParent managesShared tasksManual
Token costLowHighHigh
Ideal forFocused tasksComplex collaborationIndependent branches

Keyboard shortcuts

ShortcutAction
Shift+Up/DownNavigate between teammates
Shift+TabDelegate mode (lead = coordination)
Ctrl+TDisplay the task list

Environment variables

VariableDescription
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSEnables the feature (value: 1)
CLAUDE_CODE_TASK_LIST_IDShares a task list between sessions

Limitations

  • No resume of in-process teammates after /resume
  • Only one team per session
  • No nested teams
  • Split-panes not supported in VS Code / Windows Terminal / Ghostty

Usage in the foundation

The foundation provides an agent-teams skill and a /work:work-team command with pre-configured patterns:

# Parallel audit (3 agents: security, perf, a11y)
/work:work-team "full project audit"

# Team feature (frontend, backend, tests)
/work:work-team "implement notifications"

# Collaborative debug (concurrent hypotheses)
/work:work-team "investigate the login bug"

Output Styles

Customized interaction modes in .claude/output-styles/ (10 styles):

StyleUsageCommand
teachingPedagogical mode with explanations/output-style teaching
explanatoryDetailed reasoning, understand the why/output-style explanatory
conciseBrief and direct responses/output-style concise
technicalIn-depth technical details/output-style technical
reviewStructured code review/output-style review
emojiResponses enriched with emojis/output-style emoji
minimalClean responses without decoration/output-style minimal
structuredASCII structure with separators/output-style structured
debugDiagnostic and bug investigation/output-style debug
metricsMetrics and dashboards/output-style metrics

See the Output Styles page for the full documentation.

Specification Templates

Structured templates for the Explore → Specify → Plan → TDD → Audit → Commit workflow in .claude/templates/:

TemplateDescriptionUsed by
spec-template.mdFunctional specification with User Stories/work:work-specify
plan-template.mdTechnical implementation plan/work:work-plan
tasks-template.mdBreakdown into tasks per User Story/work:work-plan

Structure of a Specification

specs/[feature]/
├── spec.md # Functional specification
├── plan.md # Implementation plan
├── tasks.md # Breakdown into tasks
└── clarifications.md # History of clarifications (opt)

Conventions

MarkerMeaning
P1MVP priority (essential)
P2Important priority
P3Nice-to-have priority
[P]Parallelizable task
[US1]Belongs to User Story 1
EF-XXXFunctional Requirement
CS-XXXSuccess Criterion

MCP Configuration

Centralized configuration of MCP servers in .mcp.json:

Base servers

ServerUsage
filesystemAdvanced file access
memoryPersistent memory
fetchExternal HTTP requests
githubGitHub integration
postgresPostgreSQL connection
sqliteLocal SQLite database
puppeteerBrowser automation
sequential-thinkingStructured step-by-step reasoning
ServerUsage
slackBug search in threads, team communication
sentryError analysis and monitoring in production
bigqueryDirect analytics queries
linearProject and issue management
notionDocumentation and knowledge bases

To enable a server: "enabled": true in .mcp.json

CLAUDE.md @imports

CLAUDE.md files support importing files with the @path/to/file syntax:

# Import files into CLAUDE.md
See @README for project overview and @package.json for npm commands.

# Individual instructions (not committed)
@~/.claude/my-project-instructions.md

Import rules

  • Relative and absolute paths supported
  • Recursive imports (max 5 levels)
  • Not evaluated inside markdown code blocks
  • Alternative to CLAUDE.local.md for multiple worktrees
  • View loaded imports with /memory

Plugins

Plugin system to distribute skills, agents, hooks and MCP servers:

Structure of a plugin

my-plugin/
├── .claude-plugin/
│ └── plugin.json # Manifest (name, version, description)
├── commands/ # Legacy commands / skills
├── skills/ # Skills with SKILL.md
├── agents/ # Sub-agents
├── hooks/
│ └── hooks.json # Plugin hooks
├── .mcp.json # MCP servers
└── .lsp.json # LSP servers

Usage

# Test a plugin locally
claude --plugin-dir ./my-plugin

# Skills are namespaced
/my-plugin:skill-name

When to use plugins vs standalone

ApproachSkill namingUsage
Standalone (.claude/)/helloPersonal, single project
Plugin/plugin:helloTeam sharing, distribution, multi-project

LSP (Language Server Protocol)

LSP configuration in .lsp.json for semantic code navigation.

Activation

export ENABLE_LSP_TOOL=1

Supported languages (12)

LanguageServer
TypeScript/JavaScripttypescript-language-server
Pythonpylsp
Gogopls
Rustrust-analyzer
Javajdtls
C/C++clangd
C#omnisharp
PHPphpactor
Kotlinkotlin-language-server
Rubysolargraph
HTMLvscode-html-language-server
CSSvscode-css-language-server

LSP vs Grep

NeedToolWhy
Definition of a symbolLSP goToDefinitionSemantic resolution
All referencesLSP findReferencesReal usages, no false positives
Text/pattern searchGrepFaster for textual searches
Structure navigationLSP documentSymbolTree of classes/functions
Type errorsLSP getDiagnosticsReal-time diagnostics

See also