You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e8ebd0f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,22 @@ asyncio.run(main())
157
157
158
158
Every method shown in this document has an async counterpart with the same name and signature. Async streams are opened with `async with await client.sessions.events.stream(...)`.
159
159
160
+
## Environment startup scripts
161
+
162
+
Both Forward and Managed accept `config.startup_script`. For cloud environments,
163
+
it runs after `setup_script` on the first sandbox start and again on every resume,
164
+
before the first tool call. The server enforces a 64 KB limit and a 5-minute
165
+
timeout. Scripts must exit; start long-lived services in the background and wait
166
+
for readiness when needed.
167
+
168
+
Failure emits a `session.error` event whose `error.type` is
169
+
`environment_startup_failed_error`; the session and sandbox remain usable.
170
+
The script is not retried during the same start. For self-hosted environments,
171
+
the API stores and returns the script; execution depends on the external worker.
172
+
See the official [Forward](https://docs.qoder.com/cloud-agents/api/forward/environments/schemas#environment-startup-script)
173
+
and [Managed](https://docs.qoder.com/cloud-agents/api/environments/schemas#environment-startup-script)
174
+
contracts.
175
+
160
176
## Streaming
161
177
162
178
Streaming responses are consumed incrementally. Close the stream when finished and handle interruption explicitly; closing a local stream does not cancel server-side work.
0 commit comments