Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a86ce85764
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dbdba21e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if report.truncated_description_chars | ||
| > SKILL_DESCRIPTION_TRUNCATION_WARNING_THRESHOLD_CHARS |
There was a problem hiding this comment.
Gate truncation warning on per-skill loss
The warning threshold checks total truncated chars (truncated_description_chars > 10) while the message reports an average. With many skills, tiny 1-char trims per skill still trigger a warning, creating noisy false alarms and overstating severity. Compare the threshold to average_truncated_description_chars() instead.
Useful? React with 👍 / 👎.
| THREAD_SKILLS_TRUNCATED_METRIC, | ||
| if truncated { 1 } else { 0 }, | ||
| if omitted_count > 0 { 1 } else { 0 }, |
There was a problem hiding this comment.
Count description-only trims in truncation metric
A truncation warning can now be emitted when only descriptions are shortened, but THREAD_SKILLS_TRUNCATED_METRIC is recorded as 0 unless skills are omitted. This makes telemetry contradict user-visible behavior and can hide real truncation events from existing monitoring built on the truncated metric.
Useful? React with 👍 / 👎.
| let next_cost = line_cost(budget, &line.render_with_description_chars(next_chars)) | ||
| .saturating_sub(line.minimum_cost(budget)); |
There was a problem hiding this comment.
Avoid per-character full re-rendering in allocation loop
render_lines_with_description_budget recomputes render_with_description_chars and minimum_cost for every character step of every skill. With long descriptions or many skills, this turns budgeting into a very expensive hot path during thread start and can noticeably increase latency.
Useful? React with 👍 / 👎.
Preserve skill name/path entries whenever possible and trim descriptions first, using round-robin character allocation so short descriptions do not waste budget.