ArcpClient.SubmitAsync sends max_runtime_sec through JobSubmitPayload, but JobManager.SubmitAsync and JobManager.RunAsync never read it. A caller can request a runtime limit and the docs describe TIMEOUT and timed_out, but long-running agents continue until completion, lease expiration, cancellation, or transport shutdown.
The relevant locations are src/Arcp.Client/ArcpClient.Jobs.cs:15, src/Arcp.Client/ArcpClient.Jobs.cs:30, src/Arcp.Core/Messages/JobSubmitPayload.cs:24, and src/Arcp.Runtime/JobManager.cs:162.
Fix prompt: Add runtime-limit enforcement for JobSubmitPayload.MaxRuntimeSec. Store the requested limit on Job or pass it into RunAsync, create a linked cancellation source or watchdog using TimeProvider, and when the limit elapses emit job.error with FinalStatus = "timed_out", Code = ErrorCode.Timeout, and Retryable = true, then mark the job JobStatus.TimedOut. Ensure ordinary cancellation still reports CANCELLED and lease expiration still reports LEASE_EXPIRED. Add an integration test with a small maxRuntimeSec and an agent that waits indefinitely, then assert the client receives FinalStatus == "timed_out" and Error.Code == ErrorCode.Timeout.
ArcpClient.SubmitAsyncsendsmax_runtime_secthroughJobSubmitPayload, butJobManager.SubmitAsyncandJobManager.RunAsyncnever read it. A caller can request a runtime limit and the docs describeTIMEOUTandtimed_out, but long-running agents continue until completion, lease expiration, cancellation, or transport shutdown.The relevant locations are
src/Arcp.Client/ArcpClient.Jobs.cs:15,src/Arcp.Client/ArcpClient.Jobs.cs:30,src/Arcp.Core/Messages/JobSubmitPayload.cs:24, andsrc/Arcp.Runtime/JobManager.cs:162.Fix prompt: Add runtime-limit enforcement for
JobSubmitPayload.MaxRuntimeSec. Store the requested limit onJobor pass it intoRunAsync, create a linked cancellation source or watchdog usingTimeProvider, and when the limit elapses emitjob.errorwithFinalStatus = "timed_out",Code = ErrorCode.Timeout, andRetryable = true, then mark the jobJobStatus.TimedOut. Ensure ordinary cancellation still reportsCANCELLEDand lease expiration still reportsLEASE_EXPIRED. Add an integration test with a smallmaxRuntimeSecand an agent that waits indefinitely, then assert the client receivesFinalStatus == "timed_out"andError.Code == ErrorCode.Timeout.