tinyhumansai/openhuman · error

Sentry.flush(2000) timed out — event may not have reached Se

Error message

Sentry.flush(2000) timed out — event may not have reached Sentry. Check network / DSN / Sentry status before retrying.

What it means

Argument-loop error from `parse_tick_flags` (the `openhuman subconscious tick` parser). Only `--workspace/-w`, `--mode/-m` (each consuming a value) and `--verbose/-v` are accepted; every other token aborts. Notably there is NO -h/--help arm inside this loop — help is recognized only at the top level — so `openhuman subconscious tick -h` also produces this error.

Source

Thrown at app/src/services/analytics.ts:583

  // event but doesn't influence the fingerprint.
  const stamp = new Date().toISOString();
  const error = new Error('Manual Sentry test from staging UI');
  error.name = 'SentryStagingTestError';

  const eventId = Sentry.captureException(error, {
    tags: { test: 'manual-staging', source: 'developer-options-button' },
    extra: { triggered_at: stamp },
    level: 'error',
  });

  console.info('[sentry-test] captureException eventId=', eventId);
  // Surface flush timeouts as failures: a `false` here means the event
  // queue did not drain within 2s, so the network round-trip to Sentry is
  // unconfirmed. For a *diagnostic* tool, returning a successful-looking
  // eventId in that case would be a lie.
  const flushed = await Sentry.flush(2000);
  if (!flushed) {
    throw new Error(
      'Sentry.flush(2000) timed out — event may not have reached Sentry. ' +
        'Check network / DSN / Sentry status before retrying.'
    );
  }
  return eventId;
}

View on GitHub (pinned to a221052e0d)

Solutions

  1. Use only -w/--workspace, -m/--mode, -v/--verbose, each with a space-separated value
  2. Get help at the top level: `openhuman subconscious --help`
  3. Write `--workspace /path`, never `--workspace=/path`

Example fix

# before
openhuman subconscious tick --mode=aggressive -h
# after
openhuman subconscious --help   # then:
openhuman subconscious tick --mode aggressive -v
Defensive patterns

Strategy: validation

Validate before calling

# bash: tick accepts only -w/--workspace <v>, -m/--mode <v>, -v — and no '=' syntax
prev=''
for a in "$@"; do
  case "$a" in
    --workspace|-w|--mode|-m|--verbose|-v) ;;
    --*) echo "unknown flag '$a' (no '=' support; use space-separated values)" >&2; exit 2 ;;
    *) [ -n "$prev" ] || { echo "unknown flag '$a'" >&2; exit 2; } ;;
  esac
  prev="$a"
done
openhuman subconscious tick "$@"

Type guard

is_tick_flag() { case "$1" in --workspace|-w|--mode|-m|--verbose|-v) return 0;; *) return 1;; esac; }

Try / catch

if ! out=$(openhuman subconscious tick "$@" 2>&1); then
  case "$out" in *"unknown flag"*) echo "allowed: --workspace <p> | --mode <m> | -v; help is top-level only" >&2; openhuman subconscious --help >&2; exit 2;; esac
  printf '%s\n' "$out" >&2; exit 1
fi

Prevention

When it happens

Trigger: `openhuman subconscious tick -h` (use `openhuman subconscious --help` instead); `tick --dry-run`; `tick --workspace=/path` (the parser does not support `=`-syntax, so the whole token is unknown); `tick extra` positional.

Common situations: Reaching for -h at the subcommand level; `--flag=value` habit; leftover tokens in automation; assuming flags from `status` apply to `tick`.

Understand the failure class

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/04d4363cf216c94a. Report an issue: GitHub.