Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/skills/implement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Before the check and draft push for primary review, rebase your own commits onto
`[repo].base` (default `main`). For a stack, follow
[stacked delivery](../../../docs/DELEGATION.md#stacked-delivery).
Leave base merges out of a branch awaiting its delta.
After an approved primary or a delta, merge `origin/<base>` into the existing
branch when the base or its check scripts change.
For base or check-script changes after review, follow the
[Review budget](../../CONTRACT.md#review-budget).
Preserve the primary for the delta and the delta for
post-review fixes. Split the PR if resolving conflicts requires rewriting its reviewed history.

Expand Down
4 changes: 3 additions & 1 deletion scripts/ai-accounts/ai-accounts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,9 @@ def cmd_run(providers: str, argv: list[str], retry_exit: set[int] | None = None,
t = threading.Thread(target=pump, daemon=True)
t.start()
code = proc.wait()
t.join()
t.join(timeout=1)
if t.is_alive():
return code
text = b"".join(seen).decode("utf-8", "replace")
retryable = code != 0 and (retry_exit is None or code in retry_exit)
if (not retryable or attempt == 2 or not model or providers not in PROVIDERS
Expand Down
6 changes: 6 additions & 0 deletions tests/test_ai_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def test_codex_requires_requested_model_evidence(helper, monkeypatch):
assert helper.active('codex') == 'main'


def test_run_returns_after_leader_exits_with_inherited_stderr(helper):
argv = [helper.sys.executable, helper.__file__, 'run', 'claude', '--', helper.sys.executable,
'-c', 'import subprocess, sys; subprocess.Popen(["sleep", "6"]); sys.exit(7)']
assert helper.subprocess.run(argv, timeout=5).returncode == 7


@pytest.mark.parametrize('providers,explicit,retry_safe,runs,active', [
('claude,codex', False, False, 1, 'a'), ('claude', False, False, 1, 'b'),
('claude', False, True, 2, 'b'), ('claude', True, True, 1, 'a')])
Expand Down
Loading