Managing Context in Long-Run Agentic Security Investigation Systems

slack · Tech · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Long-running agentic security investigations

Slack needed multi-agent security investigations to stay coherent across long-running investigations without overflowing context windows or letting unsupported findings propagate.

Constraints:

Architecture

Slack built a multi-agent investigation system with a Director, specialist Experts, and a Critic, but replaced full message-history carryover with three maintained context channels: the Director's Journal, the Critic's Review, and the Critic's Timeline. The Journal supplies structured working memory, the Review scores and filters Expert findings using evidence-inspection tools, and the Timeline consolidates credible findings into a coherent chronology.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Director["Director agent"] --> Journal["Director's Journal"]
  Director --> Experts["Specialist Expert agents"]
  Experts --> Tools["Investigation tools"]
  Experts --> Critic["Critic agent"]
  Tools --> ReviewTools["Critic review tools"]
  ReviewTools --> Critic
  Critic --> Review["Critic's Review"]
  Review --> Timeline["Critic's Timeline"]
  Journal --> Timeline
  Timeline --> Director
  Journal --> Shared["Shared prompt context"]
  Review --> Shared
  Timeline --> Shared
  Shared --> Director
  Shared --> Experts
  Shared --> Critic
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Director agent Orchestrates the investigation, decides questions to ask, selects Experts, records working memory, and determines when the investigation can conclude. Director's Journal, Specialist Expert agents, Critic agent
Director's Journal Structured working memory containing decisions, observations, findings, questions, actions, hypotheses, priorities, follow-ups, and citations. Director agent, Specialist Expert agents, Critic agent, Shared prompt context
Specialist Expert agents Domain-specific investigators that use tools to gather evidence and report cited findings. Director agent, Investigation tools, Critic agent
Investigation tools Domain data-access tools used by Experts to interrogate telemetry, identity, configuration, and other evidence sources. Specialist Expert agents, Critic review tools
Critic agent Reviews Expert findings, inspects evidence and methodology, scores credibility, and constructs the consolidated timeline. Specialist Expert agents, Critic review tools, Critic's Review, Critic's Timeline
Critic review tools Allow the Critic to inspect tool-call arguments, tool outputs, available Expert tools, and toolset organization. Critic agent, Investigation tools
Critic's Review Annotated findings report with credibility scores used to prioritize reliable findings and filter weak or misguided ones. Critic agent, Critic's Timeline, Director agent, Shared prompt context
Critic's Timeline Consolidated chronology built from credible Review findings, the prior Timeline, and the Director's Journal. Critic agent, Critic's Review, Director's Journal, Director agent, Shared prompt context
Shared prompt context Role-tailored context assembled from Journal, Review, and Timeline rather than raw accumulated messages. Director agent, Specialist Expert agents, Critic agent

Data flow

An investigation moves through phases and rounds until the Director concludes it. The Director asks specialist Experts to investigate with domain tools, records decisions and open questions in the Journal, and receives findings. The Critic reviews Expert reports with tools for inspecting cited calls, results, and available toolsets, assigns credibility scores, and then builds a Timeline from the latest Review, previous Timeline, and Journal. Future agent invocations receive these context channels instead of full message history.

“A Director orchestrates the investigation, many specialist Experts gather evidence, and a Critic reviews the Experts’ findings.”article, stated
“Besides these resources, we do not pass any message history forward between agent invocations.”article, stated

Why this architecture

Slack chose purpose-built context channels because generic message-history accumulation breaks down in long investigations. The design gives each agent enough shared orientation to stay aligned while avoiding full-history overload and confirmation bias. A stronger but bounded Critic role concentrates expensive model capacity on validation rather than every exploratory step.

3 supporting quotes
“Agent frameworks solve the state management problem for users by accumulating message history between API calls. This fills the agent’s context window, which provides a hard limit on how much information the agent can handle.”article, stated
“If agents are not anchored to the wider team, the investigation will be disconnected and incoherent. Conversely, sharing too much information stifles creativity and encourages confirmation bias.”article, stated
“The first mitigation is to use a stronger model for the Critic. Because the Critic only reviews submitted findings rather than the entire Expert run, the number of tokens required is kept within reasonable limits.”article, stated

Models used: LLMs · stronger model for Critic role

Scale

Alternatives considered (roads not taken)

Carry full message history forward between agent invocations

Rejected because: Accumulated messages increase costs and latency, degrade model quality, and eventually exceed context windows.

“In long-run agentic applications, you cannot simply carry the message history forward indefinitely. As more of the model’s context window is consumed, costs and inference latencies increase, model performance declines,”article, stated

Give the Critic all raw investigation information directly

Rejected because: The number of findings makes direct inclusion impractical, so the Critic uses tools to inspect cited evidence on demand.

“Due to the number of findings that can be produced, it’s not practical to provide all of the information to the Critic directly.”article, stated
“Instead, the Critic receives a summary report and uses a suite of tools to examine the cited evidence.”article, stated

Use the same model quality uniformly across all agents

Rejected because: Slack concentrated a stronger model on the bounded Critic role where nuance interpretation matters and token volume is controlled.

“The first mitigation is to use a stronger model for the Critic. Because the Critic only reviews submitted findings rather than the entire Expert run, the number of tokens required is kept within reasonable limits.”article, stated

Let Review scores alone determine final investigation state

Rejected because: Slack adds Timeline consolidation so findings must cohere with the full evidence chain before being preserved.

“The Timeline task raises the bar for hallucinated findings by enforcing narrative coherence. To be preserved, each finding must be consistent with the full chain of evidence;”article, stated

Patterns

multi-agent-orchestration (agent_architecture)

Slack decomposed investigations into Director orchestration, specialist Expert evidence gathering, and Critic validation/timeline roles.

“A Director orchestrates the investigation, many specialist Experts gather evidence, and a Critic reviews the Experts’ findings.”article, stated

context-engineering (context_management)

The system curates role-specific context through Journal, Review, and Timeline channels instead of forwarding raw message history.

“Our approach is to rely entirely on the context channels presented in this article: the Journal, Review, and Timeline. Besides these resources, we do not pass any message history forward between agent invocations.”article, stated

agent-memory (context_management)

The Director's Journal acts as structured working memory with entry types, priority, follow-ups, citations, phase, round, and timestamp context.

“The Director has a journaling tool. The Director’s system prompt encourages it to update the Journal often and use it for short notes. The Journal captures decisions, observations, hypotheses, and open questions in a structured format.”article, stated

eval-driven-development (quality)

The Critic Review and Timeline provide scored, evidence-based quality controls that prune low-credibility findings before they guide the investigation.

“Not all findings are equally reliable. A finding corroborated by multiple sources deserves more weight than speculation based on partial data.”article, stated
“Only credible findings make it into the consolidated timeline”article, stated

tool-use-orchestration (tooling)

The Critic uses explicit tools to inspect cited tool calls, results, toolset information, and available Expert toolsets instead of trusting summaries alone.

"We provide the Critic with four tools:

Tool

Purpose

get_tool_call

Inspect the arguments and metadata of any tool call"

“Collectively, these tools allow the Critic to examine evidence and data gathering methodology.”article, stated

Tradeoffs

Use curated context channels instead of complete history

Chose Journal, Review, and Timeline as online context summarization over Passing all message history between agent invocations.

Rationale: Curated context preserves continuity while avoiding context-window exhaustion, latency growth, cost growth, and information overload.

“Collectively, these channels provide a means of online context summarisation, negating the need for extensive message histories.”article, stated
“Even if context windows were infinitely large, passing message history between rounds would not necessarily be desirable: the accumulated context could impede the agents’ capacity to respond appropriately to new information.”article, stated

Use a stronger model for the Critic

Chose Higher-capability validation model for the bounded Critic task over Uniformly cheap or uniform-capability models across all roles.

Rationale: The Critic's scope is limited enough to keep token cost manageable while improving nuance interpretation and reducing errors.

“Because the Critic only reviews submitted findings rather than the entire Expert run, the number of tokens required is kept within reasonable limits.”article, stated
“Equally important is the capacity of the Critic to interpret nuances in the evidence, which is also improved with a stronger model.”article, stated

Let the Critic inspect evidence through tools

Chose Summary report plus targeted review tools over Putting all raw evidence directly into the Critic prompt.

Rationale: Tool inspection scales better when many findings exist and lets the Critic inspect both evidence and methodology.

“Due to the number of findings that can be produced, it’s not practical to provide all of the information to the Critic directly.”article, stated
“When an Expert cites tooluse_abc123 as supporting a finding, the Critic can use get_tool_call to examine the tool parameters used to obtain the result,”article, stated

Gotchas (what bit them)

Naively accumulating message history breaks long-running agent workflows.

Root cause: Stateless LLM APIs require callers to provide continuity, but full history fills context windows and degrades quality.

Resolution: Slack replaced message-history carryover with Journal, Review, and Timeline context channels.

“Language model APIs are stateless: to provide continuity between requests, the caller must provide the complete message history with each request.”article, stated
“Agent frameworks solve the state management problem for users by accumulating message history between API calls. This fills the agent’s context window,”article, stated

Sharing either too little or too much context can degrade multi-agent investigations.

Root cause: Agents need alignment to the broader investigation, but excessive context can stifle creativity and reinforce confirmation bias.

Resolution: Slack gives each role a tailored view of state through complementary context channels.

“If agents are not anchored to the wider team, the investigation will be disconnected and incoherent. Conversely, sharing too much information stifles creativity and encourages confirmation bias.”article, stated

Expert findings can hallucinate or misinterpret evidence even under strict guidelines.

Root cause: Specialist agents produce findings from tools, but model outputs can invent or grossly misread supporting data.

Resolution: The Critic examines cited evidence and methodology, scores findings, and filters weak ones before timeline inclusion.

“Even with strict guidelines, this process is not, by itself, sufficiently robust. Language models are known to hallucinate, and a proportion of the Experts’ findings could either be invented or grossly misinterpret the data.”article, stated

A model-based Critic can create false assurance if treated as infallible.

Root cause: The Critic's Review is itself model inference and can hallucinate or miss nuance.

Resolution: Slack mitigates this by using a stronger Critic model, narrow instructions, and an additional Timeline task.

“It’s reasonable to question whether the Critic’s Review provides a false sense of assurance; it’s also conducted by model inference.”article, stated

The first mitigation is to use a stronger model for the Critic."

— article, stated

Evaluation

Slack evaluates investigation reliability through Review credibility scores, Timeline confidence scores, scoring distributions over reviewed findings, and specimen investigation traces showing whether Experts, Review, and Timeline converge on supported conclusions.

Metrics: 170,000 reviewed findings in the scoring distribution · 37.7% Trustworthy findings · 25.4% Highly-plausible findings · 11.1% Plausible findings · 10.4% Speculative findings · 15.4% Misguided findings · slightly over a quarter of findings below plausibility threshold · 0.83 confidence score in the example timeline

3 supporting quotes
“The following table shows the distribution of classifications over 170,000 reviewed findings. Slightly over a quarter of findings don’t meet the plausibility threshold.”article, stated
“The Critic is instructed to score the Timeline using a narrative-building rubric.”article, stated
“Confidence Score: 0.83”article, stated

Outcomes

Slack reports complex security investigations spanning hundreds of inference requests and megabytes of output, with Review scoring measured over 170,000 findings.

4 supporting quotes
“With proper design, context window limitations are not a major obstacle to building complex, long-running agentic applications.”article, stated
“These mechanisms work together to maintain coherence across rounds, while preserving the benefits of specialized agent roles.”article, stated
“Reviewed expert findings (6,046 events showing package install triggered event). All 4 experts agree: FALSE POSITIVE. Timeline confidence 0.83. Decision: advance to conclude.”article, stated
“Slightly over a quarter of findings don’t meet the plausibility threshold.”article, stated