Skip to content

feat(signals): record model usage per user from each run's outcome - #31

Merged
blockchainluffy merged 4 commits into
mainfrom
feat/usage-tracking
Oct 30, 2026
Merged

blockchainluffy merged 4 commits into
mainfrom
feat/usage-tracking

Conversation

@blockchainluffy

Copy link
Copy Markdown
Contributor

No description provided.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread src/pi/runtime.ts Outdated
* How long a Run may take, in milliseconds, before the runtime sends `abort` to pi. Defaults to
* 15 minutes. The Run fails with the usage reported so far.
*/
readonly timeoutMs?: number;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the timeout should be out of scope of this PR, and is not trivial. If we add it we should distinguish between an actually stuck agent and a response that just takes a long to generate

@blockchainluffy blockchainluffy Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue when we dont have timeout is, we cannot record usage for any agent call before the hung agent call and will be charged for tokens used in those. Maybe, having it as optional is better and then suggesting to use it? lmk your thoughts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, the timeout should be if no token gets generated and not on the run itself and deserves another issue

blockchainluffy and others added 3 commits October 30, 2026 11:39
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
feat(signals): stop runs that go past a usage limit
@blockchainluffy
blockchainluffy merged commit 0c6daa2 into main Oct 30, 2026
1 check failed
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.

2 participants