Provide complete error logs, stack traces, and contextual metadata when asking the Agent for debugging help. Full logs allow deterministic root cause analysis and reduce back-and-forth.
1. More context beats less context. Partial logs increase investigation time.
2. Include environment and runtime metadata to rule out platform differences.
3. Show the exact sequence of steps that led to the error whenever possible.
4. Redact secrets but preserve all technical detail needed to reproduce.
Step 1 — Capture the full error output
Step 2 — Provide environment and runtime metadata
Step 3 — Add the minimal reproduction context
Step 4 — Include related artifacts for the Agent to run
Step 5 — Redact secrets safely and state what was redacted
'Error occurred. Please fix.'
Problems: It lacks stack, context, and reproducer. The Agent cannot determine which part of the code triggered the failure.
'Error: TypeError: Cannot read property of undefined
at processOrder (src/services/order.js:128:24)
at runPipeline (src/pipeline/index.js:45:12)
at Object.<anonymous> (src/cli/run.js:10:5)
Environment: Node 18.12.1, Linux x86_64, memory 8GB
Dependencies: service-core@2.3.0, pricing@1.1.4
Request payload: { orderId: 12345, items: [ { id: 1, qty: 2 } ] }
Recent change: replaced pricing call with new bulk endpoint on 2025-10-02'
Benefits: The Agent can reproduce the failure, trace the stack to the exact file and line, and suggest targeted fixes.
"Here is the full error log and environment metadata. Explain the root cause and propose a minimal fix."
"Run this reproduction snippet and show the stack trace and variable snapshots at the error line."
"Trace execution from the entry point to the error and list assumptions that are invalid."