
Why Your OpenCode Skill Shows No Output (And How to Fix It)
Why Your OpenCode Skill Shows No Output (And How to Fix It) TL;DR: OpenCode’s run mode captures subprocess stdout and only returns it after the command finishes. If your skill launches a long-running pipeline, the user sees nothing for minutes — or hours. The fix: write a plain-text progress log that users can tail -f from a second terminal. The 30-Second Fix If you just want the solution: from datetime import datetime from pathlib import Path def log_progress(output_folder: str, msg: str) -> None: log_path = Path(output_folder) / "progress.log" log_path.parent.mkdir(parents=True, exist_ok=True) with open(log_path, "a") as f: f.write(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}\n") f.flush() # Critical for tail -f! Then tell users: tail -f <output>/progress.log ...