A team wants an agent workflow to preserve task continuity between planning, tool invocation, and validation jobs. The state must be small enough for reviewers to inspect, large file details must move between jobs, and the execution job must not start until planning state exists. Which four actions should you perform in order? 1. Upload the state file as a workflow artifact 2. Define the state schema and allowed fields 3. Add needs from execution to the planning job 4. Store the state in repository secrets 5. Emit the state file path as a job output 6. Download the artifact before invoking the agent
Choose an answer
Tap an option to check your answer.
Correct answer: 2 → 5 → 1 → 3.
Why this is the answer
The correct order ensures a structured and reliable state transfer between jobs. First, you define the state schema (2) to ensure consistency and validate the data structure. Next, emit the state file path as a job output (5) so subsequent jobs know where to find the state. Then, upload the state file as a workflow artifact (1), making it persistently available across jobs. Finally, add a needs dependency from the execution job to the planning job (3), guaranteeing that the execution job only starts after the planning job has successfully completed and its state is available. Option 1 is incorrect because uploading the artifact before defining the schema or emitting the path is premature. Option 3 is incorrect because storing state in repository secrets (4) is not suitable for dynamic, job-specific state and is meant for sensitive, static credentials. Option 4 is incorrect because it misorders the steps, leading to an unworkable flow.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed