../mcp/index.md from docs/features/code-mode/ resolves to the
nonexistent docs/features/mcp/index.md; the mcp docs actually live at
docs/tools/mcp/index.md.
PR #4062 exempted PartialStartError from the backoff gate so a
composite toolset's healthy subset keeps listing while degraded, but
this also cleared the gate on every retryable partial failure (e.g. a
RAG toolset inside a code_mode composite hitting 429s), so the failed
subset burst-retried on every turn just like #4060.
startLocked now calls setStartBackoff instead of resetStartBackoff for
a PartialStartError: it arms the gate when the aggregated cause is
retryable (errors.As walks the whole errors.Join tree, so any single
retryable inner cause is enough) and still resets it otherwise,
preserving today's fail-fast behaviour for non-retryable partial
failures. s.started stays latched either way, so the healthy subset
is unaffected.
Fixes#4067
Code Mode (docs/features/code-mode/index.md): a configured
force_handoff target still runs deterministically after a natural
stop regardless of Code Mode (pkg/runtime/loop.go:937-951) - it's
applied by the runtime outside the tool-call dispatch path Code Mode
replaces. Only the model *choosing* to call handoff/transfer_task as
a tool fails in Code Mode; qualify the 'cannot delegate at all' claim
accordingly.
Sessions (docs/features/sessions/index.md): automatic session-title
generation calls the title model directly
(pkg/app/app.go:502-505, pkg/sessiontitle/generator.go:134-165)
without going through the usage-tracking call sites
(pkg/runtime/harness.go, pkg/runtime/streaming.go), so it is not
folded into the session's cumulative cost/token totals. Clarify that
'every model call' means every tracked conversation/compaction call.
The page recommended keeping a destructive toolset on a separate,
non-Code-Mode agent 'reached via handoff or transfer_task'. Both tools
are handlerless (pkg/tools/builtin/handoff, .../transfertask) and, once
wrapped by Code Mode, are rejected at call time with 'tool "handoff"
is not available in code mode' (pkg/tools/codemode/exec.go,
pkg/teamloader/teamloader.go). A Code-Mode agent cannot delegate to
another agent at all, so the advice was unworkable. Replaced it with
the actual limitation: keep code_mode_tools off any agent that needs to
hand off or transfer to one holding a destructive toolset. The core,
already-correct claim that nested Code Mode calls bypass per-call
permission dispatch is unchanged.
Documents code_mode_tools: running an agent's tools as JavaScript
functions callable from a single run_tools_with_javascript tool
instead of one model round-trip per tool call, when it helps, its
script/security limits, and its coarser tool-approval granularity
(individual tool calls made from inside the script bypass the
runtime's normal per-call permission checks). Fixes an inaccurate
one-liner for code_mode_tools in the Agent Config reference (it did
not format tool responses; it swaps in the JS-orchestration tool) and
turns it into a cross-link. Wires the page into nav.yml under
Features.