# Context Compiler for AI conversations

Control how agents use long conversation histories and whether they can send progress updates while continuing work.

*Release 3.3 · admin, developer*

**Settings › AI › Features** · **Settings › AI › Accounts**

## What it is

**Context Compiler** controls the information an agent receives as a conversation grows. **Adaptive Context** shortens older material while preserving the original working history. With **Enable Continue Work**, a managed agent can send an interim update and continue the same unfinished request.

## Who uses it and why

Users with the **Settings** or **Developer** role choose a context strategy for **Autopilot**, **Copilot** and **Ask AI**. Developers use it for longer tasks that need several operations and may receive new user messages while work continues.

## Where to find it

Select **Context Compiler** under **Settings › AI › Features**. You need **Settings** with **AI** allowed under **Settings Permissions**, or **Developer**.

Powerfront manages the shared controls under **Settings › AI › Accounts**, including **Default Context Compiler**, **Recent messages kept verbatim** and **Advanced context settings**. Ask Powerfront to change these for you.

## How it works

- **Default (AI Account)** uses the context mode selected on the account.
- **Simple Context (Legacy)** uses the existing summary and recent-message approach.
- **Adaptive Context** prepares a reduced view for each model request. It can start summarising older context in the background and use that summary on a later turn.
- An available custom compiler can prepare another view, while INSIDE protects the feature's policy, approved tools and recent input.

When adaptive context reaches its soft limit before a background summary is ready, INSIDE uses a simpler digest of older material. This changes the view supplied to the model; it does not delete the underlying working history.

Continued work requires a managed context mode and explicit enablement. The agent can identify its next step, send a progress update and request a bounded delay. New input can join the active run and wake it sooner. A normal answer without a continuation request can complete the run.

## Configure it

Select **Context Compiler** on the feature. New features start with **Default (AI Account)**. Existing features with no saved selection retain **Simple Context (Legacy)**.

Ask Powerfront to review the account settings for the selected model. The recent-message default is **10**; **0** retains full history and prevents older conversation material from being compacted away.

Ask Powerfront to turn on **Enable Continue Work** if the agent should continue after an interim update. The defaults are a **1800-second** run allowance and a **300-second** maximum wake delay. These account settings are shared by features using that account.

### Settings

| Setting | Where | Applies to | Default | Who can change it | What it does |
|---|---|---|---|---|---|
| Context Compiler | Settings › AI › Features | website | Default (AI Account) for new features; Simple Context (Legacy) if no selection was saved | Settings role, Developer role | Selects account inheritance, simple context, adaptive context or an available custom compiler. |
| Default Context Compiler | Settings › AI › Accounts | website | Simple Context (Legacy) | Powerfront, on request | Supplies the context mode to features using the account default. |
| Recent messages kept verbatim | Settings › AI › Accounts | website | 10 | Powerfront, on request | Protects the recent conversation tail from summarisation; zero retains the full history. |
| Maximum input tokens | Settings › AI › Accounts › Advanced context settings | website | Not set: uses the selected model's input limit, or 32,000 tokens if unavailable | Powerfront, on request | Sets the adaptive input budget, subject to the selected model's limit. |
| Start compaction at | Settings › AI › Accounts › Advanced context settings | website | Not set; 60% of the effective input limit | Powerfront, on request | Starts background summarisation of older context as the prompt grows. |
| Soft reduction limit | Settings › AI › Accounts › Advanced context settings | website | Not set; 80% of the effective input limit | Powerfront, on request | Starts a simpler reduction if background summarisation is not ready. |
| Post-compaction target | Settings › AI › Accounts › Advanced context settings | website | Not set; 45% of the effective input limit | Powerfront, on request | Sets the target size for reduced older context. |
| Maximum run time (seconds) | Settings › AI › Accounts › Advanced context settings | website | 1800 seconds | Powerfront, on request | Sets the managed run's elapsed-time allowance for further tool use. |
| Maximum wake delay (seconds) | Settings › AI › Accounts › Advanced context settings | website | 300 seconds | Powerfront, on request | Caps the delay requested before a continuing run's next turn; new input can wake it sooner. |
| Enable Continue Work | Settings › AI › Accounts › Advanced context settings | website | Off | Powerfront, on request | Allows managed runs to issue interim updates and continue working. |

### Permissions

| Permission | Lets you |
|---|---|
| Settings | Select the feature's context mode when AI is allowed under Settings Permissions. |
| AI | Allows AI configuration within Settings Permissions. |
| Developer | Select the feature's context mode. |

## Limits and good to know

- **Simple Context (Legacy)** does not provide managed continuation.
- Token budgets use estimates rather than exact provider counts. Protected recent input can still be too large for the model.
- Compaction can require an additional AI request. A failed summarisation can fall back to a simpler digest.
- Continuation still uses the run's function and token allowances. Extending the time allowance alone does not grant unlimited work.
- Continued work is not a promise that a waiting task survives a service restart.

## Depends on and works with

### This feature uses

- **Requires** [AI run limits](AI-014.md): Managed continuation operates within an AI run and its remaining execution allowances.
- **Configured in** [Roles and permissions](ADM-008.md): Roles and AI permissions control feature configuration.
- **Configured in** [AI feature settings and change history](AI-001.md): Each supported feature chooses its context mode.
- **Configured in** [AI accounts and shared defaults](AIP-001.md): Powerfront manages shared account context and continuation settings.
- **Configured in** [AI model catalogue](AIP-002.md): Model input limits determine the adaptive budget when no override is supplied.
- **Works better with** [Custom scripts managed by Powerfront](EXT-015.md): A Powerfront-arranged custom compiler can prepare the context while retaining protected instructions and recent input.

### Used by

- **Configures** [AI run limits](AI-014.md): Managed context uses its maximum run time instead of the normal function-seconds allowance.
- **Configures** [AI accounts and shared defaults](AIP-001.md): Context Compiler settings define the shared context and continued-work defaults used by the account's features.
- **Configures** [AI platform execution limits](AIP-024.md): Managed context and continued-work settings determine applicable run and wake-delay limits.
- **Enhances** [AI assistance activity](AI-033.md): Context compaction can add separate AI usage.
- **Enhances** [AI commerce functions and access limits](COM-029.md): Managed continuation lets an assistant continue commerce work within the current customer access.

## FAQ and troubleshooting

### Why did the agent stop after sending an update?

Check that it uses a managed context mode and that Powerfront has enabled **Enable Continue Work**. It must also request continuation and have execution allowance remaining.

### Will a new message cancel the work?

Managed runs can admit new input into the active work and wake earlier. Other response paths can replace an older request.

### Does compaction erase the conversation?

No. It changes the shorter view sent to the model while retaining the underlying working history.

### Why does a long conversation still exceed the model limit?

Recent input and protected instructions may already exceed the budget. Ask Powerfront to review the model, input allowance and **Recent messages kept verbatim** setting.
