How to See a Task's XComs in the Apache Airflow® UI
When one task hands a value to the next in Apache Airflow®, Airflow stores that value as an XCom. The UI shows every stored XCom, so you can check what a task returned without adding a single log line. This guide looks at the XComs of a two-task Dag on Airflow 3.4.0.
The Example
A Dag called pass_a_number has two TaskFlow tasks. pick_number returns 21, and double takes that number and returns it doubled.
Airflow's XCom documentation says XComs, "short for “cross-communications”", let tasks talk to each other, and that "An XCom is identified by a key (essentially its name), as well as the task_id and dag_id it came from." The XCom tab shows exactly those: each key, and its value.
Prerequisites
- Apache Airflow® running, for example with
airflow standalone, and itsdagsfolder in yourAIRFLOW_HOME.
Step 1: Write a Dag That Passes a Value
Create dags/pass_a_number.py:
from airflow.sdk import dag, task
@dag(schedule=None, tags=["demo"])
def pass_a_number():
@task
def pick_number() -> int:
return 21
@task
def double(number: int) -> int:
return number * 2
double(pick_number())
pass_a_number()

double(pick_number()) makes pick_number's return value the input of double. Airflow stores that value as an XCom between the two tasks, and it stores double's return value too.
Step 2: Open the First Task's XCom Tab
Trigger the Dag (How to Trigger a Dag from the Apache Airflow® UI walks through it) and wait for both tasks to turn green. Then open the Dag, click the run's square for pick_number in the grid on the left, and open the XCom tab:

There's one entry: return_value, with the value 21. return_value is the key Airflow uses for what a task returns. The documentation says "Many operators will auto-push their results into an XCom key called return_value", and "@task functions do this as well".
Step 3: Open the Second Task's XCom Tab
Click the run's square for double. The XCom tab stays selected:

double stored 42: it received the 21 and doubled it. Each task's tab shows what that task returned, so the two tabs together show the value at each step of the Dag.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Opening the Dag run instead of a task | The run's page has no XCom tab: its tabs are Task Instances, Asset Events, Audit Log, Code and Details | Click the task's square in the grid |
| Looking for the value a task received in that task's tab | A task's tab shows what it returned: double's tab shows 42, and the 21 it received is in pick_number's tab | Open the tab of the task that returned the value |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The XCom tab has no entries | The task returned nothing, or it was created with do_xcom_push=False. Neither stores an XCom | Return a value, or see How to Stop a Task from Pushing an XCom in Apache Airflow® with do_xcom_push=False |
FAQ
Can I see the XComs of every task in one place?
Yes. Click Browse in the menu on the left, then XComs. The list shows every XCom with its Dag, run, task, key and value. To narrow it to one Dag, click Add Filter, pick Dag ID and type the Dag's ID: with pass_a_number, it listed the two entries above, double with 42 and pick_number with 21.
How big can an XCom be?
Small. XComs "are only designed for small amounts of data", says the XCom documentation. Save large data to a file or a database and return its location.
Conclusion
Each task instance's XCom tab showed what that task stored: pick_number stored 21 under return_value, and double stored 42. When a value in a Dag looks wrong, open the XCom tab of each task in turn to find the step where it changed.
Additional Resources
Apache®, Apache Airflow and Airflow® are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.
