Skip to content

docs: bring the reference in line with the 0.18 API - #151

Merged
yuanhao merged 2 commits into
mainfrom
docs/v0.18-api-updates
Aug 22, 2026
Merged

docs: bring the reference in line with the 0.18 API#151
yuanhao merged 2 commits into
mainfrom
docs/v0.18-api-updates

Conversation

@yuanhao

@yuanhao yuanhao commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Pre-release doc audit. Found two blocks that are wrong, not merely incomplete, and four features shipping with no user-facing docs at all.

Wrong, and worse than absent

A reader copying either of these gets a compile error with no hint why.

  • ExecutionLimits — documented in two places, both omitting max_consecutive_identical_tool_calls and both showing a struct literal that no longer compiles outside the crate now that it is #[non_exhaustive]. Now shows the field, the attribute, and the with_* builders.
  • CostConfig — omitted context_tiers and #[non_exhaustive], and showed a struct literal. Now documents new() plus the cache builders, with the reason the rates are not positional: no vendor publishes them in one order, and a transposed config still passes is_configured().

Shipped undocumented

  • Loop detection — the two-step escalation, AgentEvent::LoopDetected, why signatures compare Value rather than serialized text, that within-batch duplicates count, and that consecutive is a deliberate trade (an alternating loop is not detected, because a detector firing on interleaved repeats would be worse than none).
  • Retrievable tool output — the marker, the opt-in, block-qualified keys and why they hash the output, plus the two limits that actually bite: lossy compaction drops the marker while the entry survives, and stash entries are evictable where caller keys are not.
  • Context tiers — including the bedrock.rs caveat on deriving prompt size.
  • README's feature list gained loop detection and retrievable tool output; the cost bullet now mentions tiers and the SessionStats rollup.

Verification

Every claim checked against the source rather than from memory — the field default (Some(3)), the builder names (with_max_consecutive_identical_tool_calls, with_cache_read, with_context_tier), the constant (TOOL_OUTPUT_KEY_PREFIX), and the struct shape (pub context_tiers: Vec<ContextTier>). mdbook build is clean; SUMMARY.md is unchanged, so navigation is untouched.

Docs only — no code change.

🤖 Generated with Claude Code

yuanhao and others added 2 commits August 23, 2026 00:10
…as missing

Two of these blocks were not merely incomplete, they were wrong — worse
than absent, because a reader copying them gets a compile error with no
hint why.

  - ExecutionLimits (documented twice, in configuration.md and
    context-management.md) omitted max_consecutive_identical_tool_calls
    and did not mention that the struct is now #[non_exhaustive], so the
    literal shown cannot be built from outside the crate.
  - CostConfig omitted context_tiers and #[non_exhaustive], and showed a
    struct literal. It now documents new() plus the cache builders, with
    the reason the rates are not positional: no vendor publishes them in
    one order, and a transposed config still passes is_configured.

Newly documented, having shipped with no user-facing docs at all:

  - Loop detection — the escalation, the event, why signatures compare
    Value rather than text, and that "consecutive" is a deliberate trade
    rather than an oversight.
  - Retrievable tool output — the marker, the opt-in, block-qualified
    keys and why they hash the output, and the two limits that bite
    (lossy compaction drops the marker but not the entry; stash entries
    are evictable and caller keys are not).
  - Context tiers, including the bedrock caveat on deriving prompt size.

README's feature list gained loop detection and retrievable tool output,
and its cost bullet now mentions tiers and the SessionStats rollup.

Every claim checked against the source: the field default, the builder
names, the constant, the struct shape. mdbook builds clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Removed from README's license section and from src/agent_loop.rs's module
docs, which carried the same line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@yuanhao
yuanhao merged commit 250611c into main Aug 22, 2026
8 checks passed
@yuanhao
yuanhao deleted the docs/v0.18-api-updates branch August 22, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant