Skip to content

Commit e66ab80

Browse files
committed
pi-agenticoding/03: control automatic handoff availability
1 parent 852a181 commit e66ab80

12 files changed

Lines changed: 492 additions & 230 deletions

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12-
- **Breaking:** handoff now defaults to waiting after compaction instead of auto-sending `Proceed.`. Users who want auto-resume can opt in with `/agenticoding-settings` or with `"handoff": { "resumeBehavior": "proceed" }` in `~/.pi/agent/settings.json` or `<project>/.pi/settings.json`.
13-
- Added `handoff.resumeBehavior` settings support with supported values `"wait"` (default) and `"proceed"`; unsupported values and invalid settings JSON fail safe to `wait` with a warning diagnostic.
14-
- Added the extension-owned `/agenticoding-settings` TUI panel for handoff resume behavior. TUI saves are global-only to `~/.pi/agent/settings.json`, preserve unrelated settings keys, and visibly warn when a project override masks the global value.
12+
- **Breaking:** handoff no longer auto-sends `Proceed.` after compaction and no longer supports configurable auto-resume. The superseded `handoff.resumeBehavior` (`"wait"`/`"proceed"`) setting is ignored.
13+
- Added `handoff.automaticEnabled` raw settings support with JSON boolean values. Missing settings default to automatic handoff enabled; `false` removes the agent-facing handoff tool and handoff-call guidance during normal turns while preserving explicit `/handoff <direction>`.
14+
- Added the extension-owned `/agenticoding-settings` TUI panel for automatic handoff availability. TUI saves are global-only to `~/.pi/agent/settings.json`, preserve unrelated settings keys, persist real booleans, and visibly warn when a project override masks the global value.
1515

1616
## [0.3.0] - 2026-05-23
1717

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Then disable pi's built-in compaction so handoff stays in control:
4040
}
4141
```
4242

43-
Optional handoff resume preferences can be changed later with `/agenticoding-settings`.
43+
Optional automatic handoff availability can be changed later with `/agenticoding-settings`.
4444

4545
That's it. Your agent now has `spawn`, `notebook_write`, `notebook_read`, `notebook_index`, `handoff`, and `/agenticoding-settings`. The status bar shows context usage and notebook count.
4646

@@ -52,8 +52,8 @@ That's it. Your agent now has `spawn`, `notebook_write`, `notebook_read`, `noteb
5252
|---------|-------------------|
5353
| **Context usage %** | `ctx 65%` in status bar — green < 30%, yellow < 50%, orange < 70%, red ≥ 70% |
5454
| **Notebook count** | 📒 `3` when pages exist, dim `📒 0` when empty |
55-
| **`/handoff` command** | Instant pivot — agent drafts brief, compacts context, waits for next input (configurable auto-resume) |
56-
| **`/agenticoding-settings` command** | TUI panel for global handoff resume behavior, with project override warnings |
55+
| **`/handoff` command** | Explicit manual pivot — agent drafts brief, compacts context, then waits for your next input |
56+
| **`/agenticoding-settings` command** | TUI panel for global `handoff.automaticEnabled`, with project override warnings |
5757
| **`/notebook` command** | Overlay showing all notebook pages with previews |
5858
| **Auto-rehydration** | Notebook pages survive session restarts |
5959
| **Spawn transparency** | Watch child agents work in real time in the TUI |
@@ -117,15 +117,21 @@ A sparse pocket notebook the agent curates while working. After discovering some
117117

118118
When context degrades or the job changes, the agent saves reusable state to the notebook, writes a focused brief preserving what's still missing, and restarts clean. The new context starts with the brief front-and-center, all notebook pages accessible, and zero noise.
119119

120-
By default, handoff waits after compaction for your next input. To auto-resume, set `handoff.resumeBehavior` to `"proceed"`; valid values are `"wait"` and `"proceed"`.
120+
By default, automatic handoff is enabled: the agent can see the `handoff` tool and may use it at context/job boundaries. Handoff completion always waits for your next explicit input; there is no configurable auto-`Proceed.` behavior.
121+
122+
To make handoff human-driven only, set `handoff.automaticEnabled` to `false` in raw Pi settings JSON. Supported persisted values are JSON booleans `true` and `false`; missing settings default to `true`.
121123

122124
```json
123125
{
124-
"handoff": { "resumeBehavior": "proceed" }
126+
"handoff": { "automaticEnabled": false }
125127
}
126128
```
127129

128-
Run `/agenticoding-settings` to change this from the TUI. It saves global-only to `~/.pi/agent/settings.json`; project `.pi/settings.json` values still override global settings, and the panel warns when an override is active.
130+
Settings are read from `~/.pi/agent/settings.json` and `<project>/.pi/settings.json`, with project settings overriding global settings. When automatic handoff is disabled, the agent-facing `handoff` tool and handoff-call guidance are removed from normal turns. The explicit operator command `/handoff <direction>` still works: it temporarily enables the tool for that requested handoff, compacts, restores the disabled state, and then waits for your next input.
131+
132+
Run `/agenticoding-settings` to change the global value from the TUI. It saves global-only to `~/.pi/agent/settings.json`, preserves unrelated JSON keys, shows the effective runtime value separately, and warns when a project override masks the global value. Edit or remove project overrides manually.
133+
134+
Migration note: the superseded PR-only `handoff.resumeBehavior` (`"wait"`/`"proceed"`) setting is ignored and cannot trigger automatic continuation. Remove it when convenient.
129135

130136
**Rule of thumb:** The notebook holds reusable learned knowledge. Handoff carries the remaining situational context.
131137

0 commit comments

Comments
 (0)