-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: detect codex model capacity errors as blocked #2342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| id = "codex" | ||
| version = "2026.07.18.1" | ||
| version = "2026.08.05.1" | ||
| min_engine_version = 2 | ||
| updated_at = "2026-07-18T00:00:00Z" | ||
| updated_at = "2026-08-05T00:00:00Z" | ||
|
|
||
| [[rules]] | ||
| id = "osc_title_blocked" | ||
|
|
@@ -11,6 +11,14 @@ region = "osc_title" | |
| visible_blocker = true | ||
| contains = ["Action Required"] | ||
|
|
||
| [[rules]] | ||
| id = "model_capacity_blocked" | ||
| state = "blocked" | ||
| priority = 490 | ||
| region = "bottom_non_empty_lines(4)" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a single-line capacity error is followed by exactly three newer non-empty lines, Knowledge Base Used: Agent detection, Ghostty integration, and configuration There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- manifest ---'
cat -n src/detect/manifests/codex.toml
printf '%s\n' '--- relevant tests ---'
sed -n '700,780p' src/detect/manifest/tests.rs
printf '%s\n' '--- related rules and helpers ---'
rg -n -C 3 'bottom_non_empty_lines|capacity|codex' src/detect
printf '%s\n' '--- repository changes ---'
git diff --stat
git status --short
printf '%s\n' '--- validation recipes ---'
if command -v just >/dev/null 2>&1; then just --list 2>/dev/null | sed -n '1,120p'; else echo 'just unavailable'; fiRepository: herdrdev/herdr Length of output: 50370 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- capacity tests ---'
sed -n '760,790p' src/detect/manifest/tests.rs
printf '%s\n' '--- region implementation ---'
sed -n '1240,1345p' src/detect/manifest.rs
printf '%s\n' '--- region tests ---'
sed -n '520,550p' src/detect/manifest/tests.rs
printf '%s\n' '--- project requirement references ---'
rg -n -i -C 3 'bottom three|three-line|three lines|capacity error|model capacity|at capacity|codex' \
README.md .github src tests 2>/dev/null | sed -n '1,240p'
printf '%s\n' '--- just recipe definition ---'
if [ -f justfile ]; then rg -n -C 3 '^check|check:' justfile; else echo 'justfile not found'; fiRepository: herdrdev/herdr Length of output: 22276 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import re
screen = (
"⚠ Selected model is at capacity. Please\n"
" try a different model.\n\n"
"› Summarize recent commits\n\n"
"gpt-5.6-sol high · /work · Ready\n"
)
pattern = re.compile(
r"(?m)^⚠ Selected\s+model\s+is\s+at\s+capacity\.\s+Please\s+"
r"a\s+different\s+model\.$"
)
def bottom_non_empty_lines(content, count):
lines = content.splitlines()
selected = [i for i, line in reversed(list(enumerate(lines)))
if line.strip()][:count]
return "" if not selected else "\n".join(lines[min(selected)]) + "\n" if False else \
"\n".join(lines[min(selected):]) + "\n"
for count in (3, 4):
region = bottom_non_empty_lines(screen, count)
print(f"count={count}")
print("region_lines=", repr(region.splitlines()))
print("capacity_match=", bool(pattern.search(region)))
PY
printf '%s\n' '--- exact manifest diff ---'
git diff -- src/detect/manifests/codex.toml src/detect/manifest/tests.rsRepository: herdrdev/herdr Length of output: 517 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import re
screen = (
"⚠ Selected model is at capacity. Please\n"
" try a different model.\n\n"
"› Summarize recent commits\n\n"
"gpt-5.6-sol high · /work · Ready\n"
)
pattern = re.compile(
r"(?m)^⚠ Selected\s+model\s+is\s+at\s+capacity\.\s+"
r"Please\s+try\s+a\s+different\s+model\.$"
)
def bottom_non_empty_lines(content, count):
lines = content.splitlines()
indices = [i for i, line in reversed(list(enumerate(lines)))
if line.strip()][:count]
return "" if not indices else "\n".join(lines[min(indices):]) + "\n"
for count in (3, 4):
region = bottom_non_empty_lines(screen, count)
print(f"count={count}")
print("region_lines=", repr(region.splitlines()))
print("capacity_match=", bool(pattern.search(region)))
stale = (
"⚠ Selected model is at capacity. Please try a different model.\n\n"
"• Explored\n"
"└ Read Cargo.toml\n\n"
"› Summarize recent commits\n\n"
"gpt-5.6-sol high · /work · Ready\n"
)
for count in (3, 4):
region = bottom_non_empty_lines(stale, count)
print(f"stale_count={count}", "capacity_match=", bool(pattern.search(region)))
PYRepository: herdrdev/herdr Length of output: 560 Match the required three-line bottom window.
Source: Coding guidelines |
||
| visible_blocker = true | ||
| regex = ['(?m)^⚠ Selected\s+model\s+is\s+at\s+capacity\.\s+Please\s+try\s+a\s+different\s+model\.$'] | ||
|
|
||
| [[rules]] | ||
| id = "osc_title_working" | ||
| state = "working" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.