Skip to content

feat(slack): start code-channel sessions in a configured approval mode - #21997

Merged
iamwhatever merged 2 commits into
feat/slack-code-channel-agent-selectfrom
feat/slack-code-channel-approval-mode
Nov 2, 2026
Merged

iamwhatever merged 2 commits into
feat/slack-code-channel-agent-selectfrom
feat/slack-code-channel-approval-mode

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #21991 (feat/slack-code-channel-agent-select @ 454f15d89d). Two commits: the feature, and the pre-push review fixes. Full backend CI runs when this retargets to main after the parents merge.

Guard fix (toggles-off check, row 7): the three code-channel approval test modules no longer read the dashboard turn's source (test_source_pin_budget allows them 0). They drive a real turn through test/turn_harness.py run_turn (helper test/slack_code_channel_turns.py): the card posts top-level with Trust this channel only in a code channel; a Trust-rewritten card is kept; a worker's card is relayed and settles with how its prompt ended; a prompt born rejected is never relayed. Each was mutation-checked against chat_turn/permission_prompt.py. The facade-import guards (test_nothing_but_the_facade_imports_an_owner, test_only_the_facade_imports_an_owner) now pass on this base.

Inherited reds (verified failing identically on #21991 @ 7ddbc57a75 without this PR; this PR touches none of their files):

  • test/test_dashboard_server_composition_contract_reach.py: the MCP route table and the dashboard / headless boot chain order (3 tests). This PR touches no server or route file. Still the only Python failures on 454f15d89d.
  • website/src/i18n/style/zhStyle.test.ts ("thread" as 话题; no more than two 的): the base's zh-CN slackCode.agent_sessions_desc, agent_sessions_irreversible and agent_sessions_permanent values. This PR's own zh-CN values pass it.
  • The earlier test_config_refactor_contract.py builder count (27 vs 28) passes on this base.

Problem / Motivation

Goal: A Slack code channel's session can start in a configured approval mode (Normal, Reads or Trust), and its approvals can be answered and its mode changed from the channel itself, so a channel driven from Slack does not stall on approval prompts nobody in the dashboard is there to answer. In scope:

  • the configured starting mode (Settings → Code channels), applied when the channel's session is created;
  • per-channel mode changes from Slack, owner-only and audited: the kickoff's Approval mode select, /kirocrew trust ask|reads|all, and Trust this channel on an approval card;
  • approval cards posted top-level in the channel, not threaded under the kickoff;
  • the worker approval relay: a prompt from a worker the channel's session started is posted to the channel and answerable there;
  • live-worker propagation: a channel mode change (raise or lower) reaches the workers that session is already running, and a raise to Trust answers their pending tool prompts.

This deliberately reverses the earlier "Trust excluded in group channels" decision for code channels: Kyle approved all three modes (Normal, Reads, Trust) for a code channel, with the owner-only gate and the in-channel Trust warning.

A code channel is a dashboard session that people drive from Slack. Today that session always starts in Normal: every tool call waits for an approval click in the dashboard. Nobody is usually watching the dashboard while the channel is in use, so the agent stops at its first shell command and the channel goes quiet. The owner asked for a code-channel default approval mode, next to the existing folder / agent / model / effort defaults, applied when the channel's session is created.

Why it matters

Without it, the first build or test command in a code channel waits on an approval prompt that only someone at the dashboard can answer. Slack Code is meant to let a team run coding work from Slack. The workaround today is for someone to open each channel's session in the dashboard and flip it to Trust by hand, every time a channel opens.

Not a goal

  • No hook-based override. Crew's script hooks cannot set a session's approval mode (see Hook point below), and this PR does not invent a hook system; a channel's mode is changed from Slack (the Goal's per-channel changes) or on its session in the dashboard.
  • No mode changes outside the channel's own lineage: sessions the channel's current session did not start directly are never relayed or changed.
  • No YOLO option. YOLO is process-wide, never a property of one session.
  • No re-apply after a gateway restart. Session trust is in memory for every session, and a code channel's session is no exception: after a restart it asks again until someone picks a mode on it.
  • No edit to the Slack Code RFC. It lives in feat(slack): Slack Code settings and agent sessions with native Stop #21425's branch; the addition is described below for its owner to fold in.

What changed (motivation → approach → change)

A new default, slack.code_channel_defaults.approval_mode, takes ask (the default, stored as unset), trust_reads or trust. It resolves like model and effort: set here, otherwise ask. Anything else reads as ask, the side that keeps asking.

Settings. The Code channels card gets an Approval mode picker. It uses the labels of the session's own approval picker (Normal / Reads / Trust), so the mode reads the same on the session where it can be changed later. A new code channel runs with gains an Approvals row. Picking Trust shows an inline warning: anyone allowed to talk to the bot in the channel drives an agent whose tools run without asking, and sessions it starts inherit that. PUT /api/slack/config accepts the three values, stores ask as unset and refuses anything else. A value already stored is not re-checked on a save that does not touch it. The copy is in all 12 locales, in the informal register.

Runtime. When create_bound_session has created and bound the channel's session, it puts the slot on the mode. This runs only after the binding is written, so a session that is retracted leaves no audit record behind. It goes through a new shared helper, dashboard/slot_approval_seed.seed_slot_approval. The helper writes what the dashboard picker's Reads / Trust writes: _trust / _trust_reads on every slot sharing the session, the session's approval policy, and a mode_change:<mode> SEL record. Here the record is attributed to slack:code_channel. Unlike a person's press (apply_approval_mode), it never touches the YOLO override, so creating a channel cannot end an operator's declared grant. It also never replaces trust the slot already holds. The crewmate thread seed (handlers/members._seed_member_approval) did the same thing inline, so it now calls the shared helper. ask changes nothing. Afterwards the session is an ordinary one: its own approval picker changes the mode.

Hook point. Crew's script hooks (AgentSpawn, UserPromptSubmit, PreToolUse, PostToolUse, Stop) fire once a turn is under way. They can add prompt context or decide one tool call, but they have no way to set a session's approval mode. The code-channel turn hooks (slack/code_channels/hooks.py) are internal. So there is no override point. The setup guide says so and tells the user how to keep one channel on Normal.

RFC addition (for #21425's rfc-slack-code-channels.md, §1 Resolution order): one row, approval mode | code_channel_defaults.approval_mode only; unset is ask. The API paragraph gains: an approval mode must be ask, trust_reads or trust, with ask stored as unset. The runtime applies it through seed_slot_approval once the session is bound, never touching the YOLO override.

Docs: docs/guides/slack-setup.md gets an Approval mode for code channels section covering the three modes, the Trust warning, the audit record, the restart behaviour and the lack of a hook. src/kiro_crew/docs/slack-integration.md, docs/feature-map/README.md and config-baseline.json (regenerated) are updated to match.

Part Files
Config config/sections_slack.py, config/section_builders.py, config/sections.py
Resolution slack/features.py
Runtime slack/code_channels/binding.py, dashboard/slot_approval_seed.py, dashboard/handlers/members_thread.py (+ the members.py facade's type-checker list)
Settings API dashboard/slack_code_settings.py, website/src/api/client/messaging.ts
Settings UI pages/settings/SlackCodePanel.tsx, website/src/i18n/locales/ (12 locales + regenerated en-XA.json)

Approval cards in the channel, Trust this channel, worker approvals

Added after a live test of the stacked build: in a code channel nobody watches the dashboard, so its approval prompts have to be answerable where the conversation is.

Cards post in the channel. A code channel's own session used to post its "Tool approval requested" card as a thread reply under the kickoff, so it had to be found. It now posts top-level, the same place the agent's replies go. That rule (code_channel_post_thread for the card's thread, post_linked_approval(thread_ts: str | None)) now lives in #21410, below this PR; this PR adds only the channel_trust card and the worker relay on top of it. Ordinary linked threads keep threading.

Trust this channel. The card keeps Approve (the one primary button) and Reject and adds a secondary Trust this channel. Only the owner can use it (anyone else gets an ephemeral refusal), under the gates every code-channel command applies: bound workspace, owner, channel and origin admit the bot, not archived. It puts the session on Trust through apply_approval_mode, the dashboard picker's own audited mutation, whose sweep approves the waiting call; posts one warning line in the channel (tools run without asking, for its workers too, running ones included); and writes a slack.code_channel.approval_mode SEL row. There is no approval store of its own. Request ids are only unique per session, so nothing is resolved by id state-wide: the race where the session was already on Trust is answered with resolve_slot_approval on the channel's slot, pinned to the future the card was posted for.

A spent card changes nothing. apply_approval_mode gains an optional still_live predicate, asked after its own override-deactivation await and before any trust flag or policy is written (no yield between); a prompt answered or expired in the meantime gets a 409 and no mode change. Existing callers omit it and are unchanged.

Worker approvals are relayed. A conductor's workers run with at most the channel's mode, so on Normal a worker's prompt showed only in the dashboard. A prompt from a session the channel's current session created (_created_by, resolved back to a live binding through surface.binding_for_slot) is now also posted top-level in the channel, headed Worker: <title> wants to run:. It shows the tool and its arguments through the usual outbound redaction, and nothing from the worker's transcript. A session that is not this channel's worker, a worker of a replaced channel session, a Slack-linked worker, an archived channel and the feature off are never relayed.

  • Approve / Reject (owner-only, lineage re-checked live) resolve the worker's own future with resolve_slot_approval, pinned to the card's future, so the worker answers the backend exactly once.
  • Trust this channel on a worker card approves that call and puts the whole channel on Trust, its running workers included (see below).
  • When the prompt is decided elsewhere the card is updated in place and its buttons go: approved or declined in the dashboard, no answer in time, or the worker stopped first (from _run_chat's own host-decline / cancel / stop flags).
  • _run_chat starts the relay as a task (no await between the approval future's registration and its try/finally), and finish re-raises the turn's own cancellation, stopping a relay that has not posted yet.

Slack entities. Code-channel cards now mrkdwn-escape the footer and the tool arguments, so agent-authored text cannot ping the channel or break out of the code block. Every other card is unchanged.

Approval mode from the channel. The kickoff gains an owner-only Approval mode select (Normal / Reads / Trust, the dashboard's own names; the command words stay ask / reads / all) below #21991's Agent for this channel, preselected with the session's mode, and /kirocrew trust ask|reads|all joins /kirocrew agent (bare /kirocrew trust shows the mode; outside a code channel it is not a sub-command and falls to the help text). Both reuse #21991's pieces rather than copying them: agent_picker.authorize (now taking the caller's audit writer and refusal text), kickoff_blocks (now drawing the optional Approval select), and the /kirocrew sub-command parse, with agent and trust sharing one branch in commands.handle_slash. A pick or command runs approval_picker.set_channel_mode → apply_approval_mode; the kickoff is redrawn with who set the mode, and Trust posts the warning line. Refusals (non-owner, not the kickoff, unknown mode, wrong channel) change nothing and each writes a slack.code_channel.approval_mode row; the command rows keep their per-command denial reasons.

  • YOLO. While the YOLO override is on, a pick is never answered as "unchanged": Normal must reach apply_approval_mode, which ends the grant (as Normal does on the dashboard), and the reply says the grant is off. The select has no YOLO state, so while YOLO is on the kickoff carries a line saying tools run without asking.
  • Changes to feat(slack): pick each code channel's agent #21991's behaviour. When agents cannot be listed the kickoff still posts as Block Kit with only the Approval select (it used to fall back to plain text); test_slack_code_channel_agent_picker.py is updated to pin that.
  • Known limit. The select shows the mode as of the last time the kickoff was drawn: a change on the dashboard or a gateway restart does not redraw it. The guide says so.

Tests: test/test_slack_code_channel_approval_select.py (27): both pickers on the kickoff in order; the select starts on the session's mode; owner sets each mode from the select and the command; Normal back; refused picks and commands change nothing and are audited (including a non-owner pick refused by the dispatcher); bare, unknown and escaped words; outside a code channel and with the feature off it is not ours; Normal ends a live declared or ad-hoc YOLO grant when the slot already reads Normal; an unreadable override never reads as unchanged; the kickoff's YOLO line; the agent command's denial row unchanged. Each new gate was mutation-checked.

Kickoff: agent picker and Approval mode select

Kickoff after Trust is picked, with the warning line

Kickoff after Trust, dark

Files: slack/code_channels/approval_picker.py and worker_approvals.py (new), slack/handler_runtime/approvals.py, slack/interactions.py (+6 lines on a baselined file: the routing lives in worker_approvals.dispatch_card_click), dashboard/chat_runner.py (imports) and dashboard/chat_turn/permission_prompt.py (the approval-card wiring, which the base moved there out of _run_chat; same statements, relocated), dashboard/chat_api/slot_approval.py, the pinned shapes in test_slack_handler_composition_contract.py and test_chat_handlers_composition_contract.py, docs/guides/slack-setup.md, docs/system-specs/modules/slack-gateway.md.

Tests: test/test_slack_code_channel_trust_from_slack.py and test/test_slack_code_channel_worker_approvals.py (49): a code-channel card has no thread_ts and an ordinary thread keeps one; one primary button; owner Trust approves the call, flips the mode and writes both audit rows; refusals change nothing (non-owner, origin off, another session's card, unknown card, policy denies); a same-id call in another session stays pending; a worker approval posts to the channel; owner approve / reject resolve it; a non-owner is refused; a stale card is refused; the card updates in place for dashboard approve / decline, timeout and host-ended; nothing but this channel's workers is relayed; a card spent during the policy check or inside apply_approval_mode's own await grants nothing; cancelling the turn during cleanup is not swallowed; tool arguments cannot leave the code fence. Each new gate was mutation-checked. 2010 related tests pass; the two test_nothing_but_the_facade_imports_an_owner reds fail identically on d4d41df95c.

Card frames below are drawn from the exact Block Kit JSON the code emits, in a Slack-style page: a mock, not a Slack client capture.

Code channel card: Approve, Trust this channel, Reject

After Trust this channel: card updated and the warning line

Worker card in the channel

Worker card after it was approved in the dashboard

Worker card, dark

Code channel card, dark

Running workers follow the channel's mode

Found in Kyle's live test of build 5: with the channel on Trust, the conductor's existing worker still posted an approval card for a read-only git command, because a channel mode change reached only workers started afterwards.

  • Propagation. approval_picker.set_channel_mode (the Trust button on either card, the kickoff select, /kirocrew trust) now also runs apply_approval_mode on each of worker_approvals.live_workers: the relay's own _created_by lineage, direct children of the channel's current session only, never Slack-linked, nothing outside the channel. Raising and lowering both apply, and a worker the dashboard raised is lowered when the channel already sits on the lower mode. Each worker change writes the dashboard switch's mode_change:<mode> row plus a slack.code_channel.approval_mode row naming the worker (result=worker_set / worker_refused).
  • Commit-time fence. Each worker grant passes apply_approval_mode a still_live predicate asked right before the mutation: the exact worker object is still the registered slot under its key (not a replacement under a reused key), still the unlinked direct child of the channel's current session, and the mode is not above the channel's mode at that moment (a concurrent lowering wins). While no grant has committed yet (the channel already held the mode), the asking card's own fence rides on it, so a card spent mid-await grants nothing.
  • Pending prompts. A raise to Trust answers the channel's and the workers' waiting tool prompts through that call's own slot-scoped sweep, the mid-wait dashboard path, with no new approval store. Each Slack card says "Ran under Trust" in place; the channel's own are kept from _run_chat's delete (approval_picker.keep_card), and a worker card claimed for the sweep whose prompt ended another way says how it ended. The card a click asked from is written once, by that click. ask_question cards wait in _question_futures, which no sweep reads, so a person-only question is never answered. There is no answers_only flag on this stack; that is what covers it.
  • Command once. A code channel's card shows a JSON input's command in its own code block, the other arguments as JSON only when there are any, and drops the tool title from the lock line only when it is just Running: <command>. Any other title, an UNVERIFIED child request warning above all, stays. Decoded parts are redacted again (decoding can undo an escape the redactors could not read), and an input whose decoded parts carry control or format characters (bidi overrides, zero-width) is shown raw. Helpers: slack.format.command_and_rest / title_restates_command.
  • The lineage is this PR's own relay check, so nothing here depends on feat(slack): let a code channel's own session dispatch its workers #22001.

Tests: test/test_slack_code_channel_mode_reaches_workers.py (27): an existing worker inherits a raise and a lower, and Reads; a worker is lowered to a channel already on Normal; unrelated sessions (another creator, none, Slack-linked, a grandchild) are untouched; pending channel and worker cards resolve on a raise and say so, and the runner keeps the rewritten card; a lower answers nothing; a question card is never answered; Trust on a worker card raises the channel and every sibling; a replacement under the worker's key, a concurrent lowering and a card spent mid-grant all grant nothing; the command shows once, other arguments still show, an ordinary card is unchanged, decoded credentials are redacted, hidden characters show raw, warning titles stay; a clicked card is written once; a claimed card rejected meanwhile says so. One or more fails per item on f3322175e5, and each review fix's tests fail on the commit before it. Reviews: GPT (security) and Opus (UX) fresh-context lanes on 9e6c5615e3; their findings are fixed in 33384a3d68 and 7d2cbfadff, and the GPT re-check's two findings in 5cb23f318d.

Pre-push review fixes (second commit)

A fresh-context review of the whole diff before this push, aimed at stuck state, missing channel-policy checks and secret exposure, plus two re-checks, found 2 blocking and 12 advisory points. All are fixed in the second commit, except one documented limit:

  • Lowering reaches every inherited grant. A session starts with its creator's mode, so a worker's own workers and Slack-linked workers inherit the channel's Trust. A lowering now walks the whole _created_by tree under the channel's current session (worker_approvals.descendants, audited depth=deeper) behind its own fence (_lowering_live: same object, still in the tree, still a lowering). A raise still reaches only the direct, unlinked workers. Known limit: a session whose creator already closed is orphaned from the tree and keeps its mode (documented in the guide).

  • Fenced at the mutation. A raise re-checks, right before it applies, that the feature is on and the channel is not archived (the in-process fence and the stored stamp, so an archive that finished meanwhile counts), and that the channel session is the one the caller authorized against. Every Trust write counts as a raise, since it re-runs the sweep (_raises). A lowering never waits on those checks. The worker card's Approve / Reject and Trust paths re-check after their awaits before answering by hand.

  • Reported, not hidden. A worker the change could not lower is named in the reply, from /kirocrew trust and (ephemerally) from the kickoff select.

  • Cancellation. A cancelled change drops the cards it kept and releases the worker cards it claimed, so each card's own cleanup says how it ended.

  • Worker cards. The relayed card keeps the UNVERIFIED child request warning. A new card posts only where the channel's own prompt would (mirror not paused, channel and origin admit the bot, no Slack Stop); a card already posted stays answerable.

  • Card and copy safety. A literal ``` in a tool's input is shown as ˋˋˋ so it cannot end the card's code block, and the slash-command name in replies and the Trust warning is the routed one, shown only when it matches [a-z0-9_-]{1,32} (else kirocrew).

  • Card rewrites say only what happened (CI review round on 62a5036a5a). Every rewrite of a channel card now sends replacement blocks (approval_picker.settled_blocks / write_card): chat.update keeps a message's buttons when no blocks are sent, so a text-only rewrite left live Approve / Trust / Reject buttons on a decided card. Only a card whose exact future (captured before any await) was still waiting at the grant's last fence and was approved after it says "Ran under Trust", and only those are kept from the runner's delete, added after the sweep with no yield in between. A card answered another way meanwhile (declined in the dashboard, its own Slack button, Stop) is deleted as usual, including when the grant then fails. The clicked card says it approved the call only when it did (ModeResult.trusted_cards). Worker cards follow the same rule: a claimed card the worker's own sweep did not answer says only what happened (worker_approvals.CLAIMED_ENDED), and one its own click answered keeps that click's line.

  • The agent switch's hardening reaches the mode change (restack onto 454f15d89d). feat(slack): pick each code channel's agent #21991 hardened its agent switch against gates closing during its awaits and against stalling the loop on a restored session's transcript. The mode change now does the same: a raise re-runs agent_picker._still_admitted after taking the channel lock and agent_picker._sync_gates at each grant's commit (owner, workspace, channel and origin, Slack inbound, archive, feature), and every slot's window is loaded off the loop (agent_picker._load_window) before its grant; a slot whose window can't load changes nothing. A worker card's Approve or Trust re-runs the same gates after authorize. A lowering, and a Reject, are never held back by them.

Tests: test/test_slack_code_channel_approval_prepush.py (54). 45 of them fail on the commit before their fix; the other 9 pin protections that already held (a lowering never raises a deeper session, a raise is blocked on a closing channel, a clicked card declined mid-change is refused, a lowering lands after a gate closes, five _raises rows).

Premise (for the maintainer override)

First Principles blocked an earlier head because per-channel mode changes contradicted the old ## Not a goal ("No per-channel override") and because the worker relay, live-worker propagation and top-level cards were outside the stated Goal. Kyle ruled (2026-10-23) to amend the Goal rather than split, and the Goal above now owns all of it:

  • the kickoff select, /kirocrew trust and Trust this channel are the Goal's per-channel mode changes, owner-only, through apply_approval_mode (the dashboard picker's own audited mutation), with no approval store of their own;
  • the worker approval relay and live-worker propagation came from Kyle's live tests of builds 3 and 5 (a worker's prompt was invisible in Slack, and channel Trust did not reach a running worker);
  • approval cards post top-level in the channel by Kyle's request;
  • the earlier "Trust excluded in group channels" decision is reversed for code channels by Kyle's approval of all three modes there.

The override is the maintainer's to post; nothing here posts it.

Backwards compatibility

Compatible: the new key is optional and defaults to today's behaviour (ask). An existing config without it, or with a value other than the three, keeps every new code channel asking. The crewmate seed's behaviour is unchanged; test/test_member_approval_default.py passes as is.

Removes nothing: the change adds one optional config key, one API field and one picker. _seed_member_approval keeps its name, signature and outcome and only delegates its body.

Tests

  • test/test_slack_code_channel_approval_mode.py:
    • config: parse, trimming, ask / unset / junk read as unset, round-trip through config.json;
    • resolution: unset resolves to ask, an explicit mode carries into SessionSpec;
    • settings: GET/PUT save and read back, ask / null / blank clear, other values refused, a stored hand-edited value does not block an unrelated save;
    • runtime, with the real create_bound_session on a fake dashboard state: trust / trust_reads set the slot flags, the session policy and exactly one SEL mode_change record; ask leaves the slot alone; a retracted session records nothing; the YOLO override is never touched. With the seed call removed, the runtime tests fail.
  • website/src/test/SettingsSlackCodePanel.test.tsx: the draft and payload mapping (ask sent as null, an unknown value read as ask); picking Reads shows no warning; picking Trust shows the warning, updates the preview and saves approval_mode: 'trust'; a saved Trust shows the warning on load.
  • test/test_slack_code_settings.py: the GET defaults shape now includes approval_mode.
  • website/src/test/settingsCoverage.test.ts: the waiver count for the Code channels card's pickers goes from 3 to 4, with the reason updated.

Manual verification

The Settings frames below were captured from the built SPA with canned API responses, in dark and light themes, after checking the default Normal state and the Trust warning and preview. The one-off capture script is not part of this PR. The Slack frames are drawn from the exact Block Kit JSON the code emits, in a Slack-style page: a mock, not a Slack client capture.

Screenshots / video

Code channels card, default (Normal, no warning) and Trust picked (warning, preview reads Trust · Set here):

Default: Normal

Trust picked: inline warning

Light theme

Light, default

Light, Trust picked

Related Issues

None: the owner asked for this change directly, and no tracking issue was opened.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners October 19, 2026 00:28
@kyleseaman
kyleseaman requested review from iamwhatever and removed request for a team October 19, 2026 00:28
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: every mode change goes through the dashboard's own apply_approval_mode, the seed helper is a behaviour-preserving extraction of the crewmate seed, nothing is taken away, and 13 rendered images cover the Settings surface.

[DESIGN-REVIEWED] c73628e

Description read

[DESCRIPTION-READ] 56b53f8a042534a24ebb27b17272382ebacf9eeaf0d6c92fa14510554c6f6e3a

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 Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of c73628e4d624d79dce85e1e602029023ded670ff — 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. One mechanism goes past the frozen ## Not a goal: lowering the channel's mode also changes sessions the channel's session did not start directly.

Notes

  • Item 9 — oversized: ## Not a goal says "sessions the channel's current session did not start directly are never relayed or changed". But worker_approvals.descendants ("Wider than :func:live_workers on purpose … workers linked to Slack") walks the whole _created_by tree, and approval_picker.py:719 lowers every one of them, Slack-linked sessions included. The stated reason is real: deeper sessions inherited the Trust grant when they were created. That reason is not in the Goal, though, and the Goal is frozen. Subtraction: narrow the loop at approval_picker.py:719 (and the check at :612) to live_workers, the direct children only. Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (10 items) — 9 justified

Intent: let a Slack code channel's session run in Normal, Reads or Trust, and answer its approvals from Slack, so it doesn't stall waiting on the dashboard. ADDITION.

  1. Settings → Code channels gains an Approval mode picker (default Normal), with a warning when Trust is picked — justified
  2. New key slack.code_channel_defaults.approval_mode; the API stores ask as unset and refuses any other value — justified
  3. A new channel's session starts in the configured mode, recorded in the security event log — justified
  4. The kickoff message gains an owner-only Approval mode select — justified
  5. /kirocrew trust ask|reads|all in code channels — justified
  6. Code-channel approval cards gain a "Trust this channel" button — justified
  7. Workers' approval prompts are posted in the channel and can be answered there — justified
  8. A mode change reaches the direct workers already running; a raise to Trust answers their pending prompts — justified
  9. Lowering the mode also reaches deeper descendants, Slack-linked ones included — oversized, contradicts Not a goal
  10. The crewmate thread seed uses the shared seed_slot_approval instead of its inline copy — justified

[FIRST-PRINCIPLES-REVIEWED] c73628e

Description read

[DESCRIPTION-READ] 31db3f91c820c004f9ec114a9c6385b5bd506fe35f560c9e545e48fc215efdf1

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 Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the Approval mode pickers in Settings and the kickoff were both read correctly, and every added state appears in a screenshot.

Notes

  • "Trust this channel" button: the blind reader would not click it: "doesn't say it's permanent or affects other people". It turns on Trust for the whole channel and its workers from one request. Make the scope visible on the card, for example "Trust this channel (all future requests)".
  • /kirocrew trust ask: the blind reader read it as "would turn it on, not off". In the Trust warning, name the outcome next to the command, for example "/kirocrew trust ask (back to Normal)".
  • approval_hint: "You can still change it on the session" uses "session" where everything around it says "channel". Use "You can change it later in the channel or on its session".

[UX-REVIEWED] c73628e

Description read

[DESCRIPTION-READ] c4477070402d98dc519dd41acadef1242e02934c1e211af9f614d6ccfc9a6091

That sha256 names everything this verdict read: the PR description, plus the 16 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.

@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-agent-surface branch from c9289e3 to e6a8146 Compare October 19, 2026 00:31
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] c73628e

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

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

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c73628e

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

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-approval-mode branch from 634fb3b to ab21606 Compare October 19, 2026 12:19
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-agent-surface branch from e6a8146 to 408d621 Compare October 19, 2026 13:03
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-approval-mode branch from ab21606 to 8fb73a3 Compare October 19, 2026 13:25
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-agent-surface branch from 408d621 to 90250b1 Compare October 19, 2026 13:41
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-approval-mode branch from 8fb73a3 to d4d41df Compare October 19, 2026 13:56
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 19, 2026
@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 Oct 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-agent-select branch from 85e5f6e to 35c15a7 Compare October 20, 2026 18:51
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-approval-mode branch from 5cb23f3 to 932b57a Compare October 20, 2026 21:00
@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: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-agent-select branch from 35c15a7 to c0bce46 Compare October 20, 2026 23:47
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-agent-select branch 2 times, most recently from 7cf60a1 to 7ddbc57 Compare October 22, 2026 18:17
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-approval-mode branch from 932b57a to e4fb454 Compare October 22, 2026 19:22
@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: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 22, 2026
@kyleseaman
kyleseaman added this pull request to stack #23519 October 23, 2026 19:03
@kyleseaman
kyleseaman removed this pull request from stack #23519 October 27, 2026 17:06
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channel-agent-select branch from 7ddbc57 to 09bfe4f Compare October 30, 2026 18:46
Kyle Seaman added 2 commits November 2, 2026 14:47
A code channel's session starts in the approval mode set on the Code
channels card (Normal / Reads / Trust). The channel's owner can change it
from the kickoff message's Approval mode menu, with
/kirocrew trust ask|reads|all, or with "Trust this channel" on an
approval card. Every change goes through apply_approval_mode, the same
audited path as the dashboard picker, and ends a live YOLO grant on Ask.

Approval cards for a code channel post top-level in the channel. Workers
started by the channel's own session relay their approval cards into the
channel; only the owner can answer them, and each click settles only that
worker's waiting call. A mode change reaches the channel session's own
running workers (raise and lower, capped at the channel's mode), and a
raise to Trust approves their waiting prompts the way a mid-wait
dashboard switch does. Person-only question cards are never answered
automatically.
…utation

A lowering reaches every session that inherited the channel's grant (a worker's workers, linked ones) and the reply names any it could not change. Each grant re-checks, right before it applies, that the channel is not archived here, the feature is on and the channel session is the one the caller authorized against. A cancelled change releases the cards it claimed. Worker cards keep the UNVERIFIED warning and post only where the channel's own prompt would. A literal code fence cannot end a code-channel card's code block, and a hand-edited command name is never echoed into the channel.
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.

2 participants