Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR-26030: Stateless JIT Context Injection for Agentic Git Workflows


title: Stateless JIT Context Injection for Agentic Git Workflows date: 2026-02-24 tags:


ADR-26030: Stateless JIT Context Injection for Agentic Git Workflows

Date

2026-02-24

Status

proposed

Context

Standard agentic workflows rely on stateful “sessions” where chat history is preserved across turns. In the context of local SLM deployment (1B–14B parameters) on Fedora/Debian systems, this “Recursive Context Accumulation” creates two critical failures:

  1. Computational Debt: Accumulating history consumes VRAM and CPU cycles linearly per turn, leading to performance degradation and context window saturation for models like qwen2.5-coder or ministral.

  2. State Drift: LLMs often “hallucinate” based on code discussed in previous turns that may have since been reverted or modified in the actual filesystem.

Furthermore, commercial API usage incurs a “Context Tax”—paying repeatedly for the same history tokens. To satisfy the requirements of ADR-26024 for a “computational/traceable artifact” (the CHANGELOG), the agent must have a perfectly accurate, high-fidelity view of the current staging area without the noise of conversational history.

Decision

We will implement the Stateless JIT (Just-In-Time) Injection pattern for all Git-interfacing agents. The agent shall be treated as a “Stateless Observer”—a pure function that maps current system state to a structured command.

1. Zero-Context Execution

2. Just-In-Time (JIT) State Assembly

The prompt payload is constructed at the moment of execution from the Single Source of Truth (SSoT):

3. Format Enforcement

Consequences

Positive

Negative / Risks

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Gemini (Principal Systems Architect)