Port of upstream grok-build 1.0.14 ("--sandbox strict now restricts
writes to ~/.grok/sessions only"), shaped for Kigi.
The strict profile granted the whole ~/.kigi read-write, so a sandboxed
command could plant a global SessionStart hook or flip
`[sandbox].profile` in config.toml for the next launch. Landlock cannot
carve a child out of a write grant, so the home is now read-only
except an explicit allowlist of state subtrees (run, sessions,
worktrees, worktree_pool, tasks, memory, logs, debug, crash, memtrace,
trace-exports); config.toml, auth.json, sandbox.toml, hooks/, bin/ and
vendor/ stay read-only. A symlinked state dir under the home is
followed only to the default ~/.kigi/sessions.
What the process itself writes there after enforcement moves or is
minted first:
- kigi-shell `apply_sandbox` mints the device id, extracts the bundled
rg and the bundled skills BEFORE enforcement for every profile that
restricts home writes (`restricts_home_writes`, custom profiles
extending strict included).
- The sandbox audit log lives at ~/.kigi/sessions/sandbox-events.jsonl.
- Leader lock/socket default to ~/.kigi/run/, the leader stderr log to
~/.kigi/logs/leader.log; discovery scans run/ and the legacy root,
and the default target prefers the current socket.
Root-level caches (version.json, agent_id, slash-mru.json, pager.toml,
claude_import_state.json) degrade best-effort under strict; documented.
Claude-Session: https://claude.ai/code/session_01RUqV8HVGXcAETyYbZ2tPQ4
Kigi User Guide
Learn how to install, configure, and extend Kigi, the terminal-based AI coding assistant from SpaceXAI.
Tier 1: Essential User Docs
Start here. These guides cover what you need on your first day.
| # | Document | Description |
|---|---|---|
| 1 | Getting Started | Installation, first launch, authentication, basic interaction, and key concepts |
| 2 | Authentication | Browser login, API keys, OIDC/SSO, external auth providers, and device-code flow |
| 3 | Keyboard Shortcuts | Reference for every key binding and mouse action in the TUI |
| 4 | Slash Commands | Every / command for sessions, models, memory, hooks, and plugins |
| 5 | Configuration | config.toml, pager.toml, environment variables, and file locations |
Tier 2: Core Feature Docs
Customize and extend Kigi.
| # | Document | Description |
|---|---|---|
| 6 | Theming and Appearance | Themes, the /theme command, pager.toml, and color-support detection |
| 7 | MCP Servers | External tool integrations through the Model Context Protocol |
| 8 | Skills | Reusable prompt packages in the SKILL.md format |
| 9 | Plugins | Bundle and share skills, commands, agents, hooks, and MCP servers |
| 10 | Hooks | Lifecycle scripts and HTTP callbacks for pre- and post-tool-use events |
| 11 | Custom Models | Bring-your-own-key, Ollama, and OpenAI-compatible endpoints |
| 12 | Project Rules (AGENTS.md) | Per-directory AGENTS.md instructions and their precedence |
| 13 | Memory | Cross-session knowledge persistence with /flush, /dream, and hybrid search |
Tier 3: Advanced Usage Docs
Automate, script, and integrate Kigi with other systems.
| # | Document | Description |
|---|---|---|
| 14 | Headless Mode and Scripting | kigi -p, output formats, CI/CD integration, and piping |
| 15 | Agent Mode and IDE Integration | ACP stdio transport, WebSocket relay, and SDK integration |
| 16 | Subagents and Personas | Parallel child sessions, agent types, personas, and capability modes |
| 17 | Session Management | Save, load, resume, rewind, compact, and the session persistence format |
| 18 | Sandbox Mode | OS-level filesystem and network isolation profiles |
| 19 | Plan Mode | Structured planning, plan-file edits, and approval before coding |
| 20 | Background Tasks and Monitoring | background: true, /loop, monitor, and Ctrl+G to demote |
| 21 | Terminal Support and Troubleshooting | tmux, SSH, truecolor, clipboard, and OSC 52 |
| 22 | Permissions and Safety Controls | dontAsk mode, auto-approved tools, the safe-bash list, and restrictive PreToolUse hooks (such as git/gh-only) |