Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1169956
pi-agenticoding/story-03-handoff-resume-control: add handoff settings…
grzegorznowak May 24, 2026
bf278cb
Merge branch 'main' into story-03-handoff-resume-control
grzegorznowak May 24, 2026
c267cac
docs: streamline handoff resume README guidance
grzegorznowak May 24, 2026
85879c3
fix: ignore prototype settings keys
grzegorznowak May 24, 2026
0fe3cac
docs: move handoff changes to unreleased changelog
grzegorznowak May 24, 2026
160b860
docs: avoid redundant changelog fix note
grzegorznowak May 24, 2026
575545f
fix: FB-002 distinguish ENOENT from other read errors, FB-003 catch s…
grzegorznowak May 25, 2026
a853920
fix: block unreadable global settings writes
grzegorznowak May 25, 2026
a9a3959
fix: anchor settings TUI to global resume value
grzegorznowak May 25, 2026
852a181
Merge remote-tracking branch 'origin/main' into story-03-handoff-resu…
grzegorznowak May 26, 2026
e66ab80
pi-agenticoding/03: control automatic handoff availability
grzegorznowak May 27, 2026
45dcfb8
pi-agenticoding/03: fix manual handoff availability diagnostics
grzegorznowak May 27, 2026
1041f05
pi-agenticoding/03: make manual handoff seamless
grzegorznowak May 27, 2026
3d35d41
pi-agenticoding/03: silence stale manual handoff cleanup
grzegorznowak May 27, 2026
15afdb0
Merge remote-tracking branch 'origin/main' into story-03-handoff-resu…
grzegorznowak May 27, 2026
140f8b7
pi-agenticoding/03: restore post-handoff proceed
grzegorznowak May 27, 2026
79a93d9
pi-agenticoding/03: keep changelog scoped to main diff
grzegorznowak May 27, 2026
5a3ca23
pi-agenticoding/03: guard manual handoff requests
grzegorznowak May 28, 2026
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
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Added `handoff.automaticEnabled` raw settings support with JSON boolean values. Missing settings default to automatic handoff enabled; `false` suppresses automatic handoff guidance and blocks direct agent-initiated handoff unless an explicit `/handoff <direction>` request is pending.
- 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.
- Manual `/handoff <direction>` remains available even when automatic handoff is disabled: it records the operator request, sends the handoff prompt, and lets the guarded `handoff` tool compact that requested turn.

### Fixed

- Queued manual `/handoff` follow-up prompts can no longer be preempted by an older agent turn's automatic handoff call before the generated user turn starts.
- Global `handoff.automaticEnabled` saves now write through a same-directory temporary file and rename over the target, preserving the previous settings file if replacement fails.

## [0.3.0] - 2026-05-23

### Added
Expand Down Expand Up @@ -102,12 +115,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Comprehensive test suite** — 50+ tests covering spawn execution and rendering (concurrency, cancellation, truncation, stale detection, ownership lifecycle, microtask batching), ledger tools (add/get/list, staleness, rehydration, empty states, prompt hints), handoff (tool, command, compaction), watchdog (nudge injection, enforcement), and extension lifecycle.
- **MIT licensed** — open-source permissive license.

[Unreleased]: https://github.com/agenticoding/pi-agenticoding/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/agenticoding/pi-agenticoding/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/agenticoding/pi-agenticoding/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/agenticoding/pi-agenticoding/releases/tag/v0.1.0

## [Unreleased]

### Added

- No changes yet.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ Then disable pi's built-in compaction so handoff stays in control:
}
```

That's it. Your agent now has `spawn`, `notebook_write`, `notebook_read`, `notebook_index`, and `handoff`. The status bar shows context usage and notebook count.
Optional automatic handoff availability can be changed later with `/agenticoding-settings`.

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.

---

Expand All @@ -50,7 +52,8 @@ That's it. Your agent now has `spawn`, `notebook_write`, `notebook_read`, `noteb
|---------|-------------------|
| **Context usage %** | `ctx 65%` in status bar — green < 30%, yellow < 50%, orange < 70%, red ≥ 70% |
| **Notebook count** | 📒 `3` when pages exist, dim `📒 0` when empty |
| **`/handoff` command** | Instant pivot — agent drafts brief, compacts context, resumes |
| **`/handoff` command** | Explicit manual pivot — agent drafts brief, compacts context, then Pi sends `Proceed.` in the fresh context |
| **`/agenticoding-settings` command** | TUI panel for global `handoff.automaticEnabled`, with project override warnings |
| **`/notebook` command** | Overlay showing all notebook pages with previews |
| **Auto-rehydration** | Notebook pages survive session restarts |
| **Spawn transparency** | Watch child agents work in real time in the TUI |
Expand Down Expand Up @@ -114,6 +117,20 @@ A sparse pocket notebook the agent curates while working. After discovering some

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.

By default, automatic handoff is enabled: the agent can see the `handoff` tool and may use it at context/job boundaries. After successful handoff compaction, Pi auto-sends `Proceed.` so the fresh context continues immediately; this continuation is fixed, not configurable.

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`.

```json
{
"handoff": { "automaticEnabled": false }
}
```

Settings are read from `~/.pi/agent/settings.json` and `<project>/.pi/settings.json`, with project settings overriding global settings. When automatic handoff is disabled, handoff-call guidance is removed from normal turns and direct `handoff` tool calls are rejected unless they are satisfying an explicit operator `/handoff <direction>` request. The tool remains registered; the setting is enforced by runtime guards rather than provider-schema removal.

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. Setting changes affect prompt guidance on future fresh agent turns, while direct handoff tool calls are checked against the effective setting at execution time. Edit or remove project overrides manually.

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

---
Expand Down
Loading