Skip to content

feat(slack): a code channel's Stop also stops its helper agents - #38243

Merged
kyleseaman merged 2 commits into
mainfrom
feat/code-channel-stop-brake
Nov 17, 2026
Merged

kyleseaman merged 2 commits into
mainfrom
feat/code-channel-stop-brake

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Pressing Stop (or typing !stop) in a Slack code channel stops everything that channel has running: its own session's turn, every helper agent's turn, and their sub-agents.

Today Stop in a code channel stops only the channel's own session (_stop_bound in slack/code_channels/routing.py). Helper agents the session started keep editing code. When the session is idle, !stop only says how many helpers are still running and points at the work board, so the person has to open each helper's chat and press Stop generation there.

Why it matters

Stop is the person's brake. A Stop that leaves agents editing code is not a brake. The decision is recorded in the merged RFC amendment (#35935): docs/request-for-change/rfc-slack-code-channels.md §3 "Stop".

Not a goal

  • Holding what was stopped. Nothing is held afterwards: a message queued for a stopped helper, its own AutoNudge or patrol, or a send from the channel's session can start it again. Keeping stopped sessions stopped until a person writes is the follow-up hold PR, built on this one.
  • Undoing anything an agent already wrote: files, commits, pushes, messages and work-ledger entries stay as they are.
  • Changing who may press Stop (still the owner only, with the origin and workspace checks).
  • Shared-user Stop handling: code channels have no shared access on main yet.
  • Stopping sessions the crew-log tree names but the code-channel store does not (adopted sessions), or another channel's helpers.
  • Naming or linking the stopped helpers in the reply: the RFC asks for how many it stopped.
  • A faster brake that stops turns before their sub-agents are swept, and the races of cancelling sub-agents by parent session rather than by turn: both need turn-scoped cancellation in the sub-agent manager, a separate change.

What changed (motivation → approach → change)

Goal → approach: Stop must reach exactly what the gateway itself recorded as the channel's helpers. So the helper set comes from store().workers_of(<channel session>) (written at each helper's birth, write-protected from agents), never from the crew-log tree, whose parent edge follows adoption. Each running helper is stopped the way a person's press stops a turn (stop_slot_turn(escalate=True)), so a pending tool approval is rejected and a second press escalates to a hard stop, as the channel's own Stop already does.

What was built:

  • New slack/code_channels/stop_helpers.py. stop_helpers() stops the channel's session (passed in as own) and each running helper of it together (asyncio.gather, as Pause all does), so no helper waits out another's soft-stop budget. Sub-agents of the session and of each helper are cancelled first (subagents.cancel_for_parent, the dashboard's "Stop all"), because a parent's hard Stop stops the ones sharing its process itself and those would go uncounted, and once more at the end for any the stopping turns started. The cost of that order: the turns are stopped only once the first sub-agent sweep has returned (the same cancel_for_parent the dashboard's Stop all awaits). It reads the helper records twice, before and after the stops, so a helper born or started during the Stop is stopped too. A helper whose turn ended meanwhile answers "not running" and is not counted (Pause all's _NOT_STOPPED rule). reply_text() builds the reply.
  • routing._stop_bound stays thin. The stop fence (surface.mark_stopped) is still the first thing, before any await, followed by the status hold release. Everything after that (the channel's own stop in _stop_channel_session, the helper stops, the status settle, one SEL row per stop call, and the reply) is stop_helpers.stop_channel, so routing.py goes from 1,985 lines on main to 1,935 (the cap is 2,000). The reply says how many it stopped: "Stopped N: this channel's session, K helper agents and M sub-agents." It names no helper. A helper whose compaction declined the stop is said so, on !stop and on Slack's Stop alike. A helper stop that is refused or raises is not counted, is audited as result=error, and the reply says how many could not be stopped (never "Nothing running." while one still runs). The same goes for the channel's own stop raising and for a sub-agent sweep that fails: cancel_for_parent deliberately skips its running sweep when its queued pass raises, so the reply says those sub-agents could not be stopped. With nothing stopped and nothing to report, !stop says "Nothing running." and the native Stop posts nothing, as today. A running session the board shows that the store does not record as a helper (a chat filed in the channel's folder, an adopted crew-log child) is not stopped; the reply counts it as still running, and that count is read right before the send and is 0 when the board's scope refuses the channel. The reply does not say that nothing starts again, because nothing is held yet.
  • Removed _idle_stop_text and its idle !stop reply ("This channel's session isn't running, but N helper agents still are", naming and linking them): with the helpers stopped by the same press, that case no longer happens at reply time.
  • Docs: the Stop paragraph of src/kiro_crew/docs/slack-integration.md and "What a Stop covers" in docs/system-specs/modules/slack-gateway.md. Both say plainly that a queued wake or a patrol can start a stopped helper again until the hold PR lands. "When a board write goes out" is unchanged from main: the Stop reply carries no helper content. The RFC is not edited.

No dashboard file changes: the brake needs nothing from the send, continue, regenerate, rewind, queue drain, dispatch gate, session create, session messaging, AutoNudge, Slack inbound or restart resume paths.

What this PR removes from #38181, and why

#38181 (merged, c8c236a555) put an interim idle !stop reply on main: while the channel's session is idle but helper agents run, it names up to five of them, linked to their chats. The RFC says it exists only "until the amended Stop ("Stop", below) is built" (rfc-slack-code-channels.md, Idle !stop), and this PR builds that Stop, so the same press now stops those helpers and the interim reply can no longer happen. Removed with it:

  • routing._idle_stop_text and the idle block of _stop_bound that posted it (with the link_builder hop it needed and the now unused Callable import);
  • board/render.py: STOP_NAMED and idle_stop_text;
  • workspace/board_cache.py: running_helpers (the (key, title) list), replaced by watched_sessions, the Stop reply's count of board sessions it does not reach;
  • their tests: test_bang_stop_with_helper_agents_running_says_where_to_stop_one, test_an_idle_stop_names_helpers_only_if_the_board_still_admits_them_at_the_send and a running_helpers= fake line (test_slack_code_channels_routing.py), the four test_the_idle_stop_reply_* tests (test_slack_code_channel_board.py), and test_running_helpers_names_the_watched_sessions_running_but_the_channels_own, which becomes test_watched_sessions_are_the_watchs_sessions_but_the_channels_own;
  • the two docs paragraphs: the guide's "Stop ... stops the channel's own agent only ... A !stop while only helper agents run links each one", and the spec's idle-!stop paragraph and its entry under "When a board write goes out".

Everything else #38181 added stays: _worker_projects, the per-row PR and CI, the Code tab, the wrap-up outcomes and their docs. The RFC is not edited; its Idle !stop bullet describes the interim state that this PR ends.

Review round (KiroCrewCaptain, 07:12Z, three optional notes)

Head: 392d34e1a38fd68b62c8cda14cce79969acda52f (the reviewed commit rebased onto main, plus a second commit, so the delta is reviewable on its own). The stop order and both sub-agent sweeps are byte-for-byte those of e23f78827c, only moved; the one Stop change is the channel-session fix below.

  1. The first sweep delays the brake (stop_helpers.py:179). Not taken. Sub-agents are cancelled by parent session, not by turn, so stopping the turns before or beside the sweep lets a Stop cancel sub-agents of the person's next turn. A faster brake needs turn-scoped cancellation in the sub-agent manager, which is a separate change.
  2. routing.py near the line cap. Done: everything after the stop fence (the stops, the status settle, the SEL rows and the reply) moved to stop_helpers.stop_channel, with _stop_channel_session beside it; routing._stop_bound keeps the fence, the status hold release and a thin call. routing.py is 1,935 lines on main after feat(slack): per-row PR and CI, the combined Code tab and wrap-up outcomes on the work board #38181 (the first commit alone puts it at 2,006, over the cap). The Stop tests of e23f78827c pass unchanged apart from the naming ones; test_slack_code_channel_commit_point.py's module list is unchanged, since routing.py was not in it and no covered write moved.
  3. Naming and linking helpers. Done: board_titles, NAMED, the titles/link_for parameters of reply_text and the link_builder hop are gone, with their three tests. test_the_reply_counts_the_stopped_helpers_and_names_none (fails on e23f78827c) pins a count-only reply even when the board has a title for the helper. With the link builder's await gone, the board-scope count of sessions left running is read once, with no await before the send.

Also in this round, from CI's GPT 6.1 Review on 2a0f0e3619 (upheld): whether the channel's own session runs is now read at the press, before any await, and carried to its stop (one boolean, the channel's session only; helpers unchanged). So a message sent after an idle channel's Stop is not stopped, and neither is a helper report or wake that starts the channel's session during the sweep, as on main; holding it belongs to the follow-up hold PR. test_a_turn_the_channel_starts_during_the_first_sweep_is_not_stopped fails without it; test_a_channel_session_running_at_the_press_is_stopped_after_the_first_sweep is its mirror.

  • Known limit. If the channel's session is running when Stop is pressed, that turn ends by itself during the Stop, and the person's next message starts a new turn, Stop stops the new turn; the person sends it again. Closing this needs a per-admission turn identity, which the session does not expose today, and belongs to the turn-scoped cancel follow-up.

Backwards compatibility

Compatible: Stop still stops the channel's own session exactly as before (stop_slot_turn(escalate=True), the compaction notice, the active status, the same audit rows); it now also stops the running turns that session started. No config key, route, stored field or schema changes.

Reader: src/kiro_crew/slack/code_channels/board/render.py:idle_stop_text -- chat -- its one reader on main was routing._idle_stop_text (removed with it); the Stop reply is now stop_helpers.reply_text -- test_bang_stop_in_a_code_channel_stops_the_bound_session
Reader: src/kiro_crew/slack/code_channels/routing.py:_idle_stop_text -- chat -- its one caller was _stop_bound, which now answers through stop_helpers.stop_channel and reply_text -- test_bang_stop_in_a_code_channel_stops_the_bound_session
Reader: src/kiro_crew/slack/code_channels/workspace/board_cache.py:running_helpers -- chat -- its one production caller was _idle_stop_text; watched_sessions replaces it, read by stop_helpers.left_running -- test_watched_sessions_are_the_watchs_sessions_but_the_channels_own

Tests

test/test_slack_code_channel_stop_helpers.py (new, 31 tests), through routing.inbound_gate (!stop) and routing.handle_session_stopped (Slack's Stop):

  • an idle channel's Stop stops each running helper, says "Stopped 2", and writes one audit row each;
  • a running session and its helper both stop;
  • only the store's own helpers are stopped (not a crew-log-only child, not another channel's helper);
  • races: a helper that finished while being stopped is not counted; a helper born during the Stop is stopped too; a helper idle at the first read that starts a turn during the Stop is stopped too; a second press escalates the helpers too; the stop fence is set before anything is awaited; the session and its helpers are stopped together, not one after another;
  • a helper waiting on a tool approval is stopped like any running turn;
  • with the feature off, a running channel's Stop still stops its helpers;
  • the native Stop with nothing running still posts nothing;
  • sub-agents of the session and of each helper are stopped and counted, including those a helper's hard Stop would stop itself;
  • a helper whose compaction declines the stop is said so on either Stop;
  • a helper stop that is refused or fails is not counted and is said so, and a lone such helper is never answered "Nothing running.";
  • a channel session stop that raises still stops, audits and reports the helpers, and the reply says the session could not be stopped;
  • a failed sub-agent sweep (cancel_for_parent raised, e.g. a busy task store) is said so on either Stop, never "Nothing running.", and stays said when a later sweep works (the failed one may have stopped some first);
  • a stop call or sweep cancelled midway (CancelledError from inside) is said and audited as result=error, the rest still stop and the reply goes out; a refused channel-session stop is said, not counted;
  • a turn stopped before it dispatched ("no active turn") is counted;
  • a session filed in the channel's folder that runs on the board but is not one of its helper agents is not stopped, and the reply says it is still running (none when the board's scope refuses the channel);
  • a turn the channel's session starts during the Stop keeps its status (no settle back to active);
  • the reply counts the stopped helpers and names none, even one the board shows with a title, and never says that nothing starts again.

test/test_slack_code_channels_routing.py and test/test_slack_code_channel_board.py: #38181's idle-reply tests are removed with that reply (listed above), and a fake's unused running_helpers is dropped. test/test_slack_code_channel_board_review_rounds.py: the running_helpers test becomes the watched_sessions one.

Fail-first: against origin/main's src, every new test but the native-Stop-says-nothing guard fails; the tests added after publication (cancelled calls and sweeps, the partial sweep, the refused session stop, the folder session, the status race, the restarted helper) also fail against the published head 074e4321d2; the count-only reply test of this round fails against e23f78827c.

Not covered here: a shared user's Stop being refused (needs shared code-channel access, not on main). How a stopped approval's Slack card settles is already pinned in test_slack_code_channel_worker_approvals.py (ended).

Manual verification

N/A — the Stop's paths are covered through the real routing entry points; no live Slack workspace was used.

Related Issues

RFC: docs/request-for-change/rfc-slack-code-channels.md §3 "Stop" (#35935). Follow-up: the hold PR (keeps stopped sessions stopped until a person writes).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners November 17, 2026 03:46
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 392d34e1a38fd68b62c8cda14cce79969acda52f touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 392d34e1a38fd68b62c8cda14cce79969acda52f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level concerns. The removed idle !stop reply and its tests were interim by the RFC's own wording, and the removed symbols have no readers outside this patch.

Notes

  • The RFC says nothing stops a helper from being restarted after Stop: a queued wake, an AutoNudge or a patrol can start it again. The docs say this plainly, but until the hold PR lands, a person who presses Stop may watch a helper resume editing code. Land the hold PR soon after this one.

[DESIGN-REVIEWED] 392d34e

Description read

[DESCRIPTION-READ] e6582ec0a2060b0b798e66ec3023a25ccefd828428fec520ba8c11df3c640568

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 392d34e1a38fd68b62c8cda14cce79969acda52f — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The base RFC (partial) covers the Stop shape in §3 "Stop", and the idle-reply removal is the end the RFC set for it. Two small second spellings are left as notes.

Notes

  • Item 8 — duplicate of src/kiro_crew/dashboard/handlers/crew_pause.py:65: +NOT_STOPPED = frozenset({"not running", "compacting"}) copies _NOT_STOPPED there word for word, and the docstring calls it "Pause all's rule". Grepping _NOT_STOPPED|NOT_STOPPED finds 2 definitions. Subtraction: import the crew_pause constant instead of defining a second copy.
  • Item 9 — one consumer, generalized: stop_helpers(..., own: ... | None = None) has 1 caller (stop_channel), and that caller always passes own. Subtraction: make own required and delete the if first and own is not None branch.

What this change ships

Inventory (9 items) — 7 justified

Intent: pressing Stop or !stop in a Slack code channel halts everything that channel has running, its helper agents included. This is an ADDITION (it builds the RFC's amended Stop).

  1. Stop now also stops the running turn of every helper agent the store records for the channel — justified
  2. Stop also cancels the sub-agents of the session and of each helper — justified
  3. The reply now says "Stopped N: this channel's session, K helper agents and M sub-agents." — justified
  4. The idle !stop reply that named and linked up to five helpers is gone — justified
  5. Native Stop now posts a count when it stopped something — justified
  6. The reply says which stops failed, which helpers were compacting, and which sub-agent sweeps failed — justified
  7. The reply counts board sessions still running that Stop does not reach — justified
  8. A second "not stopped" answer set in stop_helpers.py — duplicate of crew_pause._NOT_STOPPED
  9. An optional own stop callback in stop_helpers() — one consumer, generalized

[FIRST-PRINCIPLES-REVIEWED] 392d34e

Description read

[DESCRIPTION-READ] 9e2d8defe7359fac3b4788fd7455ca5b85c8681b7fc418c3b156052beb7ff580

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 392d34e1a38fd68b62c8cda14cce79969acda52f — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 392d34e

Verdict parsed from the review's SHA-scoped output markers for commit 392d34e1a38fd68b62c8cda14cce79969acda52f.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 392d34e1a38fd68b62c8cda14cce79969acda52f false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 392d34e1a38fd68b62c8cda14cce79969acda52f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 392d34e

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 392d34e1a38fd68b62c8cda14cce79969acda52f false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/code-channel-stop-brake branch from 074e432 to e23f788 Compare November 17, 2026 05:39
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 15% chance that this change introduces a defect, above the 12% limit for approving on its own.

The PR does what it says: Stop or !stop in a code channel now also stops the running turns of the helpers the store records (store().workers_of, written at each helper's birth) and cancels their sub-agents with the same cancel_for_parent call as the dashboard's Stop all. Each helper is stopped with stop_slot_turn(escalate=True), so a second press escalates; helpers already soft-stopping or compacting are not pressed twice by one Stop. Failures and mid-call cancellation are audited and not counted. The channel's own stop, audit, status settle and compaction notice behave as on main; the change is that Stop now posts a count, as the RFC asks. The owner, origin and workspace checks are unchanged and the stop fence is still set before any await. The removed interim idle reply has no remaining callers. CI is green and all AI review lanes passed. The RFC's hold (keeping stopped sessions stopped) is openly deferred to a follow-up PR and documented, which is a normal staged delivery, not a defect in this change.

Tier: 2, held for a person: the title's category is not one of fix, test, chore, refactor.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 392d34e1a3 · 1387 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here.

To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). The PR cites the RFC amendment merged in #35935 as its design input. A maintainer confirms whether that amendment covers this shape.

Review result on this head: no blocking findings. The review checked these points:

  • The helper set comes only from the gateway's own workers_of record, never from the crew-log tree.
  • The stop fence is still set before any await.
  • Who may press Stop has not changed.
  • A refused, failed, cancelled or compaction-declined stop is not counted and is audited as an error.
  • An idle native Stop still posts nothing.

The 31 new tests pass, and 30 of them fail against the merge-base tree, as the body says. Well done: the race tests are written so that removing the concurrency or the ordering turns them red.

Optional:

  • stop_helpers.py:179: the first pass waits for every sub-agent cancel to return before it stops any turn, including the channel's own. That can delay the brake while a reap resets a session. Running the first sweep together with the turn stops, or pre-sweeping only on an escalating second press, would keep the brake fast.
  • routing.py is now 1,996 lines, 4 under the 2,000-line cap. feat(slack): let the owner share Slack access with named people, off by default #30760 and feat(slack): code-channel bar actions, canvas comments, view tabs #22370 each add about 18 lines there. Moving the reply and audit orchestration of _stop_bound into stop_helpers.py would leave room for them.
  • Naming and linking stopped helpers in the reply (board_titles, NAMED, the link_builder hop) goes beyond the Goal and the RFC's "how many it stopped". A maintainer may want to keep it or drop it when deciding the design.

@kyleseaman
kyleseaman enabled auto-merge (squash) November 17, 2026 13:39
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/code-channel-stop-brake branch from e23f788 to 2a0f0e3 Compare November 17, 2026 18:20
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 17, 2026
Kyle Seaman added 2 commits November 17, 2026 19:48
Slack's Stop and !stop in a code channel now stop the channel's own running
turn, the running turn of every helper agent the code-channel store ties to
that session, and the sub-agents those turns started, and say how many they
stopped, naming each stopped helper the work board shows. Nothing is held
afterwards: a queued wake or a patrol can start a stopped helper again until
the follow-up hold change lands. Implements the brake of RFC #35935.
…op out of routing

The Stop's orchestration after the stop fence (the stops, the status settle,
the SEL rows and the reply) moves from routing._stop_bound into
stop_helpers.stop_channel, with _stop_channel_session beside it. routing keeps
the fence, the status hold release and a thin call (routing.py 1,996 -> 1,925
lines). The stop order and both sub-agent sweeps are unchanged.

The reply says how many were stopped, as the RFC says, and no longer names or
links helpers: board_titles, NAMED, reply_text's titles/link_for and the
link_builder hop are removed, so the board-scope count is read once, with no
await before the send.

Whether the channel's own session runs is read at the press, before any await,
and carried to its stop, so a turn it starts during the first sub-agent sweep
(the person's next message) is not stopped by the earlier press.
@kyleseaman
kyleseaman force-pushed the feat/code-channel-stop-brake branch from 2a0f0e3 to 392d34e Compare November 17, 2026 19:49
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 17, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Thanks for the notes. Handled on 392d34e1a38fd68b62c8cda14cce79969acda52f: the reviewed commit, rebased onto main, plus a second commit.

  • stop_helpers.py:179 (sweep before the stops): not taken. Sub-agents are cancelled by parent session, not by turn, so stopping the turns before or beside the sweep lets a Stop cancel sub-agents of the person's next turn; a faster brake needs turn-scoped cancellation in the sub-agent manager, a separate change.
  • routing.py line cap: done. Everything after the stop fence moved to stop_helpers.stop_channel (with _stop_channel_session), unchanged in behaviour; routing.py is 1,935 lines on current main (2,006 without the move).
  • Naming and linking helpers: done. The reply now only counts; board_titles, NAMED and the link_builder hop are gone, pinned by test_the_reply_counts_the_stopped_helpers_and_names_none.
  • Also fixed, from CI's GPT review on 2a0f0e3619: whether the channel's session runs is read at the press, before any await, so a message sent after an idle channel's Stop is no longer stopped (test_a_turn_the_channel_starts_during_the_first_sweep_is_not_stopped).
  • Known limit, in the PR body: if the channel's session is running at the press, ends by itself during the Stop, and the next message starts a new turn, Stop stops the new turn. Closing it needs a per-admission turn identity, part of the turn-scoped cancel follow-up.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 17, 2026
@kyleseaman
kyleseaman merged commit e6e9fff into main Nov 17, 2026
104 of 110 checks passed
@kyleseaman
kyleseaman deleted the feat/code-channel-stop-brake branch November 17, 2026 21:45
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 17, 2026
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.

3 participants