openclaw - 💡(How to fix) Fix [Bug] v2026.3.11: Session resolver in compact lacks delivery-context lookup [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#44451Fetched 2026-04-08 00:46:50
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

El session resolver en dist/compact-1mmJ_KWL.js no implementa lookup por delivery context (channel + to + accountId). Solo usa lógica de fallback que termina en agent:*:main.

RAW_BUFFERClick to expand / collapse

Bug Summary

En OpenClaw v2026.3.11, el session resolver dentro del comando agent en dist/compact-1mmJ_KWL.js no realiza lookup por delivery context, causando que las sesiones se resuelvan incorrectamente a agent:*:main en lugar de la sesión viva del canal objetivo.

Síntomas Observados

  • El comando agent resuelve sesión main aunque exista una sesión viva para el delivery target
  • Inconsistencia entre el routing del CLI gateway y el routing interno del comando
  • Las respuestas del agente no se asocian correctamente a la sesión del canal/thread

Root Cause

El session resolver en dist/compact-1mmJ_KWL.js no implementa lookup por delivery context (channel + to + accountId). Solo usa lógica de fallback que termina en agent:*:main.

Archivo Afectado (dist/ compilado)

  • dist/compact-1mmJ_KWL.js - Session resolver del comando agent sin delivery context lookup

Parche Manual Aplicado (Local)

Archivo: dist/compact-1mmJ_KWL.js

  • Agregado lookup por delivery context dentro del session resolver del comando agent
  • Búsqueda de sesión existente por combinación de channel + to + accountId
  • Fallback a main solo cuando no se encuentra sesión específica

Validación Post-Parche

  • ✅ El comando agent resuelve correctamente sesiones por delivery context
  • ✅ Consistencia entre CLI gateway y comando interno
  • ✅ Las respuestas se asocian a la sesión correcta del canal

Riesgo de Regresión

ALTO: Este es un parche manual sobre archivos compilados en dist/. Se perderá en la próxima actualización/reinstalación de OpenClaw.

Entorno

  • OpenClaw: v2026.3.11
  • Archivo: dist/compact-1mmJ_KWL.js
  • Fecha del parche: Marzo 2026

extent analysis

Fix Plan

To resolve the session resolver issue in the agent command, follow these steps:

  • Modify the dist/compact-1mmJ_KWL.js file to include a lookup by delivery context within the session resolver.
  • Implement a search for an existing session by combining channel, to, and accountId.
  • Use the fallback to agent:*:main only when a specific session is not found.

Example code changes:

// Modified session resolver function
function resolveSession(deliveryContext) {
  const { channel, to, accountId } = deliveryContext;
  const sessionKey = `agent:${channel}:${to}:${accountId}`;
  
  // Check if a session exists for the delivery context
  if (sessionExists(sessionKey)) {
    return sessionKey;
  }
  
  // Fallback to main session if no specific session is found
  return 'agent:*:main';
}

// Helper function to check if a session exists
function sessionExists(sessionKey) {
  // Implement logic to check if a session exists for the given key
  // Return true if the session exists, false otherwise
}

Verification

After applying the fix, verify that:

  • The agent command resolves sessions correctly by delivery context.
  • There is consistency between the CLI gateway and internal command routing.
  • Responses are associated with the correct session for the channel.

Extra Tips

To prevent regression, consider:

  • Implementing the fix in the source code to ensure it persists across updates.
  • Automating the patching process to minimize manual intervention.
  • Monitoring the session resolver functionality to detect any potential issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING