/gws-debug
Diagnose a failing GWS service. Type /gws-debug inside your AI agent and it will work through a mechanical 8-step runbook from automated signals to targeted inspection to fix.
When to use it
- A service is crashing (
CrashLoopBackOff,ImagePullBackOff, etc.) - A pod is
Runningbut the URL doesn't respond - File-sync is stuck (
Halted*) /gws-statusflagged something aspartialordown- Restart count is climbing and you want to know why
The runbook
- Programmatic diagnosis —
gws doctor --json [--service <svc>]. Each finding has afixfield with the exact remediation. Unambiguous fixes (USER directive, distroless base, port mismatch, localhost bind) are applied directly to.gws/services/<svc>/artifacts andgws rebuild <svc>is run. - Pod-level signals —
gws status --jsonto identify which service to drill into. - Container logs —
gws logs <svc>andgws logs -f <svc>, matched against a catalog of known error signatures (EADDRINUSE,ECONNREFUSED, missing module, etc.). - Exec into the pod —
gws exec <svc>to inspect the running process, env vars, mounted secrets, and filesystem. - File-sync session state — checks the SSH sidecar and rsync state; reset with
gws down -y && gws up -yif halted. - URL probe —
curlthe gateway-routed URL; mismatches betweengws.jsonport, containerEXPOSE, and probe ports are flagged. - Apply fix — edits the relevant
.gws/services/<svc>/Dockerfileork8s/deployment.yaml, then runsgws rebuild <svc>. - Escalate — if the fix attempt count exceeds the cap, the skill stops and surfaces the diagnosis with everything it learned, so you can take over.
When to invoke directly vs. let /gws-up chain into it
/gws-upwill hand off to/gws-debugautomatically if its post-deploy verification fails.- Invoke
/gws-debugdirectly when the environment is already up but a service has gone unhealthy mid-session, or when/gws-statusflags something.
See also
/gws-status— read-only diagnosis without applying fixes/gws-up— chains into/gws-debugon validation failuregws doctor,gws logs,gws exec,gws rebuild— underlying CLI commands