agent-engine-troubleshoot-deploy
Skill8 starsChanged 26 days agoApache-2.0View on GitHub
Diagnose failed or stuck deployments using the agentengine CLI. Guides through status checks, deploy event logs, and runtime logs to identify the root cause and recommend fixes.
- Reads credentials
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 26
If you see not logged in or not initialized, run agentengine auth login and agentengine init first.
- Distinctive: line 32
Run these in order — each reveals a different layer of the deployment stack.
- Distinctive: line 140
Add these secrets at the project level (not workspace level):
- Distinctive: line 143
Wait 1–2 minutes for secrets to propagate
- Very specific: line 172
Make sure you're editing the correct Atlas project (the one your MONGODB_URI points to)
- Distinctive: line 173
Add the platform egress CIDR ranges (contact your platform administrator for the current list)
- Very specific: line 203
Ensure the user has at least readWriteAnyDatabase (or scoped to your database)
- Very specific: line 206
Update MONGODB_URI in Project → Secrets if needed
- Distinctive: line 274
If the error persists after redeploying (e.g., on older memory-server builds), manually drop the legacy-named index in Atlas Data Explorer …
- Distinctive: line 308
Remove any leading/trailing whitespace
- Very specific: line 333
If ImagePullBackOff persists after a fresh deploy, contact support — this indicates a platform-side registry issue.
- Distinctive: line 379
Verify platform operator logs show no new OE or memory-server errors
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Troubleshoot Failed Deployments
Diagnose deployments that are stuck, failed, or succeeded-but-not-working using only the agentengine CLI.
Prerequisites
Authenticate before running any diagnostic commands:
agentengine auth loginConfirm you're targeting the correct workspace:
agentengine statusIf you see not logged in or not initialized, run agentengine auth login and agentengine init first.
Quick Diagnostic Survey
Run these in order — each reveals a different layer of the deployment stack.
Step 1: Check overall state
agentengine status --verboseThis shows: workspace state (ready / failed / degraded / deploying), component health, deployment ID, and image details.
Step 2: Check deployment events
agentengine deploy logs --severity errorShows error-level events from the most recent deployment timeline.
Step 3: Check runtime logs by service
# Agent execution runtime (your code)
agentengine logs --source agent --level error --since 30m
# Tool executor
agentengine logs --source tool --level error --since 30mOE and memory-server logs are platform operator logs. Use the admin UI or
GET /api/v1/operator-logs with deploy-viewer access for those services.
Step 4: If the build failed
agentengine build list
agentengine build logs <build-id>Decision Tree
Deploy failed?
│
├─ Failed in under 5 minutes?
│ → Infrastructure dependency issue (OE or memory-server can't start)
│ → Check: agentengine deploy logs --severity error
│ → Check: platform operator logs in admin UI or /api/v1/operator-logs
│ → See: "Deploy Fails Fast" below
│
├─ Timed out after ~30 minutes?
│ → A component couldn't reach a healthy state
│ → Check: agentengine deploy logs (look for which component stalled)
│ → See: Common Issues section (secrets, Atlas connectivity, auth)
│
├─ "ImagePullBackOff" in deploy events?
│ → Image no longer available in registry
│ → Fix: agentengine deploy (creates a fresh image)
│ → If persists after redeploy → contact support
│
├─ "exec: --work: executable file not found" in events?
│ → Platform-side rollback issue — contact support
│
└─ Build failed?
→ agentengine build logs <build-id>
→ Check Dockerfile, dependencies, or syntax errors
Deploy succeeded but workspace doesn't respond?
│
├─ agentengine status shows "degraded"?
│ → agentengine status --verbose (identify unhealthy component)
│ → Check logs for that component
│
├─ "code = Unimplemented" errors when invoking?
│ → Fix: agentengine deploy (forces routing reconciliation)
│
└─ Agent crashes after startup?
→ agentengine logs --source agent --level error --since 1h
→ Look for stack traces or connection errorsCommon Issues
1. Project Secrets Missing or Misconfigured
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=orchestration-engine, search="MONGODB_URI is required"
# service=memory-server, search="VOYAGE_API_KEY"What you'll see:
- OE:
MONGODB_URI is required - Memory server:
VOYAGE_API_KEY not set, embeddings will not be availablefollowed by crashes
Why this happens:
Secrets were set at the workspace level instead of the project level. The orchestration engine and memory server are shared across all workspaces in a project — they only read project-level secrets.
How to fix:
- Open the UI → Project → Secrets
- Add these secrets at the project level (not workspace level):
MONGODB_URI— your MongoDB Atlas connection stringVOYAGE_API_KEY— your Voyage AI API key (required if memory is enabled)
- Wait 1–2 minutes for secrets to propagate
- Redeploy:
agentengine deploy
2. Atlas IP Access List Mismatch
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=memory-server, search="TLSV1_ALERT_INTERNAL_ERROR"
# service=memory-server, search="ServerSelectionTimeoutError"
# service=orchestration-engine, search="tls: internal error"What you'll see (any of these):
[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal errorServerSelectionTimeoutError: ... error=NetworkTimeoutFailed to initialize MongoDB ... tls: internal error
Why this happens:
Your Atlas project's IP Access List doesn't include the platform's egress IP addresses. Atlas rejects the connection at the TLS layer, making the error look like a TLS issue rather than a network access issue.
How to fix:
- Go to Atlas → Network Access → IP Access List
- Make sure you're editing the correct Atlas project (the one your
MONGODB_URIpoints to) - Add the platform egress CIDR ranges (contact your platform administrator for the current list)
- Connections will succeed on the next retry — or redeploy:
agentengine deploy
Common mistake: Adding IPs to the wrong Atlas project. If you have multiple Atlas projects, add the allowlist to the one containing your target cluster.
3. Atlas Authentication Failure
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=memory-server, search="Authentication failed"
# service=memory-server, search="bad auth"
# service=orchestration-engine, search="authentication failed"What you'll see (either of these):
Authentication failed., full error: {..., 'code': 18, 'codeName': 'AuthenticationFailed'}(user doesn't exist)bad auth : authentication failed, code 8000, codeName AtlasError(wrong password)
Why this happens:
The username or password in your MONGODB_URI is wrong, the database user doesn't exist on the target cluster, or the user doesn't have sufficient permissions.
How to fix:
- Atlas → Database Access → confirm the user in your URI exists
- Ensure the user has at least
readWriteAnyDatabase(or scoped to your database) - URL-encode special characters in the password (
@→%40,#→%23) - Confirm
authSource=adminis in your URI (standard for Atlas) - Update
MONGODB_URIin Project → Secrets if needed - Redeploy:
agentengine deploy
4. Atlas Search Index Limit Exceeded
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=memory-server, search="maximum number of FTS indexes"What you'll see:
The maximum number of FTS indexes has been reached for this instance size
Why this happens:
The memory server creates ~10 search indexes. Small Atlas tiers have low caps:
| Atlas Tier | Search Index Limit |
| M0 / M2 / M5 (free/shared) | 3 |
| Flex | varies (low) |
| M10 | 25 |
| M20+ | higher |
How to fix (choose one):
- Recommended: Upgrade your Atlas cluster to M10 or above
- Alternative: Drop unused search indexes from the cluster:
// In Atlas Data Explorer or mongosh: // Replace the placeholder with the database reported by memory-server startup logs. db = db.getSiblingDB("<resolved_memory_database>") db.<collection>.aggregate([{ $listSearchIndexes: {} }]) db.<collection>.dropSearchIndex("<unused-index-name>")
5. Legacy Index Name Conflict
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=memory-server, search="IndexOptionsConflict"What you'll see:
Index already exists with a different name: session_counters_session_id_org_id_unique, code 85 IndexOptionsConflict
Why this happens:
An older platform version created an index under an auto-generated name. The current version tries to create the same index under a new explicit name — MongoDB rejects the duplicate.
How to fix:
On current tenant software, a redeploy usually auto-clears this — the memory server drops conflicting legacy indexes on boot:
agentengine deployIf the error persists after redeploying (e.g., on older memory-server builds), manually drop the legacy-named index in Atlas Data Explorer or mongosh:
// Replace the placeholder with the database reported by memory-server startup logs.
db = db.getSiblingDB("<resolved_memory_database>")
db.session_counters.dropIndex("session_counters_session_id_org_id_unique")The memory server will recreate the index correctly on its next startup attempt.
6. Malformed MONGODB_URI
How to detect:
# Use platform operator logs (admin UI or /api/v1/operator-logs)
# service=memory-server, search="Invalid URI"
# service=memory-server, search="Invalid MongoDB URI"What you'll see:
Invalid URI scheme: URI must begin with 'mongodb://' or 'mongodb+srv://'
Why this happens:
The MONGODB_URI value is missing the protocol prefix, has extra whitespace, or uses an incorrect format.
How to fix:
- Go to Project → Secrets in the UI
- Edit
MONGODB_URI— ensure it starts withmongodb://ormongodb+srv:// - Remove any leading/trailing whitespace
- Correct format:
mongodb+srv://user:password@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority - Redeploy:
agentengine deploy
7. Stale Image (ImagePullBackOff)
How to detect:
agentengine deploy logs --severity error
# Look for: "ImagePullBackOff" or "Failed to pull image ... not found"Why this happens:
The workspace hasn't been deployed recently, and the previous image was cleaned up from the registry.
How to fix:
agentengine deployIf ImagePullBackOff persists after a fresh deploy, contact support — this indicates a platform-side registry issue.
8. Routing Mismatch (Unimplemented Errors)
How to detect:
- Invoking the agent returns:
rpc error: code = Unimplemented agentengine statusshowsreadybut the agent doesn't respond
Why this happens:
A workspace migration left internal routing in an inconsistent state.
How to fix:
agentengine deployA fresh deploy forces the platform to reconcile routing. If errors persist after redeploy, contact support.
9. Deploy Fails Fast (Dependencies Unhealthy)
How to detect:
# Deploy failed in under 5 minutes
agentengine deploy logs --severity error
# Check underlying services in platform operator logs:
# service=orchestration-engine, level=ERROR
# service=memory-server, level=ERRORWhy this happens:
Your agent depends on the orchestration engine or memory server at startup. If those services are down (due to Atlas issues, missing secrets, etc.), your agent exits immediately → repeated crashes → deploy marked as failed.
How to fix:
- Do NOT immediately redeploy — the same failure will recur
- Identify and fix the underlying issue (usually one of issues 1–6 above)
- Verify platform operator logs show no new OE or memory-server errors
- Then redeploy:
agentengine deploy
When to Contact Support
Contact support if you see any of these — they indicate platform-side issues you cannot fix:
| Signal | Meaning |
exec: --work: executable file not found in deploy events | Platform rollback corruption |
ImagePullBackOff persists after a fresh agentengine deploy | Platform registry issue |
| Deploy fails repeatedly with no errors in workspace logs | Platform component failure |
agentengine status shows not_deployed immediately after deploying | Platform lost deployment state |
| All components healthy but agent unreachable | Platform routing issue |
Gathering info for a support request:
agentengine status --verbose --json > status.json
agentengine deploy logs --json > deploy-events.json
agentengine logs --all --since 2h --json > runtime-logs.json
agentengine deploy list --limit 5 --json > deploy-history.jsonInclude your workspace ID, project ID, deployment ID, and these JSON files.
Command Reference
| Command | What It Shows |
agentengine status | Workspace state: ready, failed, degraded, deploying |
agentengine status --verbose | Component-level health, IDs, image details |
agentengine status --json | Machine-readable output (for sharing with support) |
agentengine deploy logs | Deployment event timeline (latest deploy) |
agentengine deploy logs --severity error | Error events only |
agentengine deploy logs -f | Follow events live during a deploy |
agentengine deploy get | Full deployment detail with components |
agentengine deploy get -f | Follow deployment until it completes |
agentengine deploy list --status failed | Recent failed deployments |
agentengine logs | Runtime logs (default: last hour) |
agentengine logs --source <sandbox> | Filter by sandbox: agent, tool |
agentengine logs --level error | Error-level only |
agentengine logs --grep "<text>" | Search messages (case-insensitive) |
agentengine logs --since 30m | Logs from the last 30 minutes |
agentengine logs -f | Tail logs in real-time |
agentengine logs --all --since 6h | All logs in time range (auto-paginates) |
agentengine build list | List builds |
agentengine build logs <build-id> | Stream build output |
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- mongodb-atlas-stream-processingSkill
- mongodb-connectionSkill
- mongodb-mcp-setupSkill
- mongodb-natural-language-queryingSkill
- mongodb-qe-size-estimationSkill
- mongodb-query-optimizerSkill
- mongodb-schema-designSkill
- mongodb-search-and-aiSkill
- mongodb-connectionSkill
- mongodb-natural-language-queryingSkill
- mongodb-query-optimizerSkill
- mongodb-schema-designSkill
- mongodb-search-and-aiSkill
- agent-engine-feature-validationsSkill
- atlas-agent-engine-docsSkill
- atlas-agent-engineSkill
- chat-sdk-add-adapterSkill
- chat-sdkSkill
- deploy-mongodb-agentsSkill
- gh-stackSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

