Fixed
- OpenCode v2.2.7+ plugin discovery, empty
system[], and cache stability: switched plugin filename to agent-fast-snapshot.js (OpenCode v2.2.7 only discovers .ts/.js, ignoring .mjs), always push { type: "text", text } when system is empty in v2 setup(ctx), replaced blocking execFileSync with async execFile, switched to a 512-entry LRU cache keyed strictly by sessionID (checked before ctx.session.get so transient RPC failures never bust prompt caches), and added compaction / experimental.session.compacting cache invalidation.
- Non-dot-first
tree: sorting & dotdir collapse: sorts regular code directories and files ahead of dotfiles at levels 1 and 2, collapses >2 top-level dotdirs into a compact trailing dotdirs: summary so multi-agent repos never push src//crates//cmd//internal/ into +N more dirs, expands ignoreDirs (.artifacts, .sqlx, .tmp, .mise, .husky, .worktrees, dist-mcp*, etc.), filters noisy/sensitive root files (.env, .env.local, *.tsbuildinfo, .eslintcache, ..*.bundle, ..*.patch), deduplicates README.md/AGENTS.md/CLAUDE.md from tree:, and follows symlinked directories with /.
- Subpath repo-wide dirty reporting & header: removed
-- . from git status so subdirectories never report a false (clean) when files are dirty elsewhere in the repo; renders [Workspace Snapshot (at session start)] <repo> (<subpath>) with an explicit point-in-time marker against mid-session staleness.
DetectAgent() under --agent auto & resume/fork cache guard: stopped misclassifying Codex/Qwen snake_case payloads as AgentClaude; parses source and fails open ({}) on resume / fork; skips 250 ms stdin polling for explicit --cwd + --agent plain|opencode; sets matcher: "startup|clear|compact" on Claude and Codex SessionStart hook configs.
codegraph freshness edge cases & readSmallFile on 0-byte files: reports codegraph: present (status unknown) instead of false ready when headCommitTime == 0, detects branch switches to older commits via .git/HEAD mtime, omits codegraph: none in non-git directories, and uses io.ReadAll(io.LimitReader(...)) so empty 0-byte manifests (mise.toml, justfile) are detected cleanly.
Added
- Pure-Go
HEAD @sha & major latency cuts: resolves HEAD short SHA in pure Go (loose refs + packed-refs); --agent claude skips git status (covered by native # gitStatus) and skips git log when no .codegraph/ DB exists (0 git spawns on default branches); listGitWorktrees runs concurrently, computes canonicalPath once, omits worktree scans on secondary multi-root entries, and switches to a < 0.5 ms summary path when >16 worktrees exist; --compact skips git diff --shortstat, and detached/unborn HEADs skip base diffstat.
- High-signal
wt: & dirty: formatting: caps wt: at 130 B (never starving dirty: or commits:), strips <repo>. prefixes, disambiguates duplicate worktree basenames (codex/<repo>, .claude/<repo>), and aggregates dirty: by top-level directory when >6 files are modified (dirty: 153 files (.agents/ 62, docs/ 25, ...)).
- Deep toolchain,
docs:, and polyglot discovery: parses 1-level Makefile include/-include/sinclude and multi-target rules (test test-package:), justfile recipes, and mise.toml [tasks]/[tools]; prioritizes canonical dev targets (dev, run, build, test, check, verify, lint, typecheck, fmt) for package.json/Makefile/justfile/mise.toml; raises manifest caps to 64–96 KB; detects decisions/, docs/adr/, and docs/decisions/ while omitting preloaded AGENTS.md on Codex/OpenCode; adds 1-level subdir language fallback for polyglot monorepos without root manifests.
- Pure-Go meta-workspace & large container modes: non-git directories with
>=2 child git repos/worktrees (<=50 dirs) emit a 0-spawn repos: + worktrees: branch summary (~3 ms); containers with >50 dirs emit a compact container: + summary: overview.
Changed
- Concise output & accurate Codex docs: shortened
codegraph: ready (...) to codegraph: ready, removed ; see gitStatus from Claude output, updated Codex docs/errors to reflect sibling-to-sibling ~40K prefix-cache sharing and Codex's [hooks.state] Trust Gate, and raised default GitTimeout to 900 ms (diffTimeout to 400–450 ms).
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.3.0/install.sh | AGENT_FAST_VERSION=v0.3.0 bash