Skip to main content
The gateway bounds every git and shell command it runs, so a child stuck on a credential prompt or a lock can never freeze your WebSocket clients, bots, or heartbeat.

Quick Start

1

Default posture — nothing to configure

The guard is already applied inside the gateway. Every git command the kanban dispatcher runs, plus the macOS and Windows startup probes, are bounded automatically. An agent that queues kanban work needs no code change — the guard wraps the dispatcher’s git calls for you.
2

Operator tuning — raise the ceilings

Export the two environment variables to widen the timeouts for a legitimately slow repo. Both are read fresh on each call.

How It Works

On timeout the guard kills the whole process group, reaps whatever output exists, and returns a CompletedProcess with returncode=124 — never an exception. Two layers of defence work together:

Configuration Options

Two operator-tunable environment variables control the ceilings.

Diagnostic Messages

The guard decodes why a child stalled and writes it to stderr, so you can act without reading source.

Adopted Call Sites

The guard already wraps every gateway path that shells out.

User-Visible Behaviour Change

The create_task git probe now downgrades a slow path instead of hanging — but that means it no longer auto-enables worktree isolation for it. When a task is linked to a git repo, kanban auto-upgrades it to workspace_kind="worktree". The one exception: if the git rev-parse --is-inside-work-tree probe times out (15 s), the task is created in the shared workspace rather than an isolated worktree, and the gateway log records:
Grep for Timed out probing to catch NFS- or lock-contended paths that quietly lost isolation.
On timeout the guard kills the whole process group (POSIX killpg, Windows taskkill /T /F), so a git credential helper the command spawned cannot outlive the timeout and keep the output pipe open. This is why the guard is safer than subprocess.run(timeout=...) alone, which only kills the direct child.
Callers extending the wrapper can pass interactive=True to skip stdin redirection and env layering for a command that must reach a terminal. The timeout and group-kill still apply.

Best Practices

The 300 s git ceiling already tolerates worktree add and merge on large repos. Only raise PRAISONAI_KANBAN_GIT_TIMEOUT after you observe a legitimately-slow git op hitting the limit.
The guard ignores unusable overrides and falls back to the built-in default. Setting PRAISONAI_KANBAN_GIT_TIMEOUT=0 does not disable the guard — it silently uses 300 s.
Watch gateway logs for Timed out probing to catch NFS or lock-contended paths whose create_task git probe timed out and fell back to the shared workspace.

Gateway Reliability

Backpressure, retries, and failure handling on the gateway

Kanban Worktree Isolation

Per-task git worktrees and the timeout ceiling

Gateway

Kanban dispatcher and gateway internals

Workspace Isolation

Isolating agent file operations per run