Repo-local continuity runtime for coding agents
Project description
aictx
AICTX is a repo-local continuity runtime for coding agents.
It helps each new session behave like the same repo-native engineer continuing prior work.
Current documented implementation: 4.5.2
Why this exists
Most agent workflows start from scratch every time.
aictx allows them to reuse what already worked.
What aictx is
A repo-local continuity runtime for coding agents.
It records real execution, preserves continuity artifacts inside the repository, and reuses successful strategies in later executions.
- repo-local continuity runtime
- real execution logging
- reusable strategy memory
- canonical handoff, decisions, semantic repo, staleness, and continuity metrics artifacts
- structured execution signal capture with provenance
- toolchain-aware error capture and failure memory
- failure and repo-area memory
- lightweight runtime guidance and post-task summaries for coding agents
- optional RepoMap structural lookup when Tree-sitter support is installed
Safety model
AICTX modifies repository files and can optionally install runner integrations.
By default it creates repo-local runtime artifacts only during repo setup, and aictx install does not modify global Codex files.
Global Codex integration requires aictx install --install-codex-global.
Quick start
pip install aictx
aictx install
cd your-repo
aictx init --repo .
After aictx init, you can use your coding agent normally in that repo.
Manual aictx commands after initialization are optional:
- the intended flow is
install+init, then agent-driven usage suggest,reflect,reuse,next,task ..., andreport real-usageremain available for inspection, debugging, or manual control- Claude/Codex integration files and hooks added by
initare there to help the agent useaictxautomatically when the runner respects repo instructions
Public CLI
aictx install
aictx init
aictx suggest
aictx reflect
aictx reuse
aictx next
aictx task start "Fix login token refresh"
aictx task status --json
aictx task list --json
aictx task show fix-login-token-refresh --json
aictx task update --json-patch '{"next_action":"run targeted auth tests"}' --json
aictx task update --from-file work-state-patch.json --json
aictx task resume fix-login-token-refresh --json
aictx task close --status resolved --json
aictx map status
aictx map refresh
aictx map query "startup banner"
aictx report real-usage
aictx clean --repo .
aictx uninstall
Only install and init are part of the normal setup path.
The rest of the public commands are optional operational commands:
suggest,reflect,reuse-> for manual inspection or explicit agent callsnext,task ...,map status|refresh|query-> for compact continuity, active work preservation, and RepoMap structural lookup operationsreport real-usage-> for reviewing stored execution dataclean,uninstall-> for removing AICTX-managed content
RepoMap (optional)
RepoMap is an optional Tree-sitter powered structural index. It helps AICTX suggest likely files/symbols. It does not guarantee speed or token savings.
Setup and usage:
pip install "aictx[repomap]"
aictx install --with-repomap
aictx init --repo .
aictx map status
aictx map query "startup banner"
What aictx does
- records real execution in
.aictx/metrics/execution_logs.jsonl - writes operational feedback in
.aictx/metrics/execution_feedback.jsonl - stores successful and failed strategies in
.aictx/strategy_memory/strategies.jsonl - stores continuity artifacts in
.aictx/continuity/session.jsonhandoff.jsonhandoffs.jsonl(rolling recent handoff history)decisions.jsonlsemantic_repo.jsondedupe_report.jsonstaleness.jsoncontinuity_metrics.jsonlast_execution_summary.md(latest detailed finalize summary)
- stores active task continuity in
.aictx/tasks/active.jsonthreads/<task-id>.jsonthreads/<task-id>.events.jsonl
- captures available files, commands, tests, and errors with provenance instead of inventing data
- normalizes command/test/lint/type/build/compile failures into compact
error_eventswithtoolchain,phase,code, path, line, command, exit code, and fingerprint when observed - derives backward-compatible
notable_errorsfrom structured error events when possible - preserves provisional and observed classification for continuity traceability (
prepared_*,final_*,effective_*) - stores repo-local failure patterns and area memory for later debugging/context
- reuses only successful strategies during later executions
- loads related failure patterns during prepare so agents can avoid repeating known mistakes
- distinguishes new, repeated, resolved, and merely considered failure context in
agent_summary_textwithout inventing causality - returns
agent_summaryandagent_summary_textafter finalize;agent_summary_textis the canonical factual source for the final AICTX summary - can preserve active Work State across sessions: goal, current hypothesis, active files, next action, factual verified items, and conservative recommended commands
- exposes small JSON commands for runtime guidance
- does not rely on hidden model memory or opaque cross-repo state
Failure capture and learning
AICTX 4.4 adds toolchain-aware failure capture for wrapped executions and explicit runtime signals.
When AICTX observes failed commands, tests, linting, typing, builds, or compilation, it can normalize the output into structured error_events with fields such as:
toolchain, phase, severity, message, code, file, line, command, exit_code, fingerprint
Supported recognition includes Python/pytest/mypy/ruff/pyright, JavaScript and TypeScript tooling, Go, Rust/Cargo, Java/JVM, .NET, C/C++, Ruby, PHP, and a generic fallback.
The failure memory flow remains inspectable:
- structured events are persisted in
.aictx/failure_memory/failure_patterns.jsonl notable_errorsremains available as the compact backward-compatible string formprepare_execution()can load related failure patterns for the next agentfinalize_execution()can record new patterns, recognize repeated patterns, or resolve prior patterns after a successful related executionagent_summary_textreports this compactly: learned new pattern, recognized existing pattern, resolved prior failure, or considered/used prior failure context without claiming avoidance unless the observed facts support it
What AICTX modifies
Repo-local:
.aictx/- AICTX-managed blocks in
AGENTS.mdandCLAUDE.md .claude/settings.jsonmerged AICTX hook entries.claude/hooks/aictx_*.py.gitignoreentries for AICTX runtime paths
Optional global:
~/.codex/AGENTS.override.md~/.codex/AICTX_Codex.md~/.codex/config.toml
Global Codex files are only updated when --install-codex-global is passed.
Idempotency guarantees
aictx initis non-destructive for existing AICTX execution logs and strategy memory- existing
.aictx/metrics/*.jsonland.aictx/strategy_memory/*.jsonlfiles are preserved .claude/settings.jsonis merged, not overwritten- AICTX-managed Markdown blocks and hooks are idempotent
aictx initdoes not delete legacy non-AICTX paths
What aictx does NOT do
aictx does not optimize your agent. aictx does not guarantee better performance.
It makes past executions observable and reusable.
Who this is for
- engineers using coding agents repeatedly in the same repository
- teams that want repo-local execution history and reusable strategies
- users who prefer traceable artifacts over heuristic-heavy automation
Who this is not for
- users expecting guaranteed productivity gains
- teams looking for a full orchestration platform
- workflows that do not preserve repo-level instructions or execution discipline
Runtime loop
prepare_execution()loads prior successful strategies and may attachexecution_hint- it exposes
continuity_briefwith ranked, evidence-backed next context when prior memory is useful - for non-trivial work it may also build a bounded packet/context payload and continuity summary
- the agent executes
finalize_execution()records logs, feedback, strategy memory,continuity_value,capture_quality, andagent_summary_textfinalize_execution()can also correct provisional task/area typing from observed execution evidence and exposeprepared_*,final_*, andeffective_*- the agent uses
agent_summary_textas the canonical factual source for the final AICTX summary; if finalize output is unavailable, it saysAICTX summary unavailable - the next execution can reuse successful strategies and ignore failed ones
Artifact contract
The stable repo-local continuity artifact contract in 4.5.2 is:
.aictx/continuity/session.json
.aictx/continuity/handoff.json
.aictx/continuity/decisions.jsonl
.aictx/continuity/semantic_repo.json
.aictx/continuity/dedupe_report.json
.aictx/continuity/staleness.json
.aictx/continuity/continuity_metrics.json
.aictx/strategy_memory/strategies.jsonl
.aictx/failure_memory/failure_patterns.jsonl
.aictx/metrics/execution_logs.jsonl
.aictx/metrics/execution_feedback.jsonl
.aictx/tasks/active.json
.aictx/tasks/threads/*
Behavior expectations:
- continuity artifacts are repo-local and inspectable
- startup loads only bounded, deterministic continuity context
- startup banner behavior is visible-session aware and shown at most once per visible session
- packet/context middleware may be built for non-trivial work and remains inspectable when present
- failed strategies remain in history but are excluded from positive reuse
- maintenance and staleness files mark or summarize; they do not imply hidden ML or automatic repair
Additional optional runtime outputs may appear:
.aictx/continuity/handoffs.jsonl.aictx/repo_map/config.json.aictx/repo_map/manifest.json.aictx/repo_map/index.json.aictx/repo_map/status.json
Additional latest-run output:
.aictx/continuity/last_execution_summary.md
Main runtime artifacts
.aictx/
continuity/
handoff.json
handoffs.jsonl
decisions.jsonl
semantic_repo.json
dedupe_report.json
staleness.json
continuity_metrics.json
last_execution_summary.md
metrics/
execution_logs.jsonl
execution_feedback.jsonl
strategy_memory/
strategies.jsonl
Additional properties
- repo-local artifacts are the source of truth; execution history and strategy memory stay inspectable inside the repository
- failed strategies are stored, but they are excluded from reuse by default
- public operational command outputs are deterministic and machine-readable JSON; internal
run-executionwithout--jsonalso prints the user-facing AICTX summary - AICTX-managed changes can be removed cleanly with
aictx cleanandaictx uninstall
Notes
- file tracking depends on explicit input from the agent/runtime; wrapped execution can capture commands, tests, structured error events, and edited files best-effort
- strategy reuse is heuristic: matching task type, prompt similarity, overlapping files, primary entry point, commands/tests/errors, and area are preferred, with recency as a secondary signal
preparetask/area typing is provisional;finalizecan correct it from observed files, tests, commands, errors, and result summary- continuity loading is layered: session identity, handoff, recent decisions, failure patterns, semantic repo memory, procedural reuse, maintenance hygiene, staleness filtering, and aggregate continuity metrics
continuity_briefandcontinuity_context.ranked_itemsexplain likely next paths, active decisions, known risks, recommended commands/tests, and why each memory source was loadedaictx next --repo .renders the same continuity guidance as compact human-facing output, with--jsonavailable for integrations- task typing uses explicit metadata first, then deterministic keyword/path inference, then
unknown - capture provenance distinguishes explicit, runtime-observed, heuristic, and unknown signals
- middleware packet generation is conservative and task-dependent, not unconditional for every execution
reflectis intentionally small-scope: it only looks at the latest execution log, but it can now return issue classification, counts, suggested next action, and recommended entry pointssuggestandreusecan rank with extra context such as request text, files, commands, tests, and notable errors when that context is provided- failed strategies are stored and excluded from positive reuse hints; structured failure patterns may still inform failure-aware avoidance and debugging context
- no synthetic benchmarks or estimated improvements are reported
Cleanup
aictx cleanremoves only AICTX-managed content from the current repository: the.aictx/scaffold, AICTX blocks inAGENTS.md/CLAUDE.md, legacy AICTX content inAGENTS.override.mdwhen present, AICTX Claude hooks/settings, and the.gitignoreentry added by AICTXaictx uninstallremoves AICTX-managed content from all registered repositories and removes global AICTX state under~/.aictx, plus AICTX-managed Codex global instructions/config lines- both commands are conservative: they only remove content that AICTX created or marked as AICTX-managed
Possible evolution
The current 4.5.2 runtime keeps continuity deterministic and inspectable rather than turning into an opaque agent platform.
Possible future work, based on real usage:
- better file access capture from agent/runtime integrations
- broader runner-native signal capture where supported
- more parser samples for newly observed toolchain formats
- clearer comparison across repeated task categories
- stronger runner-native automation where supported
- richer repo-level reporting built only from real execution history
- additional visible-session integration support across runners
Not part of the current product contract:
- hidden cross-session model state
- autonomous repo repair
- guaranteed optimization claims
Read next
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aictx-4.5.2.tar.gz.
File metadata
- Download URL: aictx-4.5.2.tar.gz
- Upload date:
- Size: 203.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e679b8c9114ff3f8035ed94728d6cd32c05670fcdb2bc31c5fb49263d4245d8f
|
|
| MD5 |
e268c5c93957ee41fd2a303365b02111
|
|
| BLAKE2b-256 |
e834e65def8eae3a42d2aeb4bf5468e82e8042c3d7f024b2a91fa3ae13231bd8
|
Provenance
The following attestation bundles were made for aictx-4.5.2.tar.gz:
Publisher:
publish-pypi.yml on oldskultxo/aictx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aictx-4.5.2.tar.gz -
Subject digest:
e679b8c9114ff3f8035ed94728d6cd32c05670fcdb2bc31c5fb49263d4245d8f - Sigstore transparency entry: 1394210880
- Sigstore integration time:
-
Permalink:
oldskultxo/aictx@67cbe569c73c55c13a97ef3ce0eb1f866cc7f4b7 -
Branch / Tag:
refs/tags/v4.5.2 - Owner: https://github.com/oldskultxo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@67cbe569c73c55c13a97ef3ce0eb1f866cc7f4b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aictx-4.5.2-py3-none-any.whl.
File metadata
- Download URL: aictx-4.5.2-py3-none-any.whl
- Upload date:
- Size: 166.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23a66a3c945701667ec16a84c28fdf2ff40ef558efb6d29e9f32631ac7952596
|
|
| MD5 |
15b54d06cadad8f26f962119c217e68d
|
|
| BLAKE2b-256 |
568e72500cf891edc33a05c905ce1d3f83d329b85621affab14cbc6c39a05723
|
Provenance
The following attestation bundles were made for aictx-4.5.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on oldskultxo/aictx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aictx-4.5.2-py3-none-any.whl -
Subject digest:
23a66a3c945701667ec16a84c28fdf2ff40ef558efb6d29e9f32631ac7952596 - Sigstore transparency entry: 1394210995
- Sigstore integration time:
-
Permalink:
oldskultxo/aictx@67cbe569c73c55c13a97ef3ce0eb1f866cc7f4b7 -
Branch / Tag:
refs/tags/v4.5.2 - Owner: https://github.com/oldskultxo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@67cbe569c73c55c13a97ef3ce0eb1f866cc7f4b7 -
Trigger Event:
push
-
Statement type: