Repository navigation
Releases
Releases · Dankosik/agent-fast
v0.5.0
Added
- Zero-token shell environment hygiene (
--export-env): computes deterministic shell env additions (PATHviaEnrichedPATH+ repo.venv/bin/venv/bin, unsetVIRTUAL_ENV, isolated-$HOMECARGO_HOME/RUSTUP_HOMEfallbacks, and unsetGIT_PAGER=cat,PAGER=cat,NO_COLOR=1) with zero prompt tokens and zero repo script execution — delivered idempotently via$CLAUDE_ENV_FILE(strictly POSIX-quoted with# agent-fast:env:startdedup marker) on Claude Code,sessionStartJSON"env"on Cursor, andctx.shell.hook("create.before")(v2) /"shell.env"(v1) on OpenCode (hook-config --agent claude|cursor|opencode --export-env). PostCompact&CwdChangedlifecycle hooks + enhanced Artifact Trail:RunHookautomatically activates--post-compactwith live git details onhook_event_name: "PostCompact";--post-compactexpands the individualdirty:file list threshold from6to12(up to 3 lines) and prioritizes conflicts → tracked edits (M/A/D/R) → untracked files (??);hook-config --agent claude --cwd-changedadds an optionalCwdChangedhook that stays silent ({}) on intra-repocdand emits a compact<= 500 B[Workspace Snapshot (cwd changed)]delta only on repo or worktree switches.- Node & Go workspace package discovery (0 spawns): parses
pnpm-workspace.yaml(packages:) andpackage.jsonworkspaces(array or{ "packages": [...] }) intonode: <pm> (workspace: ...), and parsesgo.workusedirectives intotools: go.work (...). - Pure-Go uninitialized submodules, Git LFS &
status timeoutguardrails: inspects.gitmodules(with path-traversal guards) to flag uninitialized submodules (N uninit submodules), detects.gitattributesfilter=lfs(lfs), and surfaces explicitstatus timeoutin thegit:header whengit statusexceeds its deadline on slow filesystems. doctorupgrades: reportspost-compactbyte size alongsidefullandcompact, validatesPostCompact/CwdChangedentries, and warns when CursorsubagentStartis configured withagent-fast.
Fixed
- Missing-
cwdstdin fallback & Cursor singularworkspace_root: hook payloads that omitcwd(such as Claude Codeclear/compactevents) now fall back cleanly to$CLAUDE_PROJECT_DIR/$GEMINI_PROJECT_DIR/ process CWD while explicitly protecting Antigravity from scanning its plugin directory;HookPayloadnow parses singularworkspace_root/workspaceRootandnew_cwd/old_cwd. - Cursor
subagentStartschema alignment:hook-config --agent cursornow emitssessionStartonly (rejecting--subagentcleanly), andFormatHookOutputForEventreturns fail-safe{"permission":"allow"}if legacy CursorsubagentStarthooks invokeagent-fast. - Host-native instruction file deduplication: hides natively loaded
AGENTS.mdon Cursor, Qwen Code, and Gemini CLI (whenGEMINI.mdis absent), hides fallbackCLAUDE.mdon OpenCode (whenAGENTS.mdis absent), and omitsQWEN.mdfromtree:on Qwen Code.
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.5.0/install.sh | AGENT_FAST_VERSION=v0.5.0 bashv0.4.0
Security
- Indirect prompt-injection sanitization for untrusted repo metadata: strips Unicode Tags (
U+E0000–U+E007F), bidi controls (U+202A–U+202E,U+2066–U+2069,U+200E/F,U+061C), zero-width/variation selectors, C0/C1 control chars, ANSI CSI/OSC escapes, newlines, and</>delimiter brackets across all repo-sourced strings (branches, commit subjects, dirty paths, worktree names, manifest names, scripts/targets, tree entries), plus strict version-spec allowlisting forrequires-pythonand Go/Rust versions.
Added
- Pure-Go VCS operational guardrails & Jujutsu support (0 extra spawns): detects active Git operations (
MERGING,REBASING N/M,AM N/M,CHERRY-PICKING,REVERTING,BISECTING), flags unresolved merge conflicts (N conflicts, prioritizing conflict entries first indirty:), counts stashes (N stashesvia<commonGitDir>/logs/refs/stash), and detects colocated (jj) or standalone (vcs: jj) Jujutsu (.jj/) repositories. - Post-compaction refresh mode (
source: "compact"/--post-compact) &--no-tree: refreshes[Workspace Snapshot (after compaction)]with expanded git/dirty budget and a 1-level tree prioritizing live session state;--no-treeomitstree:completely for ultra-minimal snapshots. - Continuity, quality-gate, Taskfile & polyglot discovery: surfaces read-only pointers to session handoff/SDD artifacts (
HANDOFF.md,claude-progress.txt,PROGRESS.md,.beads/,openspec/,.planning/,.specify/,.claude/plans/), parsesTaskfile.yml/Taskfile.yamltasks, detects commit gates (lefthook,pre-commit,husky), monorepo runners (turbo,nx), env/container layers (flake.nix,devbox,direnv,compose,devcontainer, Python.venv+pytest/ruff/mypy/pyright), and major additional ecosystems (JVM Maven/Gradle, C/C++ CMake/Meson, Bazel, Ruby, Elixir, PHP, Swift) with fulltree:/dotdirs:deduplication. - Gemini CLI first-class support (
--agent gemini) &SubagentStart--skip-agent-types: addshook-config --agent gemini,projectDir/triggerpayload parsing,GEMINI.mdhost-aware suppression, and optional case-insensitiveagent_typeskipping. agent-fast doctorsubcommand: read-only diagnostic command checking live snapshot latency, byte budgets, byte-for-byte determinism, and installed hook configurations across all 7 supported agents (with isolated-$HOMEsupport, duplicateSessionStartdouble-firing checks,resume-matcher warnings, CodexSubagentStartcache-bust warnings, and binary executability checks).
Fixed
- Qwen Code / Gemini CLI
trigger: "resume"cache protection:HookPayloadnow checks bothsourceandtriggerto fail open onresume/fork, andhook-config --agent qwensets"matcher": "startup|clear|compact"instead of wildcard"". - OpenCode compaction context survival:
compaction(v2) andexperimental.session.compacting(v1) now push a fresh--post-compactsnapshot intooutput.contextwhen provided by OpenCode, in addition to invalidating the per-session LRU cache.
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.4.0/install.sh | AGENT_FAST_VERSION=v0.4.0 bashv0.3.1
Changed
- Cross-section
tree:deduplication: omits root manifests and tool configs (go.mod,Cargo.toml,package.json,pnpm-workspace.yaml,pyproject.toml,Makefile,justfile,mise.toml,Taskfile.yml,go.work), single-purpose.github/ [workflows/]and.agents/ [skills/]directories, and doc directories (docs/,decisions/,plans/,specs/) fromtree:whenever they were already emitted inmeta/tools/docs(preserving doc directories in pure-documentation repos and keeping items truncated by tight budgets). - Lockfile and repo boilerplate filtering in
tree:: filters machine-generated lockfiles (Cargo.lock,go.sum,package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock*,uv.lock,poetry.lock,pdm.lock,Pipfile.lock,flake.lock,Gemfile.lock,composer.lock) and low-signal root boilerplate (LICENSE*,CHANGELOG.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md,.gitignore,.gitattributes,.editorconfig,.dockerignore, etc.) while keeping actionable files (.env.example,Dockerfile,install.sh). - Boilerplate merge-commit filtering in
commits:: fetches up to 6 recent commits with parent counts and skips 2-parent auto-generated merge subjects (Merge pull request #...,Merge branch '...',Merge remote-tracking branch '...',Merge tag '...',Auto-merge ...) socommits:surfaces substantive changes while keeping the realHEAD@shaand commit timestamp (includingcodegraphfreshness checks), 1-parent squash merges, and custom merge subjects.
Added
- Richer Rust and Python metadata: parses single-crate
Cargo.tomlfor cratename,edition, andrust-version(plus[workspace.package]edition/MSRV on workspaces), and parsespyproject.toml+ lockfiles for projectname, package manager (uv/poetry/pdm/pipenv/hatch), andrequires-python(with fallback torust: cargo crate/python: pyproject.toml).
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.3.1/install.sh | AGENT_FAST_VERSION=v0.3.1 bashv0.3.0
Fixed
- OpenCode v2.2.7+ plugin discovery, empty
system[], and cache stability: switched plugin filename toagent-fast-snapshot.js(OpenCode v2.2.7 only discovers.ts/.js, ignoring.mjs), always push{ type: "text", text }whensystemis empty in v2setup(ctx), replaced blockingexecFileSyncwith asyncexecFile, switched to a 512-entry LRU cache keyed strictly bysessionID(checked beforectx.session.getso transient RPC failures never bust prompt caches), and addedcompaction/experimental.session.compactingcache invalidation. - Non-dot-first
tree:sorting & dotdir collapse: sorts regular code directories and files ahead of dotfiles at levels 1 and 2, collapses>2top-level dotdirs into a compact trailingdotdirs:summary so multi-agent repos never pushsrc//crates//cmd//internal/into+N more dirs, expandsignoreDirs(.artifacts,.sqlx,.tmp,.mise,.husky,.worktrees,dist-mcp*, etc.), filters noisy/sensitive root files (.env,.env.local,*.tsbuildinfo,.eslintcache,..*.bundle,..*.patch), deduplicatesREADME.md/AGENTS.md/CLAUDE.mdfromtree:, and follows symlinked directories with/. - Subpath repo-wide dirty reporting & header: removed
-- .fromgit statusso 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/forkcache guard: stopped misclassifying Codex/Qwen snake_case payloads asAgentClaude; parsessourceand fails open ({}) onresume/fork; skips 250 ms stdin polling for explicit--cwd+--agent plain|opencode; setsmatcher: "startup|clear|compact"on Claude and CodexSessionStarthook configs.codegraphfreshness edge cases &readSmallFileon 0-byte files: reportscodegraph: present (status unknown)instead of falsereadywhenheadCommitTime == 0, detects branch switches to older commits via.git/HEADmtime, omitscodegraph: nonein non-git directories, and usesio.ReadAll(io.LimitReader(...))so empty0-byte manifests (mise.toml,justfile) are detected cleanly.
Added
- Pure-Go
HEAD@sha& major latency cuts: resolvesHEADshort SHA in pure Go (loose refs +packed-refs);--agent claudeskipsgit status(covered by native# gitStatus) and skipsgit logwhen no.codegraph/DB exists (0 git spawns on default branches);listGitWorktreesruns concurrently, computescanonicalPathonce, omits worktree scans on secondary multi-root entries, and switches to a< 0.5 mssummary path when>16worktrees exist;--compactskipsgit diff --shortstat, and detached/unborn HEADs skip base diffstat. - High-signal
wt:&dirty:formatting: capswt:at130 B(never starvingdirty:orcommits:), strips<repo>.prefixes, disambiguates duplicate worktree basenames (codex/<repo>,.claude/<repo>), and aggregatesdirty:by top-level directory when>6files are modified (dirty: 153 files (.agents/ 62, docs/ 25, ...)). - Deep toolchain,
docs:, and polyglot discovery: parses 1-levelMakefileinclude/-include/sincludeand multi-target rules (test test-package:),justfilerecipes, andmise.toml[tasks]/[tools]; prioritizes canonical dev targets (dev,run,build,test,check,verify,lint,typecheck,fmt) forpackage.json/Makefile/justfile/mise.toml; raises manifest caps to64–96 KB; detectsdecisions/,docs/adr/, anddocs/decisions/while omitting preloadedAGENTS.mdon 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
>=2child git repos/worktrees (<=50dirs) emit a 0-spawnrepos:+worktrees:branch summary (~3 ms); containers with>50dirs emit a compactcontainer:+summary:overview.
Changed
- Concise output & accurate Codex docs: shortened
codegraph: ready (...)tocodegraph: ready, removed; see gitStatusfrom Claude output, updated Codex docs/errors to reflect sibling-to-sibling ~40K prefix-cache sharing and Codex's[hooks.state]Trust Gate, and raised defaultGitTimeoutto900 ms(diffTimeoutto400–450 ms).
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.3.0/install.sh | AGENT_FAST_VERSION=v0.3.0 bashv0.2.1
Fixed
- Isolated-
$HOMEprofile tool discovery (EnrichedPATH&EnrichedEnviron): probe bothos.UserHomeDir()($HOME) and the real OS account home (os/user.Current().HomeDir) in priority order, plus$CARGO_HOME/bin, multi-entry$GOPATH/bin, and<home>/go/bin, soapply_editsinlineverifyandbatch_searchfind user toolchains (e.g.cargo,miseshims,~/.local/bin,go/bin) when agents run in isolated-$HOMEprofiles (such as Antigravity profiles). - Isolated-
$HOMECargo/Rustup fallback: when$HOMEdiffers from the OS account home and lacks its own Cargo/Rustup state,EnrichedEnviron()injects fallbackCARGO_HOMEandRUSTUP_HOMEpointing to the OS account's existing.cargo/.rustupdirectories (never overriding explicit non-empty env vars), preventingrustuptoolchain-lookup failures (exit=1) duringapply_editsverification. - Real OS home directory guard (
IsUnsafeWorkspaceDir): treatos/user.Current().HomeDir(resolved viaEvalSymlinks) as unsafe alongside$HOME, preventing accidental recursive scans of the real OS home directory under isolated-$HOMEprofiles.
Changed
- Version & docs: bumped release references, installer examples, and CI dry-run verification to
v0.2.1.
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.2.1/install.sh | AGENT_FAST_VERSION=v0.2.1 bashv0.2.0
Added
- Cross-agent
SessionStart& compactSubagentStartsupport across 6 agents: Claude Code, Codex CLI, Google Antigravity, Cursor, OpenCode, and Qwen Code (hook-config --agent agy|claude|codex|cursor|opencode|qwenplus--subagent). - Compact subagent snapshot mode (
--compact): emits a≤ 500 B1-level tree snapshot for independentSubagentStarthooks on Claude Code, Cursor, and Qwen Code (timeout: 5000ms), while intentionally keeping Codex CLISessionStart-only to preserve parent→subagent prefix-cache sharing. - Zero-dependency OpenCode ESM plugin:
agent-fast hook-config --agent opencodegenerates a ready-to-drop dual v1/v2agent-fast-snapshot.mjsplugin with per-session/directory caching and fail-open timeout handling. - Pure-Go
.gitinspection & parallel feature-branch diffstat: parses.gitdirectories, linked worktrees (wt:), monoreposubpath:, HEAD@sha, and base refs (origin/HEAD,packed-refs) without spawninggiton default branches; runsrev-list+diff --shortstatin parallel on feature branches (vs <base>: +A/-B commits, K files (+X/-Y)). - Zero-spawn
codegraphtri-state detection: reportsready,stale,none in worktree (main repo indexed), ornoneby comparing.codegraph//.codegraph-wsl/DB mtime against HEAD's commit timestamp. - Toolchain, docs, and multi-root discovery: falls back to
gitRootfor manifests (Cargo.tomlworkspaces,pnpm/bun/yarn/npmworkspaces,go.work,mise.toml,justfile,Taskfile.yml,Makefile,.github/workflows/), emits a 1-linedocs:summary, and appendsalso:lines for multi-root workspaces. - Claude delta mode (
--agent claude): omits dirty-file/commit echoes and preloadedCLAUDE.md/AGENTS.mdalready included in Claude Code's nativegitStatus. - MCP
batch_search&apply_editsupgrades (0 B schema growth):- Stat-first
git diff/git showcompaction preserving per-file(+A/-D)summaries under the≤ 8.8 KBinline cap. - Expanded strict read-only
gitallowlist (worktree list,stash list/show,ls-tree,merge-base, plus--no-ext-diff). - Enriched user
PATHprobing (sync.Once, preserving existingPATHprecedence) forbatch_searchandapply_editsinlineverify.
- Stat-first
- SHA-256 verified installer (
install.sh): supports macOS (darwin) and Linux (linux) onarm64/amd64with--version,--bin-dir,--dry-run,--base-url, atomic non-sudoinstallation, and fail-closed SHA-256 verification.
Changed
- Strict per-section snapshot budgets & 100% determinism: caps
header+git(≤ 520 B, or≤ 320 Bon Claude) andmeta+docs(≤ 380 B) so the 2-leveltree:always survives inside≤ 1.5 KBwith zerotime.Now()or volatile relative ages. - Startup latency: reduced
SessionStartsnapshot latency to 13.2 ms ± 3.2 ms on clean repos and 18.2 ms ± 5.2 ms on linked feature-branch worktrees (Apple Siliconhyperfine --warmup 3, vs 117.7 ms Node.js baseline). - Antigravity plugin (
install-plugin): added"enabled": trueinhooks.jsonand updatedrules/AGENTS.mdwith empirical tool-routing triggers tailored foragent-ready. - Codebase modularity: refactored
cmd/agent-fast/andinternal/{budget,edit,mcp,search,snapshot}into cohesive files (≤ 450lines/file) with byte-identical behavior.
Quick Install
curl -fsSL https://raw.githubusercontent.com/Dankosik/agent-fast/v0.2.0/install.sh | AGENT_FAST_VERSION=v0.2.0 bash