deepseek-ai/deepseek-harness · error · TargetPressureConfigError

compaction-basic: no context capacity for ${targetKey}; conf

Error message

compaction-basic: no context capacity for ${targetKey}; configure contextWindow on that adapter model

What it means

Error "compaction-basic: no context capacity for ${targetKey}; configure contextWindow on that adapter model" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/compaction/compaction-basic/src/index.ts:297

    // Overflow always qualifies; pressure first resolves the routed model's
    // capacity and checks its target-specific threshold.
    const prune = this.ctx.get('toolResultPruner')

    if (trigger === 'context-overflow') {
      if (prune !== undefined) {
        prune.pruneSession(agent.session)
        measurement = meter.measure(agent.session)
      }
      const range = selectCompactableRange(agent.session, measurement, 0)
      if (range === null) return null
      return this.compactRegion(range.start, range.end, agent, signal)
    }

    const context = (await this.ctx.llm.resolveModelInfo(target.provider, target.model, signal)).context
    assertNoActiveCompaction(agent.session, 'automatic pressure compaction')
    const targetKey = `${target.provider}/${target.model}`
    if (context === undefined) {
      throw new TargetPressureConfigError(
        targetKey,
        `compaction-basic: no context capacity for ${targetKey}; `
        + 'configure contextWindow on that adapter model',
      )
    }
    const spec = resolveCompactSpec(policy, context.contextWindow)
    if (measurement.totalTokens < spec.thresholdTokens) return null

    // Once pressure qualifies, land the model-free pass before choosing a
    // summary range, then remeasure through the singleton replay fold.
    if (prune !== undefined) {
      prune.pruneSession(agent.session)
      measurement = meter.measure(agent.session)
    }
    if (measurement.totalTokens < spec.thresholdTokens) return null

    let result: CompactionResult | null = null
    for (let attempt = 0; attempt <= spec.compactionRetries; attempt += 1) {

View on GitHub (pinned to b150a551b8)

Solutions

  1. Configure contextWindow on the adapter model for that target.

When it happens

Trigger: Thrown at packages/compaction/compaction-basic/src/index.ts:297 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/a4d32a5839cd5cbe. Report an issue: GitHub.