plans/2026-07-07-community-edge-batches-4-9-integration.md
Base: origin/community-edge at be4dc3b12ef0dc1e5e0258d6e1677bc35387a6e4.
Source plan: issue #3139, Batches 4-9. The live-state inventory was refreshed on
2026-07-07: every Batch 4-9 PR was still open, unmerged, and not contained in
community-edge at the start of this branch.
CLAUDE_CODE_SKIP_BEDROCK_AUTH and
CLAUDE_CODE_SKIP_VERTEX_AUTH while continuing to strip broader Bedrock and
Vertex routing flags.~/.claude-mem/.env only.CLAUDE_MEM_CLAUDE_MAX_TOKENS; after a saved turn exceeds the cap, the SDK
session is reset to a fresh start, memorySessionId is cleared, and telemetry
reports the closed context_bound abort reason.cmd.exe /d /c only for
bare PATH commands, while absolute runtime paths spawn directly.plugin/scripts/worker-cli.js distribution shim and
update tests/docs to reflect worker-service.cjs as the lifecycle entry.settings.json uses { env: { ... }, hooks, permissions, ... }.CodexCliInstaller installs the
local Codex plugin cache with codex plugin add claude-mem@claude-mem-local
after marketplace registration, no longer uses local marketplace upgrade, and
install tests assert the marketplace plugin marker is written before Codex
cache registration.scripts/build-hooks.js emits
plugin/sqlite/SessionStore.js and plugin/sqlite/observations/files.js,
package.json ships plugin/sqlite, tracked generated files are present,
and plugin distribution tests guard the worker bundle closure.plugin/.install-version and plugin/node_modules,
mirroring repair markers into the marketplace plugin, and guarding
pre-platform_source SQLite tables during schema initialization..install-version is checked before dependency install; the
Setup hook force-clears/reinstalls stale node_modules and self-heals the
marker only after a successful forced reinstall, preserving the actionable
install hint on failure.tree-sitter-cli executable after script-suppressed dependency
install, isInstallCurrent rejects stale caches with missing CLI binaries,
and smart-file-read resolves Windows tree-sitter.exe before falling back to
bare tree-sitter.scripts/sync-marketplace.cjs with no-write dry runs, opt-in
rsync delete, preserved user-config excludes, and dry-run-safe Bun install
logging. The legacy bash sync script was already absent on this branch.plugin/bun.lock, runtime setup installs from that
lockfile and validates critical modules, Setup self-heals missing
node_modules, and worker/MCP bundles forbid external zod requires where
startup cannot rely on installed plugin dependencies. We intentionally do not
ship plugin/node_modules in the npm tarball because the current dependency
tree is hundreds of MB and contains platform-specific native artifacts.installer/ package no longer exists on this branch; package.json publishes
executable dist/npx-cli/index.js as the claude-mem bin, and
npx claude-mem uninstall now owns plugin/registry/cache/data cleanup.search calls through server
observation search while keeping unsupported legacy filters on worker search.tools/list runtime-aware so worker mode hides
server-runtime-only observation_* tools and server mode hides worker-only
tools.memory_save using the existing worker HTTP write
path. Legacy aliases from the PR were intentionally not restored because the
current server runtime exposes canonical observation_* tools.CLAUDE_MEM_OPENROUTER_EXTRA_BODY support while blocking
unsafe overrides of core request fields.CLAUDE_MEM_OPENROUTER_REASONING_EFFORT support.chroma-mcp==0.2.6 to
[email protected].--from <package-spec> chroma-mcp invocation shape for
older uv compatibility.CLAUDE_MEM_OPENROUTER_BASE_URL.claude as an alias for the Claude Code adapter/install path and
CLI detection.hook antigravity-cli, use the shared Gemini config tree, register
MCP via the shared helpers, and normalize Antigravity CLI payloads through the
dedicated adapter.id: "claude-mem" descriptor, reading tool args and
chat.message session IDs from OpenCode input payloads, awaiting worker
init/observation writes, passing the first user message as the session prompt,
reading the worker port from settings when OpenCode has no inherited env, and
registering the claude-mem MCP server during OpenCode install.build_corpus now accepts
the advertised dateStart/dateEnd camelCase filters, and corpus
observation type filters route through obs_type instead of the search
type discriminator.skip output, clear stale
invalid-output debt, and avoid poison respawn loops while preserving quota
failure handling.CLAUDE_MEM_WORKER_AUTOSTART=false to disable hook lazy-spawn.printenv PATH with shell fallback..cmd SDK spawns parse npm-style shims and spawn node
directly when possible, with existing fallback preserved.stripBom() and use it across
settings readers, including defaults loading, HTTP settings updates, path
resolution, logger startup, plugin disabled-state checks, npx/server settings
helpers, and the OpenCode plugin worker-port reader.windowsHide: true through remaining live Windows spawn probes
and launchers for cwd remap git probes, worktree adoption git probes, the MCP
node launcher template, server runtime daemon launch, worker-to-server CLI
launch, and current npx doctor/setup runtime probes. The old
src/npx-cli/utils/bun-resolver.ts site from the PR no longer exists on this
branch.allowLazySpawn: false so a cold worker returns
the empty SessionStart payload without spawning or accruing fail-loud debt.
Codex SessionStart ordering remains unchanged.exit 2, degraded worker 5xx/429
responses are treated as worker-unreachable fallbacks, and session-init/Stop
fallbacks can surface a throttled offline banner. #2885's per-session
disabled sentinel is superseded because non-blocking outages no longer
create the Claude Stop-hook retry loop it was designed to cap.& in Rule B
installers. The original Gemini CLI site is now Antigravity CLI on this
branch, so the fix is applied to Cursor, Windsurf, and Antigravity hook
command generation.CLAUDE_MEM_PRECOMPACT_ENABLED is true or
1; enabled hooks enqueue pre-compact summary work through the current
in-RAM message buffer, tier routing treats it as summary work, and all
providers route it through the summary prompt path.PRAGMA auto_vacuum = INCREMENTAL
before WAL/schema writes; legacy DBs are left unchanged when not safely fresh.PRAGMA busy_timeout = 5000.CLAUDE.md lookup uses project-relative paths and avoids
creating/rewriting empty skeleton folder context./api/context/semantic now runs a bounded unscoped semantic
retry for project-scoped requests, keeps platform-source scoping, merges
direct and merged_into_project matches in relevance order, ignores keyword
fallback retries, logs only query lengths, and uses an internal semantic
hydration window without exposing a public semanticLimit knob.user_prompts, clears completed/failed
sdk_sessions.user_prompt only when first-prompt history exists for the same
session_db_id, and runs best-effort page reclamation without failing
startup. Version 38 avoids collisions with the existing v35-v37 migrations.server_sessions.metadata.project..claude-mem.json names still win, and unrelated ancestor worktree markers
no longer override a real nested repo root.CLAUDE_MEM_SKIP_SUBAGENT_OBSERVATIONS=true or
when CLAUDE_MEM_SKIP_AGENT_TYPES contains the exact agentType; worker HTTP
ingest applies the same guard before queueing observations. Defaults preserve
existing behavior, settings API validation rejects unsafe shapes, and the
viewer exposes both controls under Advanced settings.content_session_id onto generated observation and
summary rows at write time. This branch uses schema version 36 because version
35 is already occupied; the migration adds/backfills indexed columns from
linkable sdk_sessions, self-heals missing indexes, import paths preserve
supplied content-session IDs, and the worker response processor passes the
active session.contentSessionId through storage.observation_feedback table with self-healing indexes; dismissed
observations are hidden from proactive file-context, SQLite search, and
session-start context queries while remaining fetchable by id. Worker
dismiss/undismiss endpoints and MCP tools are gated by
CLAUDE_MEM_ALLOW_DISMISS=false by default.:dream namespaces alongside raw project memory for
SessionStart context. Dream observations and summaries are queried only when
that namespace has context, dream rows are preferred when present, one raw
observation is preserved when dream rows saturate the window, prior transcript
selection skips dream rows, welcome-hint suppression now treats summaries as
memory, and all paths preserve platform-source scoping plus dismissed
observation filtering./make-plan, /do,
and source-cited subagent fan-out while preserving display-only UUID ref
behavior. The make-plan skill now requires writing plans to
plans/inbox/<YYYY-MM-DD>-<short-slug>.md and creating kanban subfolders
when absent.init/ingest responses must be observation-shaped,
and summarize responses must be summary-shaped. Wrong-root XML and
explicit no-op observation batches are confirmed/dropped without storing the
wrong record type or reintroducing Batch 7 invalid-output respawn debt.docs/i18n/pt.md file instead of the missing
README.pt.md.community-edge has no MigrationRunner
abstraction to integrate against without inventing new architecture.agy-cli as a generation provider is a new
provider backend with auth/session semantics and should ship as a dedicated
provider feature. The Antigravity CLI hook integration from #3000 is already
contained on this branch.plans/ file moves and generated bundles: held. Current branch
has newer plan documents and generated assets; this tranche ports only the
source/skill behavior and regenerates from the current tree.Batch 4: complete.
Batch 5: complete.
Batch 6: complete.
Batch 7: complete.
Batch 8: complete.
Batch 9: complete.
bun test tests/supervisor/env-sanitizer.test.ts tests/env-isolation.test.ts tests/env-proxy-passthrough.test.tsbun test tests/sdk/output-classifier.test.ts tests/worker/agents/response-processor.test.ts tests/worker/poison-respawn.test.tsbun test tests/services/sync/chroma-mcp-manager-ssl.test.ts tests/services/sync/chroma-mcp-manager-singleton.test.tsbun test tests/servers/mcp-tool-schemas.test.ts tests/servers/mcp-runtime-tool-visibility.test.tsbun test tests/mcp-integrations.test.ts tests/servers/mcp-server-name-safety.test.tsbun test tests/shared/openrouter-request-settings.test.ts tests/shared/openrouter-base-url.test.ts tests/shared/settings-defaults-manager.test.tsbun test tests/services/sqlite/database-pragmas.test.ts tests/sqlite tests/services/sqlitenpm run typecheckbun test tests/json-utils.test.ts tests/shared/settings-defaults-manager.test.ts tests/settings-routes-claude-token-validation.test.tsbun test tests/json-utils.test.ts tests/shared/settings-defaults-manager.test.ts tests/settings-routes-claude-token-validation.test.ts tests/install-settings-preservation.test.ts tests/infrastructure/plugin-distribution.test.ts tests/integrations/opencode-plugin-contract.test.tsbun run typecheckbun test tests/worker/truncate-history.test.ts tests/gemini_provider.test.ts tests/shared/openrouter-request-settings.test.ts tests/shared/settings-defaults-manager.test.ts tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/utils/project-name.test.ts tests/context/observation-compiler.test.ts tests/worker/http/routes/search-routes-welcome-hint.test.tsbun run typecheckbun test tests/hooks/file-context.test.ts tests/context/include-last-message-dot-path.test.ts tests/services/sqlite/observation-dismiss.test.ts tests/cli/handlers/context-mcp-session-start.test.ts tests/cli/adapters/codex-file-context.test.ts tests/transcripts/processor-codex-context.test.tsnpm run buildbun test tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/sdk/parser.test.ts tests/sdk/parse-summary.test.ts tests/worker/agents/response-processor.test.tsbun run typechecknpm run buildbun test tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/context/formatters/agent-formatter.test.tsbun run typechecknpm run buildbun test tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run buildgit diff --checkbun test tests/infrastructure/plugin-distribution.test.ts tests/cli/hook-io.test.ts tests/cli/hook-stream-discipline.test.ts tests/services/worker/session-message-buffer.test.ts tests/gemini_provider.test.ts tests/shared/openrouter-request-settings.test.ts tests/worker/codex-provider.test.tsbun run typecheckbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/utils/project-name.test.ts tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run lint:hook-iobun run lint:spawn-envgit diff --checkgit diff --checkbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/services/sqlite/session-store-maintenance.test.ts tests/session_store.test.ts tests/shared/settings-defaults-manager.test.ts tests/services/sqlite/database-pragmas.test.ts tests/sqlite/session-store-migrations.test.tsbun run typecheckbun run buildbun test tests/services/sqlite/session-store-maintenance.test.ts tests/session_store.test.ts tests/services/sqlite/database-pragmas.test.ts tests/sqlite/session-store-migrations.test.ts tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/worker/search-manager-semantic-limit.test.ts tests/worker/http/routes/search-routes-semantic-context.test.ts tests/worker/chroma-sync-query-logging.test.ts tests/services/sqlite/get-observations-by-ids-relevance.test.tsbun run typecheckbun run buildbun test tests/worker/search-manager-semantic-limit.test.ts tests/worker/http/routes/search-routes-semantic-context.test.ts tests/worker/chroma-sync-query-logging.test.ts tests/services/sqlite/get-observations-by-ids-relevance.test.ts tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/sqlite/session-store-migrations.test.ts tests/sqlite/session-store-observations.test.ts tests/sqlite/session-store-summaries.test.ts tests/sqlite/session-store-transactions.test.ts tests/worker/agents/response-processor.test.ts tests/worker/http/routes/data-routes-import-platform.test.ts tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/shared/should-skip-agent-observation.test.ts tests/cli/handlers/observation-subagent-skip.test.ts tests/cli/handlers/summarize-subagent-skip.test.ts tests/shared/settings-defaults-manager.test.ts tests/settings-routes-claude-token-validation.test.tsbun test tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/shared/worker-autostart-flag.test.ts tests/cli/hook-stream-discipline.test.ts tests/cli/handlers/session-init-server-beta-context.test.ts tests/cli/handlers/summarize-subagent-skip.test.tsbun test tests/shared/worker-autostart-flag.test.ts tests/cli/hook-stream-discipline.test.ts tests/cli/handlers/session-init-server-beta-context.test.ts tests/cli/handlers/summarize-subagent-skip.test.ts tests/infrastructure/plugin-distribution.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/infrastructure/plugin-distribution.test.ts tests/shared/worker-autostart-flag.test.ts tests/shared/worker-utils-version-recycle.test.ts tests/cli/handlers/session-init-server-beta-context.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/infrastructure/windows-hide-regressions.test.ts tests/infrastructure/plugin-distribution.test.ts tests/infrastructure/process-manager.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/cli/kiro-never-block.test.ts tests/shared/worker-autostart-flag.test.ts tests/infrastructure/health-monitor.test.ts tests/services/worker-spawner-stale-socket.test.ts tests/services/worker-spawner.test.ts tests/infrastructure/process-manager.test.tsbun test tests/infrastructure/plugin-distribution.test.ts tests/cli/kiro-never-block.test.ts tests/shared/worker-autostart-flag.test.ts tests/infrastructure/health-monitor.test.ts tests/services/worker-spawner-stale-socket.test.ts tests/services/worker-spawner.test.ts tests/infrastructure/process-manager.test.tsbun run typecheckbun run buildbun run lint:hook-iobun run lint:spawn-envgit diff --checkbun test tests/services/sqlite/observation-dismiss.test.ts tests/worker/http/routes/data-routes-dismiss.test.ts tests/servers/mcp-dismiss-tools.test.ts tests/sqlite/session-store-migrations.test.ts tests/settings-routes-claude-token-validation.test.ts tests/worker/http/routes/data-routes-platform-scoping.test.ts tests/worker/http/routes/data-routes-import-platform.test.tsbun run typecheckbun run buildbun test tests/services/sqlite/observation-dismiss.test.ts tests/worker/http/routes/data-routes-dismiss.test.ts tests/servers/mcp-dismiss-tools.test.ts tests/sqlite/session-store-migrations.test.ts tests/settings-routes-claude-token-validation.test.ts tests/worker/http/routes/data-routes-platform-scoping.test.ts tests/worker/http/routes/data-routes-import-platform.test.ts tests/infrastructure/plugin-distribution.test.tsbun run lint:hook-iobun run lint:spawn-envgit diff --check