Files
LangBot/skills/skills/langbot-testing/cases/claude-code-agent-debug-chat.yaml
T
2026-08-01 09:23:41 +08:00

73 lines
3.6 KiB
YAML

id: claude-code-agent-debug-chat
title: "Claude Code Agent can retrieve LangBot history through MCP"
mode: agent-browser
area: pipeline
type: regression
priority: p2
risk: high
ci_eligible: false
tags:
- agent-runner
- claude-code
- external-runner
- mcp
- pipeline
skills:
- langbot-env-setup
- langbot-testing
env:
- LANGBOT_FRONTEND_URL
- LANGBOT_BACKEND_URL
env_any:
- LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_URL|LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_NAME
automation: scripts/e2e/pipeline-debug-chat.mjs
automation_env:
- LANGBOT_FRONTEND_URL
- LANGBOT_BACKEND_URL
- LANGBOT_BROWSER_PROFILE
- LANGBOT_CHROMIUM_EXECUTABLE
- LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_URL
- LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_NAME
automation_pipeline_url_env: LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_URL
automation_pipeline_name_env: LANGBOT_CLAUDE_CODE_AGENT_PIPELINE_NAME
automation_expected_runner_id: "plugin:langbot-team/ClaudeCodeAgent/default"
automation_reset_debug_chat: "1"
automation_prompts_json: '[{"prompt":"Remember this exact passcode for the LangBot conversation: claude-history-proof-6384. Do not repeat the passcode. Reply exactly CLAUDE_HISTORY_SEEDED with no other text.","expected_text":"CLAUDE_HISTORY_SEEDED","response_timeout_ms":"600000"},{"prompt":"This CLI turn has no reused Claude session. Recover the passcode from LangBot history by calling mcp__langbot_agent__langbot_history_page exactly once. If ToolSearch is available here, first load the tool with select:mcp__langbot_agent__langbot_history_page and call it directly. If this is a coordinator session that exposes only delegation tools, delegate to exactly one worker and require that worker to perform the same ToolSearch-then-call flow, then wait for its result. Use only the returned LangBot history. If the MCP call fails, do not guess or claim success. Reply with only the recovered passcode.","expected_text":"claude-history-proof-6384","response_timeout_ms":"600000"}]'
automation_expected_text: "claude-history-proof-6384"
automation_response_timeout_ms: "600000"
preconditions:
- "Claude Code CLI is installed, authenticated, and runnable non-interactively by the LangBot plugin process."
- "The configured workspace exists and is writable by the Claude Code CLI."
- "The pipeline has reuse-session=false so the second turn cannot use Claude CLI session memory."
steps:
- "Open LANGBOT_FRONTEND_URL."
- "Open the Claude Code Agent QA pipeline."
- "Confirm the pipeline runner is plugin:langbot-team/ClaudeCodeAgent/default."
- "Open Debug Chat, seed the passcode, then ask a fresh Claude CLI turn to recover it through mcp__langbot_agent__langbot_history_page."
checks:
- "UI: The first Bot message contains CLAUDE_HISTORY_SEEDED and the second contains claude-history-proof-6384."
- "Runner evidence: The second run records a real LangBot history MCP tool call in the main session or one delegated worker, not only model text."
- "Logs: The request completes without claude_code process, MCP, approval, or runtime errors."
- "Console: No unexpected frontend errors appear during Debug Chat."
evidence_required:
- ui
- screenshot
- console
- backend_log
success_patterns:
- "CLAUDE_HISTORY_SEEDED"
- "claude-history-proof-6384"
- "Streaming completed"
failure_patterns:
- "claude_code.command_not_found"
- "claude_code.process_exited"
- "not available among the connected MCP tools"
- "not accessible in this session"
- "No such tool available"
- "Agent runner not found"
- "Agent runner plugin:langbot-team/ClaudeCodeAgent/default execution failed"
troubleshooting:
- backend-not-listening
- plugin-runtime-timeout
- proxy-env-mismatch