Skip to content

Flip radio wake defaults: workers auto-submit and stay in the background; the PM box is never auto-submitted - #255

Merged
martin-conur merged 3 commits into
mainfrom
task/flip-wake-defaults
Oct 6, 2026
Merged

martin-conur merged 3 commits into
mainfrom
task/flip-wake-defaults

Conversation

@martin-conur

Copy link
Copy Markdown
Owner

Closes #254

What changed

before now
task-pm auto-submit on (#189) off; --auto-submit / --auto opts in
task-work (claude + kiro, --plan too) auto-submit only with --auto / --auto-submit on; --no-auto-submit opts out
focus after task-work / task-recreate-worker jumps to new tab unless --auto stays on caller; new --focus jumps
--auto permission mode + auto-submit + focus permission mode only (claude); no-op on kiro

#246's tri-state is unchanged: every launcher still injects an explicit TASK_FORCE_AUTO_SUBMIT=0/1, so a relaunched PM drops the 1 it recorded under #189 (pinned by a test). The PM/planner prompts already say plain task-work <slug> <url>, so they needed no edit. They now get the wanted behaviour with no flag.

Risk from the spec: --no-auto-submit is documented as the opt-out for a worker you mean to step into and type in (task-work --help, the workflow docs, README).

Docs: README, the seven steering/*.example.md workflow docs and this repo's .claude/gh-workflow.md: the flag lists, the PM wake paragraph (inverted), and the "radio check sitting unsubmitted" symptom row (inverted). CHANGELOG has an entry. Upgrading: re-run task-init <loadout>. Live sessions keep what they registered with.

Verification (working tree = this PR's diff over cc0523d)

  • ./run_tests.sh: 1321/1321 ok (bats, full suite).
  • tools/check-drift.sh: 15 groups clean. shellcheck -x clean on every changed shell file.
  • New and updated tests feed the launch env to radio register and read AUTO_SUBMIT back from the session file, for task-work on every impl and for task-pm on claude and kiro. Focus is pinned for the default, --plan, --auto and --focus paths, and for task-recreate-worker.
  • Mutation check: I broke each of the 9 below one at a time on the working tree and re-ran the named suites. Failing-test counts:
    • task-work default auto-submit → off: task_work_agents 8, task_work_impls 1, radio_runbook 1
    • task-work --no-auto-submit ignored: 6 + 1
    • task-work focus default → jump: zellij_tab_stay_focused 3, task_work_agents 1
    • task-work --focus ignored: 2
    • task-pm default → on: task_pm 4
    • task-pm --auto-submit ignored: 3
    • task-recreate-worker focus default → jump: 1
    • task-recreate-worker --focus ignored: 1
  • Not covered: no live zellij session was driven. Focus is verified only against the stubbed zellij action call sequence.

🤖 Generated with Claude Code

martin-conur and others added 2 commits October 6, 2026 16:14
…und; the PM box is never auto-submitted: flip task-work / task-pm / task-recreate-worker defaults

- `task-work`: radio auto-submit on by default on every agent, `--plan`
  included; `--no-auto-submit` is the opt-out. Focus stays on the caller's
  tab by default; new `--focus` jumps to the new tab. `--auto` is now
  permission mode only (claude), a no-op on kiro.
- `task-recreate-worker`: stays on the caller's tab by default, `--focus`.
- `task-pm`: auto-submit off by default (reverses #189's default);
  `--auto-submit` / `--auto` opts back in. Still exports an explicit `0`,
  so a PM that recorded `1` under #189 drops it on relaunch.
- Docs: README, the seven loadout workflow docs and this repo's installed
  copy (PM wake paragraph, symptom row, flag lists); CHANGELOG entry with
  the re-run-task-init upgrade note.
- Tests pin each default and opt-out end to end through the AUTO_SUBMIT a
  `radio register` writes into the session file, plus focus on every
  path; each was mutation-checked red.

Closes #254

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…und; the PM box is never auto-submitted: keep register's stderr out of the task_pm session-file helper

`radio register` run without `$TASK_FORCE_ROLE` is an explicit repair and
warns about an EMPTY TAB_ID on stderr. CI has no role env, so under `run`
that warning landed in the output being compared and three new task_pm
tests failed there while passing in a worker tab. Reproduced locally with
`env -u TASK_FORCE_ROLE`; the helper now drops register's stderr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@martin-conur

Copy link
Copy Markdown
Owner Author

Spec compliance

Issue #254 had four deliverables; all are present:

Requirement Status
task-work: auto-submit on by default (all agents, --plan included) ✅
task-work: focus stays on caller by default; --focus jumps ✅
task-pm: auto-submit off by default; --auto-submit / --auto opts in ✅
--auto is permission mode only on claude; no-op on kiro's task-work ✅

Code correctness — the logic flip in bin/task-work:
Old path wired AUTO_SUBMIT to AUTO_MODE, so a plain task-work injected TASK_FORCE_AUTO_SUBMIT=0. The new path inverts: =1 is the default and only AUTO_SUBMIT_FLAG="0" (from --no-auto-submit) flips it to =0. Injection is always explicit (never unset), which is what the #246 tri-state requires.

task-pm — safe transition across a live sidecar:
The old code set AUTO_SUBMIT=1 unconditionally. The new default is "" (→ TASK_FORCE_AUTO_SUBMIT=0). The spec's risk note is addressed: a PM launched under the old default wrote AUTO_SUBMIT=1 into its sidecar, and radio reads an unset env as "restore sidecar" — so a bare relaunch without the explicit 0 would silently re-enable auto-submit. The PR exports TASK_FORCE_AUTO_SUBMIT=0 (never unset), which overrides the stale sidecar correctly. The new test claude task-pm's default overrides a PM that recorded auto-submit under #189 (#254) pins this end-to-end through the session file.

Tests — end-to-end, not just env injection:
The new _session_auto_submit() / _pm_session_auto_submit() helpers register against the exact env the launch line injects and read AUTO_SUBMIT back from the session file. This catches a regression where the env is injected but radio register ignores it. Mutation check covers all 9 breakage scenarios with specific failing-test counts.

Docs — all required surfaces updated:
README (PM auto-submit paragraph, kiro section, symptom table), .claude/gh-workflow.md, all 7 steering/*.example.md templates, CHANGELOG with upgrading note. The radio check sitting unsubmitted symptom row is correctly inverted for both PM (default now) and worker (non-default).


Code-review findings

Nit — task-recreate-worker --auto description is accurate but could confuse a reader who just learned task-work --auto is a no-op on kiro:

In both .claude/gh-workflow.md and kiro-gh/steering/gh-workflow.example.md, task-recreate-worker's --auto option still reads: "on kiro it governs auto-submit only (#206)." That phrasing echoes the old task-work language. For task-recreate-worker it is technically correct — the command's default is sidecar-restore (not auto-submit-on), so --auto actively sets TASK_FORCE_AUTO_SUBMIT=1 on kiro even after #254 — but a reader who just processed "task-work --auto is a no-op on kiro" will be surprised. A one-clause parenthetical like "(unlike task-work, whose default is already on)" would close the gap. Not a blocker.

Nit — kiro --auto-submit flag is missing from task-recreate-worker's kiro workflow doc:

The kiro-gh template's task-recreate-worker option list was updated to add --focus but still omits --auto-submit from the documented options. --auto-submit exists and is tested — it just isn't listed. The claude-gh template documents all three variants; the kiro one only shows --auto and --auto-submit / --no-auto-submit in the descriptive text but not as list items. Minor gap.


Verdict: clean-with-nits

The PR delivers everything #254 asked for. Both code paths (auto-submit flip in task-work, explicit-off in task-pm) are correct, the tri-state invariant is preserved, tests are thorough and end-to-end, and all required doc surfaces were updated. The two nits above are documentation clarity issues — neither affects runtime behavior or tests. Merge when ready.

@martin-conur

Copy link
Copy Markdown
Owner Author

PM: fix both of the reviewer's doc points in this PR (tight-PR norm), then re-request review:

  1. task-recreate-worker --auto description (.claude/gh-workflow.md and the kiro templates): add the clause that sets it apart from task-work. Something like "unlike task-work, whose default is already on, this command defaults to the auto-submit setting radio recorded for the role".
  2. --auto-submit missing from the kiro task-recreate-worker option list. Check all three kiro templates (kiro-gh, kiro-notion, kiro-local), not just the one the reviewer cited, and make the option lists match the claude templates.

Docs only. Confirm a CI run exists for the new latest commit.

…und; the PM box is never auto-submitted: say why task-recreate-worker --auto still matters, regroup its auto-submit options

Review nits on #255:
- The `task-recreate-worker` `--auto` bullet now says how it differs from
  `task-work`: its default is the setting radio recorded for the role, not
  on, so `--auto` still changes something. The same clause is in its `--help`.
- `--focus` had been placed between `--auto` and `--auto-submit` /
  `--no-auto-submit`, which split the trio that "With none of these three"
  refers to. It now follows them. The option list is identical in all eight
  workflow docs (the seven templates plus `.claude/gh-workflow.md`) and
  already listed `--auto-submit` in every kiro template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@martin-conur
martin-conur merged commit c0ea6ea into main Oct 6, 2026
4 checks passed
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.

Flip radio wake defaults: workers auto-submit and stay in the background; the PM box is never auto-submitted

1 participant