Skip to content

fix(agent): retain native request failure outcomes and step latency - #142

Merged
wolfy-j merged 2 commits into
masterfrom
fix/agent-call-outcomes
Nov 11, 2026
Merged

wolfy-j merged 2 commits into
masterfrom
fix/agent-call-outcomes

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Failed primary agent steps now retain native kind, explicit retryability and reported code in an agent.error data record. Capture the third agent:step return value for numeric token usage and finish reason. Older agents omit unavailable fields; arbitrary details, prompts and raw responses are not copied.

Persist the record independently through the existing synchronous commit API, sharing the node SDK data-command builder. A rejected telemetry write is logged and the node retains its original native error kind, retryability, message and details.

For consumers, this adds one agent.error row per failed primary step when persistence succeeds. The type is already declared in earlier releases, but the agent node does not previously write it for other failure paths. All-record listings and created_data_ids() gain one entry. Successful and truncated agent.action records add optional metadata.latency_ms for the complete primary step. Searches of Kickside, providers and components find no fixed-count dependency: chat selects actions/observations, workflow output projection selects node.result, and debug export lists arbitrary records.

Validation: official v0.3.59a with freshly resolved local dependency sources; 1,569 tests pass on SQLite and 1,569 on PostgreSQL. Scoped lint checks 231 entries without issues; static and diff checks pass. Regressions cover native kind/code/usage/finish reason, older-agent details, persistence refusal preserving the original error, independent queued commands and deliberate record counts.

Compatibility: existing records and optional-metadata readers require no migration. No existing ID, endpoint, contract, requirement or data shape changes. Storage uses the existing workflow data and commit tables and follows workflow deletion. With fixed workflow retention, 10x and 100x step volume produce 10x and 100x telemetry storage; indefinitely retained workflows have no finite steady-state size. No retention policy, table, service, setting or retry behavior is added.

@wolfy-j
wolfy-j merged commit 3751d7f into master Nov 11, 2026
8 checks passed
@wolfy-j
wolfy-j deleted the fix/agent-call-outcomes branch November 11, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant