Formation chose done, one next objective, or escalation
campaign_paused
Provider unavailability paused a non-terminal campaign
campaign_escalated
Campaign halted for budget, failure, rule, or owner judgment
campaign_completed
Required done evidence proved the mission complete
campaign_cancelled
An owner abandoned the mission before its evidence was met
campaign_cancelled payload
Flattens the shared terminal payload (campaign, project, reason,
cycles_completed, cycles_landed) so generic terminal observers parse it
unchanged, and adds the operator's disposition choices.
Field
Type
Description
terminated_now
bool
The in-flight workflow was aborted rather than left to finish
discard_work
bool
The terminated cycle's uncommitted work was thrown away
aborted_event_id
string?
Root event of the aborted workflow; absent for a graceful stop
An aborted run never reaches trace persistence, so aborted_event_id is the
only handle onto its partial events in the JSONL log — foundry trace has
nothing to show for it.
campaign_advance_requested payload
Field
Type
Description
campaign
string
Campaign name
run_event_id
string (optional)
Typed task result that triggered the advance
run_result
object (optional)
Full task_run_completed payload
campaign_advance_completed payload
Field
Type
Description
campaign
string
Campaign name
project
string
Registered project name
cycles_completed
integer
Tasks dispatched by the campaign
cycles_landed
integer
Task results whose task_run_completed.landed field was true
Each results[] entry includes an optional duration_ms field (unsigned
integer) recording how long the gate command took in milliseconds. This field is
absent when loading results from events persisted before timing instrumentation
was added.
A results[] entry also carries an optional fix_applied boolean: true when
the gate initially failed but its fix_command repaired the working tree and
the re-check then passed (a self-healed gate). The field is omitted when false,
so it is absent for gates that passed clean and for events persisted before
self-healing gates were added.
Each results[] entry includes an optional duration_ms field (unsigned
integer) recording how long the gate command took in milliseconds. This field is
absent when loading results from events persisted before timing instrumentation
was added.
A results[] entry also carries an optional fix_applied boolean: true when
the gate initially failed but its fix_command repaired the working tree and
the re-check then passed (a self-healed gate). The field is omitted when false,
so it is absent for gates that passed clean and for events persisted before
self-healing gates were added.
Emitted by foundryd whenever a Foundry-launched Claude Code agent session
begins or ends. Used by visualisation tools (e.g. ops-visualizer) to show
in-flight and historical agent activity, and to locate the per-session
stream-json transcript on disk.
Type
Description
agent_session_started
An agent session has begun; transcript file path is included
agent_session_ended
The agent session has finished (success, failure, or unavailable)
agent_session_started payload
Field
Type
Description
session_id
string
UUID identifying this session; matches the transcript file basename
agent_type
string
Agent runtime (currently always claude-code)
project
string
Project name (may be empty in v1)
working_dir
string
Absolute path of the working directory the agent ran in
source_log_path
string
Absolute path to the per-session JSONL transcript (~/.foundry/agent-sessions/<session_id>.jsonl)
capability
string
Capability label: reasoning, coding, or quick
access
string
Tool access level: read_only or full
started_at
RFC 3339 timestamp
When the session was launched
trace_id
string
Correlating trace ID (may be empty in v1)
agent_session_ended payload
Field
Type
Description
session_id
string
UUID identifying this session (matches agent_session_started)
status
string
Outcome: ok, agent_failed, or unavailable
exit_code
number
Process exit code (omitted when the agent could not be invoked)
ended_at
RFC 3339 timestamp
When the session finished
bytes_written
number
Total bytes streamed to the transcript file
error
string
Error message when status = unavailable (omitted otherwise)