24 days ago
Dear Railway Support,
I’m getting a recurring error when using the Agent in the Railway dashboard:
prompt is too long: 205123 tokens > 200000 maximum
This happens even with very short prompts, for example just asking the Agent to explain or design a basic RAG (Retrieval-Augmented Generation) setup for my project. So it seems the Agent is accumulating too much hidden context (system messages, history, project data, etc.) and exceeding the 200k-token limit, even when my current message is small.
Could you please:
- Check the Agent’s context management and reduce the internal context so short prompts don’t immediately exceed the limit; and
- Confirm which model/context window the Agent uses and if there is a way to reset or limit its internal context more aggressively?
- This issue is currently preventing me from using the Agent to debug deployments and design my RAG architecture.
Thank you,
1 Replies
24 days ago
The Agent builds its context from your project's services, configurations, variables, and logs. Your project has 10 services, so even a short prompt can produce a very large context payload. Starting a fresh Agent conversation (rather than continuing an existing thread) and scoping it to a single service will reduce the context size - in the CLI you can use railway agent --service <name>, and in the dashboard you can open the Agent from a specific service's canvas. If the error persists even when scoped to one service, the injected logs for that service alone may be too large, and you can fall back to the Observability tab for log analysis in the meantime.
Status changed to Awaiting User Response Railway • 24 days ago
17 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 17 days ago