main · last commit
13 days ago ·
7g0stsfu
ah-0ge.3 Resume parent via pi --session with child results as a new attempt
Past Stand
bd reopen ah-0ge.3
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-07-17T14:38:04Z |
| Updated | 2026-07-17T19:05:05Z |
| Closed | 2026-07-17T19:05:05Z |
Closes the loop: X comes back from Blocked and continues WITH its original context rather than starting cold. runs.pi_session_id is already a column in internal/store/schema.sql and pi supports --session <path|id> (0.73.1, also --session-dir), so this is mostly plumbing — but two things need care. (1) Session survival: X's pi session must outlive the park. Pin --session-dir explicitly rather than relying on a default location, and confirm X's worktree is not reclaimed while parked. (2) Result transfer contract: Y's output has to serialize out of Y's run, through the board, and into X's resume prompt. Needs a defined shape and a size bound — in-process subagents return text into the parent's context for free, this path does not.
Resume is a NEW attempt on X (runs table already keys on (task_id, attempt)), so watchdog/cost/event plumbing is unchanged. Prompt gets an extra rendered section carrying each child's role + result.
X resumes after its children finish, its pi session id is unchanged across the park, the new attempt shows the children's results in the rendered prompt, and an oversized child result is truncated rather than breaking the resume.
COUPLING (2026-07-17): inseparable from ah-0ge.2's behavioral join — see ah-0ge.2 notes. 'Unblock' is only correct as this resume-with-context, else the parent re-runs from scratch and re-spawns children (infinite re-delegation). Recommend implementing ah-0ge.2 (remaining join) + ah-0ge.3 as one unit, starting by promoting 'blocked' to a real domain.State. Lineage foundation (task_parents, ChildIDsOf) already landed under ah-0ge.2.
Nothing depends on this issue.
ah-0ge.2
— Parent auto-Block/unblock join on child completion
blocks
closed
ah-0ge.1
— Agent-created tasks via .task/tasks.json file channel
blocks
closed
ah-0ge
— Stage 4: agent tools API, question loop, AgentsView links
parent-child
closed
ah-9r4
— DECISION: worktree/branch topology for agent-created child tasks
blocks
closed
| id | ah-0ge.3 |
| content_hash | 5ba4f4620f3f376c331035f6bea0224fc91e067c39719445c159cae5b8477312 |
| title | Resume parent via pi --session with child results as a new attempt |
| description | Closes the loop: X comes back from Blocked and continues WITH its original context rather than starting cold. runs.pi_session_id is already a column in internal/store/schema.sql and pi supports --session <path|id> (0.73.1, also --session-dir), so this is mostly plumbing — but two things need care. (1) Session survival: X's pi session must outlive the park. Pin --session-dir explicitly rather than relying on a default location, and confirm X's worktree is not reclaimed while parked. (2) Result transfer contract: Y's output has to serialize out of Y's run, through the board, and into X's resume prompt. Needs a defined shape and a size bound — in-process subagents return text into the parent's context for free, this path does not. |
| design | Resume is a NEW attempt on X (runs table already keys on (task_id, attempt)), so watchdog/cost/event plumbing is unchanged. Prompt gets an extra rendered section carrying each child's role + result. |
| acceptance_criteria | X resumes after its children finish, its pi session id is unchanged across the park, the new attempt shows the children's results in the rendered prompt, and an oversized child result is truncated rather than breaking the resume. |
| notes | COUPLING (2026-07-17): inseparable from ah-0ge.2's behavioral join — see ah-0ge.2 notes. 'Unblock' is only correct as this resume-with-context, else the parent re-runs from scratch and re-spawns children (infinite re-delegation). Recommend implementing ah-0ge.2 (remaining join) + ah-0ge.3 as one unit, starting by promoting 'blocked' to a real domain.State. Lineage foundation (task_parents, ChildIDsOf) already landed under ah-0ge.2. |
| status | closed |
| priority | 3 |
| issue_type | feature |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-07-17T14:38:04Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-07-17T19:05:05Z |
| closed_at | 2026-07-17T19:05:05Z |
| closed_by_session | |
| external_ref | NULL |
| spec_id | |
| compaction_level | 0 |
| compacted_at | NULL |
| compacted_at_commit | NULL |
| original_size | NULL |
| sender | |
| ephemeral | 0 |
| wisp_type | |
| pinned | 0 |
| is_template | 0 |
| mol_type | |
| work_type | |
| source_system | |
| metadata | �{} |
| source_repo | |
| close_reason | Block→wait→resume join implemented and tested together: blocked promoted to a real state; delegating parents park in Blocked and resume as a new attempt (in-worktree + resume prompt) once all children reach a terminal bucket. Decisions honored (child-done=In Review; partial-failure=resume-and-report with lifetime-capped retry). Full suite + e2e green. |
| event_kind | |
| actor | |
| target | |
| payload | |
| await_type | |
| await_id | |
| timeout_ns | 0 |
| waiters | |
| hook_bead | |
| role_bead | |
| agent_state | |
| last_activity | NULL |
| role_type | |
| rig | |
| due_at | NULL |
| defer_until | NULL |
| no_history | 0 |
| started_at | NULL |
| is_blocked | 0 |
| id | 37350a43-d1cf-589c-ad21-f1a995e71e61 |
| issue_id | ah-0ge.3 |
| type | blocks |
| created_at | 2026-07-17T17:38:40Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-0ge.2 |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | 4d47ace9-323a-5735-a20b-fb74dd00831b |
| issue_id | ah-0ge.3 |
| type | parent-child |
| created_at | 2026-07-17T17:38:03Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-0ge |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | 019f7083-5885-7e92-a147-d910eb244507 |
| issue_id | ah-0ge.3 |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-07-17T17:38:03Z |
| id | 019f7138-3740-71ec-b759-20a6fadd8286 |
| issue_id | ah-0ge.3 |
| event_type | updated |
| actor | Eugene Blikh |
| old_value | {"id":"ah-0ge.3","title":"Resume parent via pi --session with child results as a new attempt","description":"Closes the loop: X comes back from Blocked and continues WITH its original context rather than starting cold. runs.pi_session_id is already a column in internal/store/schema.sql and pi supports --session \u003cpath|id\u003e (0.73.1, also --session-dir), so this is mostly plumbing — but two things need care.\n(1) Session survival: X's pi session must outlive the park. Pin --session-dir explicitly rather than relying on a default location, and confirm X's worktree is not reclaimed while parked.\n(2) Result transfer contract: Y's output has to serialize out of Y's run, through the board, and into X's resume prompt. Needs a defined shape and a size bound — in-process subagents return text into the parent's context for free, this path does not.","design":"Resume is a NEW attempt on X (runs table already keys on (task_id, attempt)), so watchdog/cost/event plumbing is unchanged. Prompt gets an extra rendered section carrying each child's role + result.","acceptance_criteria":"X resumes after its children finish, its pi session id is unchanged across the park, the new attempt shows the children's results in the rendered prompt, and an oversized child result is truncated rather than breaking the resume.","status":"open","priority":3,"issue_type":"feature","owner":"bigbes@gmail.com","created_at":"2026-07-17T14:38:04Z","created_by":"Eugene Blikh","updated_at":"2026-07-17T14:38:04Z"} |
| new_value | {"notes":"COUPLING (2026-07-17): inseparable from ah-0ge.2's behavioral join — see ah-0ge.2 notes. 'Unblock' is only correct as this resume-with-context, else the parent re-runs from scratch and re-spawns children (infinite re-delegation). Recommend implementing ah-0ge.2 (remaining join) + ah-0ge.3 as one unit, starting by promoting 'blocked' to a real domain.State. Lineage foundation (task_parents, ChildIDsOf) already landed under ah-0ge.2."} |
| comment | NULL |
| created_at | 2026-07-17T20:55:37Z |
| id | 019f7177-cfd5-7641-8d4d-068b0d5d7342 |
| issue_id | ah-0ge.3 |
| event_type | closed |
| actor | Eugene Blikh |
| old_value | |
| new_value | Block→wait→resume join implemented and tested together: blocked promoted to a real state; delegating parents park in Blocked and resume as a new attempt (in-worktree + resume prompt) once all children reach a terminal bucket. Decisions honored (child-done=In Review; partial-failure=resume-and-report with lifetime-capped retry). Full suite + e2e green. |
| comment | NULL |
| created_at | 2026-07-17T22:05:05Z |
| id | 019f7cda-9636-75b1-95d5-9b1265aaaf8c |
| issue_id | ah-0ge.3 |
| event_type | label_added |
| actor | Eugene Blikh |
| old_value | NULL |
| new_value | NULL |
| comment | Added label: milestone:stage-4 |
| created_at | 2026-07-20T03:08:47Z |
| id | 019f7cdc-201e-7df2-9eb8-695bd5618b15 |
| issue_id | ah-0ge.3 |
| event_type | label_removed |
| actor | Eugene Blikh |
| old_value | NULL |
| new_value | NULL |
| comment | Removed label: milestone:stage-4 |
| created_at | 2026-07-20T03:10:28Z |
No comments.
Close reason