code-yeongyu / code-yeongyu/oh-my-openagent
[Feature]: Allow Sisyphus-Junior to return task nodes to child processes mid-execution
- Dominant language
- TypeScript
- Stars
- 69.2k
- Forks
- 5.7k
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 620
Description
### Prerequisites
- [x] I will write this issue in English (see our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy))
- [x] I have searched existing issues and discussions to avoid duplicates
- [x] This feature request is specific to oh-my-opencode (not OpenCode core)
- [x] I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme) or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
### Problem Description
Currently, when Sisyphus-Junior is delegated a task via `delegate_task()` or category-based routing, there is no mechanism for the subagent to return control to a specific task node mid-execution. This creates several workflow limitations:
1. **No granular task handoff** - Once a task is delegated, Sisyphus-Junior must complete it entirely before returning control
2. **Inefficient for complex workflows** - Multi-stage tasks requiring parent agent review/approval at intermediate checkpoints cannot be properly orchestrated
3. **Limited error recovery** - If Sisyphus-Junior encounters a blocker mid-task, there's no structured way to return to a specific task node for parent agent intervention
4. **No progress checkpointing** - Parent agent cannot resume from specific task nodes after interruption
### Proposed Solution
Implement a **task node return mechanism** for Sisyphus-Junior that allows:
#### 1. Return to Specific Task Node
```typescript
// New API for Sisyphus-Junior
return_task_node({
nodeId: "task-3.2", // Specific task node identifier
status: "blocked" | "needs_review" | "partial_complete",
reason: "Requires parent agent approval for API key configuration",
partialResults: { ... } // Optional: progress data to preserve
})
```
#### 2. Parent Agent Resume Hook
- Parent agent receives notification when Sisyphus-Junior returns a task node
- Parent can review, modify, or approve before resuming
- Task state is preserved at the returned node
#### 3. Checkpoint State Management
- Save task execution state at return point
- Allow parent agent to modify task parameters before resuming
- Maintain audit trail of return/resume events
### Alternatives Considered
_No response_
### Doctor Output (Optional)
```shell
```
### Additional Context
This issue was submitted by a human and organized by AI. There may be some omissions; please feel free to provide feedback.
### Feature Type
Other
### Contribution
- [ ] I'm willing to submit a PR for this feature
- [ ] I can help with testing
- [ ] I can help with documentation
Contributor guide
Assessment
This issue has not been assessed yet.