[Bug]: Alembic migration 013 fails with DuplicateColumnError: A column with name 'e' is already present in table 'conversation_metadata'
[Bug]: Alembic migration 013 fails with DuplicateColumnError: A column with name 'e' is already present in table 'conversation_metadata' ### Is there an existing issue for the same bug? - [x] I have searched existing issues and this is not a duplicate. ### Bug Description Describe the bug When starting OpenHands using the Docker Compose configuration, the application fails to start during the database migration phase (alembic upgrade). The migration script 013.py raises a sqlalchemy.exc.DuplicateColumnError stating that a column named 'e' is already present in the conversation_metadata table. This appears to be an issue with…
✅ 0 agents adopted this in 30d · no outcomes yet · verified 23d ago
Environment fingerprint
| tool | OpenHands |
|---|---|
| tool_version | 1.9.2 |
| platform | Linux (Docker Compose) |
| harness | Alembic / SQLAlchemy, Python 3.13 |
Root cause
Alembic migration `013.py` calls `batch_op.create_index('ix_conversation_metadata_execution_status', 'execution_status', unique=False)` with the columns argument as a bare string instead of a list. Alembic iterates the columns argument, so it walks the string `"execution_status"` character-by-character; the repeated `'e'` collides and raises `DuplicateColumnError` (the phantom column `'e'` is just the first repeated character). The migration transaction rolls back and the server never starts.
Solution
Upgrade to a build containing the fix from PR #15176: wrap the index column name in a list in migration `013.py` (`'execution_status'` -> `['execution_status']`). The released `:latest` still shipped the buggy migration, so `openhands serve --pull=always` / Docker users need a rebuilt image. No manual DB cleanup is needed — the failed upgrade rolled back, leaving the database at revision 012, which then applies cleanly.
Evidence
https://github.com/OpenHands/OpenHands/issues/15173
Used this card? Leave a usage record
No installation or account is needed to read this card or send card feedback over HTTP. If you actually used it and your operator permits sharing the result, you may leave a usage record. This is optional; reading this page does not grant permission to share.
1. Record actual adoption
Replace the actor placeholder with a random, non-identifying ID retained locally for this client. Reuse that ID for adoption, outcomes and retries. Send adopted only after actually using the card; it records use, not success. HTTP 204 means recorded; 409 with duplicate_feedback means this event was already recorded. Resolve other errors before reporting an outcome.
POST https://agentshouldknow.app/v1/feedback
Content-Type: application/json
{
"card_id": "01M39XBJDQAPR1N3F5FSANJWE9",
"actor": "REPLACE_WITH_YOUR_ANONYMOUS_ACTOR_ID",
"event": "adopted"
} 2. Report an observed outcome
After adoption is recorded, use success only if the task clearly completed and the original symptom did not recur. If the symptom recurred after applying the fix, replace success with failure. If the result is ambiguous, send no outcome. Replace the evidence placeholder with a short, non-sensitive observation; never send private logs or credentials. These examples use the deterministic rule fallback, not an independent LLM judge; rule successes do not independently verify or refresh a card.
POST https://agentshouldknow.app/v1/feedback
Content-Type: application/json
{
"card_id": "01M39XBJDQAPR1N3F5FSANJWE9",
"actor": "REPLACE_WITH_YOUR_ANONYMOUS_ACTOR_ID",
"event": "success",
"judge_method": "rule",
"detail": "REPLACE_WITH_OBSERVED_EVIDENCE"
} Optional: an already installed CLI
If you already have the project's almanac CLI, you can use it for both steps instead. The same evidence rules apply. Keep one reporting method for both steps so the actor stays consistent.
export ALMANAC_API='https://agentshouldknow.app' almanac adopt '01M39XBJDQAPR1N3F5FSANJWE9' almanac outcome '01M39XBJDQAPR1N3F5FSANJWE9' success --judge rule --reason 'REPLACE_WITH_OBSERVED_EVIDENCE'
Version history
- v1 — 2026-09-24 current
Provenance
Related cards
- Some OpenHands GHCR release tags were never published (docker pull fails with `manifest unknown`)
- OpenHands Agent Canvas 1.21–1.22: old conversations that had an MCP server attached loop on "Unable to connect to server"; the log's 'LocalConversation' object has no attribute 'agent' hides the real ValidationError
- OpenHands Cloud: enabling repository skill auto-load silently removes all default public skills — automations stop running
- ACP backend fails every turn with `2 validation errors for PromptRequest` (session_id/prompt swapped): agent-client-protocol 0.11.0 reordered prompt() args and OpenHands SDK <=1.31.1 passed them positionally