mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-14 03:31:58 +08:00
feat: add session resume support and improve output format
- Support session_id in parallel task config for resuming failed tasks - Change output format from JSON to human-readable text - Add helper functions (hello, greet, farewell) with tests - Clean up code formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -206,17 +206,36 @@ EOF
|
||||
- `id: <task-id>`: Required, unique task identifier
|
||||
- `workdir: <path>`: Optional, working directory (default: `.`)
|
||||
- `dependencies: <id1>, <id2>`: Optional, comma-separated task IDs
|
||||
- `session_id: <uuid>`: Optional, resume a previous session
|
||||
- `---CONTENT---`: Separates metadata from task content
|
||||
- Task content: Any text, code, special characters (no escaping needed)
|
||||
|
||||
**Output**: JSON with results and summary
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{"task_id": "T1", "exit_code": 0, "message": "...", "session_id": "...", "error": ""}
|
||||
],
|
||||
"summary": {"total": 3, "success": 3, "failed": 0}
|
||||
}
|
||||
**Resume Failed Tasks**:
|
||||
```bash
|
||||
# Use session_id from previous output to resume
|
||||
codex-wrapper --parallel - <<'EOF'
|
||||
---TASK---
|
||||
id: T2
|
||||
session_id: 019xxx-previous-session-id
|
||||
---CONTENT---
|
||||
fix the previous error and retry
|
||||
EOF
|
||||
```
|
||||
|
||||
**Output**: Human-readable text format
|
||||
```
|
||||
=== Parallel Execution Summary ===
|
||||
Total: 3 | Success: 2 | Failed: 1
|
||||
|
||||
--- Task: T1 ---
|
||||
Status: SUCCESS
|
||||
Session: 019xxx
|
||||
|
||||
Task output message...
|
||||
|
||||
--- Task: T2 ---
|
||||
Status: FAILED (exit code 1)
|
||||
Error: some error message
|
||||
```
|
||||
|
||||
**Features**:
|
||||
|
||||
Reference in New Issue
Block a user