Skip to content

docs(skills): honour an explicit transport before T3 and record Start failures - #272

Merged
furedea merged 1 commit into
mainfrom
docs/delegation-transport-order
Nov 21, 2026
Merged

furedea merged 1 commit into
mainfrom
docs/delegation-transport-order

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

概要

#268 のレビュー P2 と,T3 での最初の実 Start で見つかった失敗を,docs に反映した(文書のみ).

  1. branches.md の「Choose the workspace in this order」で,T3 を使う手順(旧 3)が,利用者による transport の明示(旧 4 の中でのみ言及)より前にあった.T3 が使えるときに利用者が Herdr を明示しても T3 に回ってしまうため,明示の指定を T3 の手順より前に出した.
  2. t3 thread start が threadId と runId を返したあと status: failed,worktreePath: null になった.CLI は原因を表示せず,原因は ~/.t3/userdata/logs/server.trace.ndjson の branch_already_exists(ブランチが別の worktree で checkout 済み)にだけあった.Start 前の確認と,失敗時の原因の探し方を t3.md に書いた.

Refs #264

変更前後

順 変更前 変更後
1 既に task worktree にいる 同じ
2 利用者が現在の checkout を明示 同じ
3 T3 が使えれば T3 利用者が Herdr を明示すれば,T3 が使えても Herdr
4 T3 が使えなければ lane を始めない.Herdr は利用者の明示のみ それ以外で T3 が使えれば T3(既定)
5 対象ブランチが別の worktree にある T3 が使えなければ lane を始めず理由を報告.transport を勝手に切り替えず,使えないことを理由に Herdr も使わない
6 - 対象ブランチが別の worktree にある(旧 5)

変更

  • agents/skills/development-cycle/references/branches.md:上の表のとおり.step 番号を参照する箇所は他になく,リンクのアンカー(#herdr-on-explicit-request,#prerequisites)は変えていない.
  • agents/skills/delegation/references/t3.md:Start の前に,<branch> がローカルにも他の worktree にもないことを git branch --list <branch> と git worktree list で確認する(あれば T3 が branch_already_exists で run を失敗させる).Wait の failed などの判断に,CLI は原因を表示しないので,報告の前に ~/.t3/userdata/logs/server.trace.ndjson をスレッド id か run id で探す,と追記した.
  • docs/DESIGN.md・docs/DESIGN_ja.md・ADR-0028:新しい順序と矛盾する文はないため変更しない.

確認

  • agent-harness install と verify:エラーなし
  • uv run pytest:6495 passed,2 skipped,1 failed.失敗は tests/hooks/test_model_rules_process.py::test_only_the_op_process_receives_the_token_and_only_allowlisted_variables(sandbox の環境変数 LC_CTYPE が余分に見える)で,docs のみの変更とは無関係
  • git diff --check,lefthook(shfmt,ls-lint,shellcheck,commitlint):問題なし

Limits

Wait 手順の他の未決事項(send 直後の古い読み取り,background タスク,--messages 1)は範囲外で,この trial の後に親が決める.

🤖 Generated with Claude Code

… failures

Refs #264

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 21, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T16:28:41.780557Z ef957d6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Review summary: no inline findings, so nothing is tagged P0–P3.

I reviewed the two docs-only changes: the reordered workspace steps in branches.md and the Start pre-check and failure-diagnosis notes in t3.md. I couldn't find a correctness or security problem, and there is no behavior for a test to cover.

  • The new order is consistent: an explicit Herdr request wins over T3, T3 is the default, and an unavailable T3 means no lane starts and no silent fallback to Herdr.
  • The anchors #herdr-on-explicit-request and #prerequisites are unchanged, so existing links still resolve.

Two things I considered and left unflagged:

  • git branch --list plus git worktree list only covers local branches. A branch that exists only on a remote isn't checked, but that wasn't the observed failure.
  • The failure-diagnosis step reads ~/.t3/userdata/logs/server.trace.ndjson. I didn't verify that this path is readable under the sandbox the lanes run in. If it isn't, the agent will just report that it couldn't find the cause.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: ef957d6c22

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit 8cccb34 into main Nov 21, 2026
29 checks passed
@furedea
furedea deleted the docs/delegation-transport-order branch November 21, 2026 17:47
furedea added a commit that referenced this pull request Nov 21, 2026
)

## 概要

- T3 の Wait 手順を実機(T3 0.1.10 の挙動と PR #272 の最初の lane)に合わせて直し,ADR-0028 を
`accepted` にする.
- 判断してほしいこと: Wait の判定順(失敗 → 承認待ち → 終了 → 稼働中)と,Prompt 前に `latestRunId`
を記録する手順でよいか.

## 変更前後

| 項目 | 変更前 | 変更後 |
| --- | --- | --- |
| 承認待ちの検出 | `pendingRequestCount > 0`(`status` は `waiting` と記載) |
`pendingRequestCount > 0` のみ.`status` は `running` のまま |
| ターン終了 | `activeRunId` が `null` かつ `status` が `idle`/`completed` |
同じ.`waiting`(awaited な背景作業が完了を保持)は稼働中扱い.`pendingBackgroundTasks`
は規則に使わない(`isAwaitedWork`,`threadStatus`) |
| Prompt 直後 | 古い run の完了状態と返信を新しい返信と誤読しうる | `send` 前に `latestRunId`
を記録し,変わるまで失敗・取消を含むどの終了判定もしない.3 回ポーリングしても変わらなければ「新しい run
が始まらなかった」と報告.`send` が非 0 ならユーザーに報告 |
| 返信の読み取り | `--messages 1` | `--messages 5`.`role: assistant` かつ `runId
== latestRunId` の最後のメッセージ.無ければ `--messages` を増やして再読 |
| ADR-0028 | `proposed` | `accepted`(`amended` に根拠と,`--wait` ではなく `show`
のポーリングで待つ旨の 2 行.本文は不変) |

## 検証

- [x] `adr-check --base origin/main docs/adr`: 通過
- [x] `dprint check`(`t3.md`,ADR-0028): 差分なし(他 ADR の指摘は既存でこの変更の対象外)
- [x] `ls_lint`: 通過
- [x] `uv run pytest -q -k "skill or delegation or adr"`: 131 passed
- [ ] CI(`all-green`)とレビュー: 本 PR で確認

## Limits

- ドキュメントのみの変更.`SKILL.md`,`branches.md`,guard / hooks,Herdr は対象外.
- ADR-0028 は front matter(`status`,`amended` 2 項目)に加え,本文の 2 か所(Decision
Outcome の `--wait` の文と,無タイムアウトの Consequence)へ「2026-11-22 に改訂し,親は `t3
thread show`
をポーリングする」旨の注記を足した(033aa239,親の承認済み).注記以外の本文は変更していない.`adr-check --base
origin/main` は通る(`origin/main` では `proposed` なので本文の変更検査の対象外).
- 最終ラウンドの未対応の指摘(直さず記録のみ):
    - ADR-0028 の Consequence の注記行が他の行の折り返し幅(120 桁)を超える(P2).
- ADR の注記は「ポーリングが `--wait` の無タイムアウトの懸念を置き換える」と書くが,t3.md の上限は「新しい run
が始まらない」場合の 3 回だけで,run 開始後の `running` や `waiting`
は無期限にポーリングされる(P3).「軽減する」に直すか,N 回で報告する規則を足す余地がある.
- t3.md は完了を保持しない背景作業の kind を `shell` と書いたが,codex-review は T3 0.1.10
の実際の kind は `command` と `monitor` だと指摘している(P3).`shell` は `command`
に直す余地がある.
- 背景作業の扱いは T3 0.1.10 の
`isAwaitedWork`(`orchestration-v2/RestartBackgroundNote.ts`)と
`threadStatus`(`OrchestratorMcpService.ts`)に基づく.
- `pendingBackgroundTasks` などのフィールドは T3 0.1.10 サーバーのソース(source
map)の読解に基づく.

<details>
<summary>Scope と根拠</summary>

- 対象: `agents/skills/delegation/references/t3.md`(Operations の Wait /
Prompt /
Read),`docs/adr/0028_hand_approved_lanes_to_t3_code_threads.md`(front
matter のみ).
- ADR-0028 の根拠: 最初の実 lane(PR #272)が start,承認,PR,`LANE-READY`
まで通り,`cleanup_worktrees.py` が `~/.t3/worktrees` の worktree を削除した.
- `Refs #264`(#264 を完了させる残りの修正のひとつ).

</details>

Refs #264

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: furedea <132188853+furedea@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
furedea added a commit to furedea/dotfiles that referenced this pull request Nov 21, 2026
agent-config を 0.5.1 に上げる.T3 で lane を回す手順の修正(待ち方,transport の優先順位,Start
前の branch 確認)と ADR-0028 の accepted が入る.

| 入力 | 変更前 | 変更後 |
| --- | --- | --- |
| `agent-config` | `7e350e03`(v0.5.0) | `7f39859b`(v0.5.1) |

- [ ] CI
- [ ] 反映後,`delegation` skill の `references/t3.md` が新しい Wait 手順(`show` の
polling,`latestRunId` の確認)になっている

<details>
<summary>内容と出典</summary>

- furedea/agent-config#272:利用者が明示した transport を T3 より先に見る,Start 前に
branch の有無を確かめる,失敗の原因は `server.trace.ndjson` で調べる
- furedea/agent-config#273:Wait 手順の修正(承認待ちは `pendingRequestCount`,終了は
`status`,Prompt 後は `latestRunId` の変化を待つ),ADR-0028 を accepted
- 変更は `flake.lock` のみ.agent-harness は `follows` で変わらない
- 反映は #490(T3 server の常駐)と同じ `darwin-rebuild switch` で行う.その前に mbp の
desktop app で Local environment をオフにする(#489 の plan 手順 3)

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: furedea <132188853+furedea@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant