feat(subagent): show [1m] context-variant suffix on subagent model labels#102
Draft
tmck-code wants to merge 3 commits into
Draft
feat(subagent): show [1m] context-variant suffix on subagent model labels#102tmck-code wants to merge 3 commits into
tmck-code wants to merge 3 commits into
Conversation
…bels Subagent rows now render a `[1m]` suffix when the subagent runs the 1M-token context variant of its model (e.g. `opus[1m]` instead of `opus`), mirroring the main-session pill's `1M` display. The colour bucket lookup still uses the plain model key, so theming is unaffected. To keep columns aligned, every subagent row in a cohort now right-justifies its model label to a shared field width (max label width in the cohort, min 6), threaded through all build_* layout paths. This fixes the mixed-cohort left-edge misalignment a per-row rjust(6) would otherwise cause. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K6uTGQtDHSdjzb89x4HxBS
# Conflicts: # claude/yas/layout.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Subagents can run on the 1M-token context-window variant of their model (raw
model id carries a literal
[1m]substring, e.g.claude-opus-4-8[1m]), butthe subagent cohort rows had no way to show this — every row displayed just
the model bucket name (
opus,sonnet, …), so a 1m-variant subagent lookedidentical to a plain one. This PR adds a
[1m]suffix to the model label whenthe raw model id carries the marker, and threads a cohort-wide shared field
width through
subagent_rowso mixed cohorts (some[1m], some not) stillline up on a common left edge instead of drifting apart. Ships as v0.4.6.
Changes
New
[1m]variant markerclaude/yas/constants.py: addedMODEL_VARIANT_1M = '[1m]', the literalsubstring a subagent's raw model id carries when running the 1M-token
context variant.
claude/yas/renderer.py: addedsubagent_model_label(model), which appendsMODEL_VARIANT_1Mafter the model bucket name (model_key) when present —the colour bucket itself (
model_key/model_colour) is unchanged, only thedisplayed text widens.
Shared cohort-wide model field width
Renderer.subagent_rowgained amodel_field_w: int = 6parameter (defaultmatches the historical fixed
.rjust(6)), used to right-justify the modellabel in both the one-line and two-line row layouts.
claude/yas/layout.py: added_cohort_model_field_w(subs), which computesthe max visible width of every subagent's label in a cohort (floored at 6)
and threads it into every
subagent_row(...)call for that cohort — narrow,medium, wide, side-by-side, two-column subagent grid, and two-column
workflow-agent rows all now share one column edge per cohort instead of each
row justifying independently.
Tests
test/test_subagent_rows.py: new test asserting the[1m]suffix rendersin the two-line row layout.
test/test_layout_subagent_rows.py: new tests asserting the suffix surfacesthrough
build_wide, and that a mixed cohort (opus[1m]beside plainsonnet) shares one model-field left edge and width across rows.Checklist
Screenshots / recording
Benchmark
mainPRSystem info