---
title: "Managing context in long-run agentic applications"
description: "Slack's multi-agent security investigation service keeps long-running agent teams coherent through three context channels rather than accumulating full message history."
url: "https://swe.quest/articles/managing-context-in-long-run-agentic-applications-295891442705f8fe"
canonical: "https://slack.engineering/managing-context-in-long-run-agentic-applications/"
source: "Slack Engineering"
published: "2026-04-13"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["ai-agents","llms","threat-detection","system-design"]
---

# Managing context in long-run agentic applications

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2026-04-13, 13 min read, Case study. Original: [https://slack.engineering/managing-context-in-long-run-agentic-applications/](https://slack.engineering/managing-context-in-long-run-agentic-applications/)

## Summary

Slack's multi-agent security investigation service keeps long-running agent teams coherent through three context channels rather than accumulating full message history. The Director's Journal is structured working memory with typed entries (decision, observation, finding, question, action, hypothesis) and is shared with every agent. The Critic's Review uses tools to inspect Experts' cited tool calls and results, then scores findings on a five-level credibility rubric. The Critic's Timeline consolidates credible findings chronologically, de-duplicates them and flags the top three gaps. Across 170,000 reviewed findings, just over a quarter scored below plausible, which is why the system uses a stronger model for the Critic and keeps its review tasks narrowly scoped.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- LLM context windows ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- multi-agent orchestration
- tool calling

## Keywords

Slack, Director's Journal, Critic agent, context window

## Related posts

- [Streamlining Security Investigations with Agents](https://swe.quest/articles/streamlining-security-investigations-with-agents-7900a47757fc2126.md): Slack Engineering · 2025-12-01 · Medium · 9 min read · AI agents, Threat detection, LLMs, Incidents & postmortems, System design
  Slack's Security Engineering team replaced a single-prompt prototype for triaging security alerts with a multi-agent system that chains narrowly scoped model invocations, each constrained by a JSON-schema structured output.
- [Why human insight is a strategic advantage for building better agents](https://swe.quest/articles/why-human-insight-is-a-strategic-advantage-for-building-better-agents-376e4fe4ac199796.md): LangChain · 2026-11-04 · Easy · 7 min read · Evaluation, AI agents, Observability, LLMs
  Human review of agent traces supplies the domain judgment that automated evals lack, and it works best when reviewers see the full multi-turn conversation rather than an isolated step.
- [DigitalOcean Signals: Observability for AI Agents and Inference](https://swe.quest/articles/digitalocean-signals-observability-for-ai-agents-and-inference-fd98af0d1681e1e7.md): DigitalOcean · 2026-10-28 · Medium · 8 min read · AI agents, Observability, Evaluation
  DigitalOcean Signals, in Public Preview, analyzes production conversations from Managed Agents (Harness Runtime) and Inference Engine and emits 25 deterministic, model-free behavioral signal types across interaction, execution and environment layers, covering frustration, tool-call loops and parameter drift, context overflow and rate limits.
- [Five things you can do with Sentry’s Agent Tracing](https://swe.quest/articles/five-things-you-can-do-with-sentry-s-agent-tracing-5ac2ff6886459921.md): Sentry · 2026-10-28 · Medium · 19 min read · AI agents, Observability, Evaluation, LLMs
  Sentry's Agent Tracing captures model calls, tool executions and multi-agent handoffs in a single trace, and Sentry Cookbook recipes build workflows on top of that data.
- [Context Engineering with Deep Agents: How To Remember Without Keeping Everything In Context](https://swe.quest/articles/context-engineering-with-deep-agents-how-to-remember-without-keeping-everything-1dc293ec006d2b0c.md): LangChain · 2026-11-10 · Medium · 9 min read · AI agents, LLMs
  Long-running agents suffer "context rot" as tool output, history and instructions accumulate, so Deep Agents moves context out of the active window via middleware hooks in the agent loop rather than deleting it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
