Create placeholder session file and add to index BEFORE running
opencode. This ensures we have a record even if opencode takes
long time or times out. Update with real session ID after fork.
The --fork flag outputs the new session ID. Parse that instead of
relying on session list which may return wrong session when multiple
exist. Added fallback to session list parsing.
- Add --debug flag to start/resume for verbose opencode output
- Use stdbuf -oL to unbuffer stdout for real-time display
- Capture debug logs to ~/.kugetsu/sessions/<id>/debug.log
- Add --debug to stop/destroy for viewing logs before actions
- Position-agnostic flag parsing (--debug can appear anywhere in args)
- skills/kugetsu/SKILL.md: Agent skill documentation following agentskills.io spec
- skills/kugetsu/scripts/kugetsu: Shell wrapper for opencode session management
- Commands: start, list [--all], resume, stop, help
- State tracking: used → idle (graceful) or left (interrupted)
- Auto-fill message on resume
- Confirmation prompt when resuming used session
- skills/kugetsu/scripts/kugetsu-install.sh: Installation script for users
Implements Phase 1 of issue #11 - basic session management layer
for remote agent control without Hermes dependency.
- Installation via curl script (with --skip-setup for CI)
- API key configuration for 9+ LLM providers
- OpenCode delegation via terminal() wrapper pattern
- Git worktree isolation per-issue workflow
- Reference to existing opencode-worktree skill
Related to issue #1
Document:
- How to detect contamination via git log and branch --contains
- Prevention with explicit base: git checkout -b new-branch main
- Fix using git rebase --onto
- Force push with --force-with-lease for safety
Addresses Issue #1 comment 281
- Adds skills/opencode-worktree/ with SKILL.md and opencode-worktree.sh
- Creates unique git worktree per session (e.g. session-20260327-a1b2c3-refactor-auth)
- Cleans up stale worktrees on every launch
- Branch always based on main
- User can source directly or copy to PATH
This tool tests the practical limits of parallel agent execution
by spawning N concurrent opencode run tasks and measuring:
- Response time
- CPU and memory usage
- Success/failure rates
Includes both bash (run_test.sh) and Python (parallel_capacity_test.py)
implementations with full metrics collection and reporting.
Fixes#3