Repository navigation
fix(agent): retain native request failure outcomes and step latency - #142
Merged
Merged
Conversation
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failed primary agent steps now retain native kind, explicit retryability and reported code in an
agent.errordata record. Capture the thirdagent:stepreturn 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.errorrow 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 andcreated_data_ids()gain one entry. Successful and truncatedagent.actionrecords add optionalmetadata.latency_msfor the complete primary step. Searches of Kickside, providers and components find no fixed-count dependency: chat selects actions/observations, workflow output projection selectsnode.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.