Skip to content

agent: Publish context-window, compaction and subagent figures in telemetry - #255

Merged
lbacik merged 4 commits into
mainfrom
agent/issue-245
Oct 14, 2026
Merged

lbacik merged 4 commits into
mainfrom
agent/issue-245

Conversation

@lbacik

@lbacik lbacik commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Closes #245

Summary

Claude SDK completed the implementation workflow.

Evidence

  • Check: exit code 0
  • Reviews performed: 1
  • Review repair cycles: 0/2

Generated by simple-coding-agent

Attempt-Id: 2026-10-14T14:44:28.136967Z
…ast-good window)

- Track the peak main-thread context basis in the ledger at peak-set
  time (usage merges pass measured explicitly for late usage on older
  responses); the snapshot peak carries its own basis with fallback to
  the current main basis for older views.
- Trim subagents from the tail (oldest finished) instead of the head,
  and keep a failed post-compaction context-usage re-read from
  discarding the session-start window.
- Single-source the subagent cap and int coercion through telemetry;
  leave fractional-context rounding in _build_subagents intentional.
- Tests: peak basis (reporter, fallback, ledger divergence),
  keep-last-good re-read, tail-trim keeping running entries; update the
  size-cap test to the corrected trim order.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@lbacik
lbacik enabled auto-merge October 14, 2026 15:13
@lbacik
lbacik merged commit f82521a into main Oct 14, 2026
4 checks passed
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.

Publish context-window, compaction and subagent figures in telemetry

2 participants