Skip to content

Provider Runtimes

Wardian provides one orchestration layer over four supported CLI providers: Gemini CLI, Claude Code, Codex, and OpenCode. Each provider keeps its native command-line behavior, while Wardian adapts session identity, working roots, skill discovery, status tracking, and workflow execution into a consistent app model.

Overview

ProviderSupportWorking RootInstruction SourceSkill and Context ModelSession Identity
Gemini CLISupportedReal target workspaceGEMINI.mdWardian include roots passed through --include-directories; Gemini patch enables multi-root skill discoveryDiscovered from provider output
Claude CodeSupportedReal target workspaceCLAUDE.md--add-dir instruction roots plus .claude/skills links to Wardian-managed skillsWardian assigns fresh session IDs and resumes explicitly
CodexSupportedReal target workspace via --cdAGENTS.mdPer-agent CODEX_HOME habitat with scoped skill projectionDiscovered during bootstrap, then adopted into the final habitat
OpenCodeSupportedReal target workspaceAGENTS.md plus injected runtime configOPENCODE_CONFIG adds Wardian instructions; OPENCODE_CONFIG_DIR exposes projected skillsDiscovered from JSON events and resumed with --session

Shared Runtime Model

  • The Rust backend is the source of truth for process lifecycle, provider session IDs, PTY ownership, and status telemetry.
  • Regular visible agents use the global session policy unless the agent has an explicit override.
  • Workflow Agent nodes choose one run mode: ephemeral, inherit_fresh, or inherit_resume.
  • Wardian keeps user repositories clean by adapting provider-native discovery instead of copying agent-specific instruction and skill files into the project root.

Gemini CLI (@google/gemini-cli)

Gemini runs directly in the real target workspace.

Instruction and Skill Discovery

Gemini reads GEMINI.md. Wardian passes common, class, and agent include roots through --include-directories. The Gemini skill patch lets the CLI discover skills from those additional roots rather than only from the global or project-local Gemini skill folders.

Session and Status Handling

Wardian learns Gemini session identity from provider output and parses Gemini stream events into lifecycle states such as initialization, user input, generation, and turn completion. Workflow execution uses these structured turn-completion signals instead of waiting for fragile terminal text.

Debug First

If Gemini misses Wardian-managed skills, check the Gemini patch state and include roots before changing workspace or workflow logic.

Claude Code (@anthropic-ai/claude-code)

Claude runs directly in the real target workspace.

Instruction and Skill Discovery

Claude reads CLAUDE.md. Wardian enables additional-directory discovery and maintains .claude/skills links where needed so Claude can see Wardian-managed common, class, and agent skills without those files living in the repository root.

Session and Status Handling

Wardian assigns fresh Claude session IDs up front and uses explicit resume flags for resumed provider sessions. Claude permission requests are captured through a generated hook under the Wardian agent directory, which lets the UI surface Action Needed with request details.

Debug First

If Claude appears blocked, inspect the permission hook output, CLAUDE.md discovery, and resume flags before treating the issue as a generic PTY failure.

Codex (@openai/codex)

Codex executes against the real target workspace while Wardian keeps mutable provider state in an agent habitat.

Instruction and Skill Discovery

Codex reads AGENTS.md. Wardian passes the real project root with --cd <absolute-workspace-path> and projects assigned skills into the agent-specific CODEX_HOME/skills tree. This keeps skill scope per agent while preserving Codex trust and command execution against the actual repository path.

Session and Status Handling

Codex session IDs are discovered after launch. Wardian starts fresh sessions with a temporary bootstrap CODEX_HOME, parses the provider session ID, creates the final per-agent habitat, and migrates session artifacts there. Status tracking uses Codex thread and turn events, approval requests, command events, and completion markers.

Debug First

If Codex behaves unexpectedly, separate the checks: did it discover the skill, did it trust the real workspace, and did the sandbox allow the command to run?

OpenCode (opencode)

OpenCode runs directly in the real target workspace and consumes AGENTS.md natively.

Instruction and Skill Discovery

Wardian injects provider runtime configuration through a generated OPENCODE_CONFIG file and runtime config directory. The config adds extra Wardian instruction files to instructions, and OPENCODE_CONFIG_DIR exposes projected common, class, and agent skills without repository-local copies.

Session and Status Handling

Wardian discovers OpenCode session IDs from JSON events emitted by opencode run --format json, then uses --session <session_id> for resumes and headless follow-up runs. Interactive terminal telemetry is supported, with provider-specific output cleanup for TUI rendering behavior.

Debug First

If OpenCode misses instructions or skills, inspect the generated OPENCODE_CONFIG file and OPENCODE_CONFIG_DIR skill projection. On Windows, also verify whether Wardian resolved a native executable or correctly wrapped a command shim through the host shell.

Released under the MIT License.