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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ breaking changes may land in a minor release.
start whose effort is not one of the model's variants (#847).
- Write each OpenCode 2.x provider-error event to `logs/<task-id>.provider-errors.log`
and classify rate-limit, quota and transport outages there as environment faults (#847).
- Add the `subagent_transcript_dir` CLI profile field: a subagent transcript tree whose
writes count as session activity for the idle notice (#858).
- Name the tool call an idle Claude session is waiting on: `session-idle` carries
`in_tool`, and the TUI shows `· idle <age> · in <tool>` (#858).

### Changed

Expand Down Expand Up @@ -102,6 +106,8 @@ breaking changes may land in a minor release.
(DW-538): the stale admin entry is now pruned; a prune that fails is reported.
- Make the test suite pass on WSL2: skip the pidfd reap tests when the Python build
has no `os.pidfd_open`, and spawn `sys.executable` instead of a bare `python` (#883).
- Count Claude subagent and workflow-agent transcript writes as session activity, so a
session waiting on a foreground subagent no longer journals `session-idle` (#858).

### Security

Expand Down
48 changes: 26 additions & 22 deletions docs/adapter-authoring-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,33 +302,37 @@ a new `name` extends the set. The aliases `claude-code-tmux` and `opencode` reso

### `CLIProfile`

| Field | Required | Default | Meaning |
| ---------------------------------- | -------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | ✅ | — | Profile id: the `--cli` value, the policy `[adapter] name`, and the override key. |
| `binary` | ✅ | — | Executable resolved on `PATH`. `validate` runs `--version` only on binary names a packaged profile declares (`adapter.binary-unrunnable`). |
| `[hooks]` | ✅ | — | The [`HookSpec`](#hookspec-the-hooks-table) table. |
| `adapter` | | `generic` (`opencode-http` if `dialect=none`) | Adapter kind, resolved against the live [registry](#shipping-a-new-adapter-class-out-of-tree) at run start and by `validate` (`adapter.kind`). `generic` with `dialect = "none"` is refused. |
| `skill_tree` | | `.claude/skills` | Project-relative tree the CLI reads skills from; `init` installs the `bmad-loop-*` skills here. Must stay inside the project. |
| `prompt_template` | | `{prompt}` | Renders the canonical `/skill args` prompt. Placeholders: `{prompt}` (whole string), `{skill}` (command name, no `/`), `{args}` (the rest). |
| `launch_args` | | `[]` | Argv after `binary` (`["-i"]` keeps gemini/copilot interactive). Under `opencode-http` it precedes `serve`; `validate` warns on unservable shapes. |
| `bypass_args` | | `[]` | Permission-bypass flags for unattended runs. A policy `extra_args` replaces them; `validate` warns (`policy.bypass-dropped`) when one is dropped. |
| `model_flag` | | `--model` | Flag passed with the model name when one is configured. |
| `env` | | `{}` | `[env]` table of extra session environment variables. It cannot override the run's state-root pin. |
| `usage_parser` | | `none` | Transcript token parser: `claude-jsonl`, `codex-rollout`, `gemini-chat`, `copilot-events` or `none`. |
| `usage_grace_s` | | `0.0` | Seconds to keep polling the transcript for token totals after the session ends; `0` reads once. Must be ≥ 0. |
| `stop_without_result_nudges` | | unset | Per-profile default for Stop-without-result nudges. An `[adapter]` / `[adapter.<stage>]` value overrides it; unset inherits `[limits] stop_without_result_nudges`. Must be ≥ 0. |
| `subagent_stop_without_transcript` | | `false` | When `true`, a `Stop` with no transcript path is a subagent turn-end and is ignored. |
| `first_run_note` | | `""` | Note `init` prints about a manual first-run or auth step. |
| `seed_files` | | `[]` | Project-relative gitignored files copied into each provisioned worktree. Must stay inside the project. |
| `env_fault_patterns` | | `[]` | Regexes that classify a non-completed session as an environment fault. See [Environment-fault patterns](#environment-fault-patterns). |
| `parked_prompt_patterns` | | `[]` | Regexes matched against the visible pane at each stall-grace expiry. See [Parked-session signals](#parked-session-signals). |
| `[workspace_trust]` | | unset | The [`WorkspaceTrustSpec`](#workspacetrustspec-the-workspace_trust-table) table. Unset: nothing under `~` is read or written. |
| `session_id_flag` | | `""` | Launch flag for a caller-chosen session id (claude: `--session-id`). The generic adapter appends `[flag, uuid4]` and pins attribution to that id. |
| Field | Required | Default | Meaning |
| ---------------------------------- | -------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | ✅ | — | Profile id: the `--cli` value, the policy `[adapter] name`, and the override key. |
| `binary` | ✅ | — | Executable resolved on `PATH`. `validate` runs `--version` only on binary names a packaged profile declares (`adapter.binary-unrunnable`). |
| `[hooks]` | ✅ | — | The [`HookSpec`](#hookspec-the-hooks-table) table. |
| `adapter` | | `generic` (`opencode-http` if `dialect=none`) | Adapter kind, resolved against the live [registry](#shipping-a-new-adapter-class-out-of-tree) at run start and by `validate` (`adapter.kind`). `generic` with `dialect = "none"` is refused. |
| `skill_tree` | | `.claude/skills` | Project-relative tree the CLI reads skills from; `init` installs the `bmad-loop-*` skills here. Must stay inside the project. |
| `prompt_template` | | `{prompt}` | Renders the canonical `/skill args` prompt. Placeholders: `{prompt}` (whole string), `{skill}` (command name, no `/`), `{args}` (the rest). |
| `launch_args` | | `[]` | Argv after `binary` (`["-i"]` keeps gemini/copilot interactive). Under `opencode-http` it precedes `serve`; `validate` warns on unservable shapes. |
| `bypass_args` | | `[]` | Permission-bypass flags for unattended runs. A policy `extra_args` replaces them; `validate` warns (`policy.bypass-dropped`) when one is dropped. |
| `model_flag` | | `--model` | Flag passed with the model name when one is configured. |
| `env` | | `{}` | `[env]` table of extra session environment variables. It cannot override the run's state-root pin. |
| `usage_parser` | | `none` | Transcript token parser: `claude-jsonl`, `codex-rollout`, `gemini-chat`, `copilot-events` or `none`. |
| `usage_grace_s` | | `0.0` | Seconds to keep polling the transcript for token totals after the session ends; `0` reads once. Must be ≥ 0. |
| `stop_without_result_nudges` | | unset | Per-profile default for Stop-without-result nudges. An `[adapter]` / `[adapter.<stage>]` value overrides it; unset inherits `[limits] stop_without_result_nudges`. Must be ≥ 0. |
| `subagent_stop_without_transcript` | | `false` | When `true`, a `Stop` with no transcript path is a subagent turn-end and is ignored. |
| `first_run_note` | | `""` | Note `init` prints about a manual first-run or auth step. |
| `seed_files` | | `[]` | Project-relative gitignored files copied into each provisioned worktree. Must stay inside the project. |
| `env_fault_patterns` | | `[]` | Regexes that classify a non-completed session as an environment fault. See [Environment-fault patterns](#environment-fault-patterns). |
| `parked_prompt_patterns` | | `[]` | Regexes matched against the visible pane at each stall-grace expiry. See [Parked-session signals](#parked-session-signals). |
| `[workspace_trust]` | | unset | The [`WorkspaceTrustSpec`](#workspacetrustspec-the-workspace_trust-table) table. Unset: nothing under `~` is read or written. |
| `session_id_flag` | | `""` | Launch flag for a caller-chosen session id (claude: `--session-id`). The generic adapter appends `[flag, uuid4]` and pins attribution to that id. |
| `subagent_transcript_dir` | | derived from `usage_parser` (`{stem}/subagents` for `claude-jsonl`, else `""`) | Subagent transcript tree beside the transcript, walked recursively and stat-only; its writes count as idle-notice activity. Must contain `{stem}` (the transcript's filename stem) and stay relative; `""` = off. |

`session_id_flag` must be one `-`-prefixed token with no whitespace or `=`, and is refused
on hookless profiles. Set it only when the CLI's `SessionStart` payload reports the id you
passed.

An overlay that changes `usage_parser` away from `claude-jsonl` must set
`subagent_transcript_dir` itself; it is refused on hookless profiles.

### `HookSpec` (the `[hooks]` table)

| Field | Required | Default | Meaning |
Expand Down
6 changes: 4 additions & 2 deletions docs/tui-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ The **agent line** names who is driving. While a session is open it reads
`agent <name> · <model> · <role>` (`model` omitted when the CLI profile's
default is used; `role` is the session's stage, such as `dev`, `review`,
`triage` or `retro`), with a yellow
`· idle <age>` once the session's transcript has been quiet past
`limits.dev_stall_grace_s`. Between sessions it shows the run's configured
`· idle <age>` once the session's transcript (and any subagent transcripts its
profile declares) has been quiet past
`limits.dev_stall_grace_s`, followed by `· in <tool>` when the session is
waiting on a tool call (`unknown` if the transcript could not be read). Between sessions it shows the run's configured
adapters from its policy snapshot. A run with no snapshot shows no agent line;
an unreadable session identity shows `agent unreadable — <fault>`.

Expand Down
Loading
Loading