From a6f7c045bc83a19bc9dc1ac0b32b256f9c900d9c Mon Sep 17 00:00:00 2001 From: Godopu Date: Sun, 21 Jun 2026 06:08:49 +0000 Subject: [PATCH] feat(delegate-job): bump default --timeout 600s -> 3600s (1h wall-clock budget) Changed 11 locations across 5 files: - scripts/registry.py: timeout_sec dataclass default + argparse default - scripts/job_subscriber.py: help text + fallback default - SKILL.md: 4 recommended invocation examples - registry.md: JSON example + CLI example - tmux-agent-orchestrate-delegate-job: bash wrapper TIMEOUT var --idle-timeout 120s preserved unchanged. Rationale: 10min default was too short for deep analysis / multi-file generation tasks; 1h aligns with long-running agent delegation patterns. --- skills/tmux-agent-orchestrate-delegate-job/SKILL.md | 8 ++++---- skills/tmux-agent-orchestrate-delegate-job/registry.md | 4 ++-- .../scripts/job_subscriber.py | 4 ++-- .../scripts/registry.py | 4 ++-- .../tmux-agent-orchestrate-delegate-job | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/skills/tmux-agent-orchestrate-delegate-job/SKILL.md b/skills/tmux-agent-orchestrate-delegate-job/SKILL.md index 2cf660b..b55ce69 100644 --- a/skills/tmux-agent-orchestrate-delegate-job/SKILL.md +++ b/skills/tmux-agent-orchestrate-delegate-job/SKILL.md @@ -78,7 +78,7 @@ tmux-agent-orchestrate-delegate-job submit \ --prompt "정렬 문제 10개를 만들어 sort_problems.md로 저장" \ --workdir /path/to/project \ --agent-session tmux:demo \ - --timeout 600 --idle-timeout 120 + --timeout 3600 --idle-timeout 120 # → stdout: registered job: # subscriber pid: … # agent launched in tmux session: demo @@ -107,10 +107,10 @@ SKILL=./skills/tmux-agent-orchestrate-delegate-job/scripts # 1) register JID=$($PY "$SKILL/registry.py" register \ --prompt "…" --agent claude-code --agent-session tmux:demo \ - --timeout 600 --idle-timeout 120) + --timeout 3600 --idle-timeout 120) # 2) START THE SUBSCRIBER FIRST (MQTT does not queue non-retained msgs) -$PY "$SKILL/job_subscriber.py" --job "$JID" --timeout 600 --idle-timeout 120 & +$PY "$SKILL/job_subscriber.py" --job "$JID" --timeout 3600 --idle-timeout 120 & # 3) pass JID to the agent and instruct it to publish events with --job "$JID" # (don't hard-code a job id you saw earlier — see Pitfall §"Wrong job_id") @@ -267,7 +267,7 @@ subscribe-first + run-agent + validate: ```bash tmux-agent-orchestrate-delegate-job submit --agent claude-code \ --prompt "정렬 문제 10개를 만들어 sort_problems.md로 저장" \ - --workdir /path/to/project --timeout 600 [--validate ./validate.sh] + --workdir /path/to/project --timeout 3600 [--validate ./validate.sh] tmux-agent-orchestrate-delegate-job status --job # one record, pretty-printed tmux-agent-orchestrate-delegate-job list # all jobs, one line each tmux-agent-orchestrate-delegate-job verify --job --validate ./validate.sh # runs it, reports exit code diff --git a/skills/tmux-agent-orchestrate-delegate-job/registry.md b/skills/tmux-agent-orchestrate-delegate-job/registry.md index b278685..8d2ef67 100644 --- a/skills/tmux-agent-orchestrate-delegate-job/registry.md +++ b/skills/tmux-agent-orchestrate-delegate-job/registry.md @@ -46,7 +46,7 @@ Reference implementation: [`./scripts/registry.py`](./scripts/registry.py) "password": null }, "topic_prefix": "python/mqtt/jobs/abc12345", - "timeout_sec": 600, + "timeout_sec": 3600, "idle_timeout_sec": 120, "expected_artifacts": ["sort_problems.md"], "last_seq": 0, @@ -127,7 +127,7 @@ SQLite transaction when you migrate. ```bash PY=.venv/bin/python $PY scripts/registry.py register --prompt "…" --agent claude-code \ - --agent-session tmux:claude --timeout 600 --idle-timeout 120 # → prints job_id + --agent-session tmux:claude --timeout 3600 --idle-timeout 120 # → prints job_id $PY scripts/registry.py list # human table $PY scripts/registry.py list --json # full records $PY scripts/registry.py get --job # one record diff --git a/skills/tmux-agent-orchestrate-delegate-job/scripts/job_subscriber.py b/skills/tmux-agent-orchestrate-delegate-job/scripts/job_subscriber.py index f8f596b..a431971 100755 --- a/skills/tmux-agent-orchestrate-delegate-job/scripts/job_subscriber.py +++ b/skills/tmux-agent-orchestrate-delegate-job/scripts/job_subscriber.py @@ -123,7 +123,7 @@ def main(argv=None) -> int: target.add_argument("--wait-any", action="store_true", help="watch every pending/running job in the registry") parser.add_argument("--timeout", type=float, default=None, - help="wall-clock budget in seconds (default: job.timeout_sec or 600)") + help="wall-clock budget in seconds (default: job.timeout_sec or 3600)") parser.add_argument("--idle-timeout", type=float, default=None, help="max seconds with no new event (default: job.idle_timeout_sec or 120)") parser.add_argument("--expect-retention", action="store_true", @@ -148,7 +148,7 @@ def main(argv=None) -> int: # Resolve timeouts from CLI, falling back to the (first) job's settings. base_job = jobs[0] - wall_timeout = args.timeout if args.timeout is not None else float(base_job.get("timeout_sec", 600)) + wall_timeout = args.timeout if args.timeout is not None else float(base_job.get("timeout_sec", 3600)) idle_timeout = args.idle_timeout if args.idle_timeout is not None else float(base_job.get("idle_timeout_sec", 120)) # All watched jobs share a broker in practice; connect using the first diff --git a/skills/tmux-agent-orchestrate-delegate-job/scripts/registry.py b/skills/tmux-agent-orchestrate-delegate-job/scripts/registry.py index 4f4248a..7bf6b6d 100755 --- a/skills/tmux-agent-orchestrate-delegate-job/scripts/registry.py +++ b/skills/tmux-agent-orchestrate-delegate-job/scripts/registry.py @@ -52,7 +52,7 @@ def register_job( agent: str = "claude-code", agent_session: str = "tmux:claude", broker: Optional[Dict[str, Any]] = None, - timeout_sec: int = 600, + timeout_sec: int = 3600, idle_timeout_sec: int = 120, registry_dir: str = DEFAULT_REGISTRY_DIR, job_id: Optional[str] = None, @@ -187,7 +187,7 @@ def _build_parser() -> argparse.ArgumentParser: p_reg.add_argument("--prompt", required=True) p_reg.add_argument("--agent", default="claude-code") p_reg.add_argument("--agent-session", default="tmux:claude") - p_reg.add_argument("--timeout", type=int, default=600) + p_reg.add_argument("--timeout", type=int, default=3600) p_reg.add_argument("--idle-timeout", type=int, default=120) p_reg.add_argument("--bits", type=int, default=32, help="32 (PoC) or 128 (prod)") p_reg.add_argument("--artifact", action="append", default=[], dest="artifacts") diff --git a/skills/tmux-agent-orchestrate-delegate-job/tmux-agent-orchestrate-delegate-job b/skills/tmux-agent-orchestrate-delegate-job/tmux-agent-orchestrate-delegate-job index f17e3c4..cb20253 100755 --- a/skills/tmux-agent-orchestrate-delegate-job/tmux-agent-orchestrate-delegate-job +++ b/skills/tmux-agent-orchestrate-delegate-job/tmux-agent-orchestrate-delegate-job @@ -57,7 +57,7 @@ EOF # ---- arg parsing helpers -------------------------------------------------- AGENT="claude-code"; PROMPT=""; WORKDIR="$(pwd)"; AGENT_SESSION="tmux:claude" -TIMEOUT=600; IDLE_TIMEOUT=120; VALIDATE=""; DRY_RUN=0 +TIMEOUT=3600; IDLE_TIMEOUT=120; VALIDATE=""; DRY_RUN=0 JOB_ID=""; REGISTRY_DIR="$REGISTRY_DIR_DEFAULT" parse_opts() {